Project

General

Profile

« Previous | Next » 

Revision e92bdb50

Added by Cherian Mathew almost 11 years ago

DescribedSpecimenSection : updated element for change in TaxonDescription which now has a single specimen object instead of a list
DescriptionDetailElement : Added FIXME tag for feature tree code (which is not used currently). Needs furthur discussion before implementation
ScopeSection : updated construction of DefinedTerm using default TermType
ModifierSection : updated construction of DefinedTerm using default TermType

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescribedSpecimenSection.java
10 10

  
11 11
package eu.etaxonomy.taxeditor.ui.section.description;
12 12

  
13
import java.util.ArrayList;
13 14
import java.util.Collection;
15
import java.util.List;
14 16

  
15 17
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
16 18
import eu.etaxonomy.cdm.model.description.TaxonDescription;
......
48 50
	@Override
49 51
	public Collection<SpecimenOrObservationBase> getCollection(
50 52
			TaxonDescription entity) {
51
		//FIXME:3.3MC
52
		return entity.getDescribedSpecimenOrObservation();
53
		//FIXME:This class is not really an entity collection section, and should be moved 
54
		// to a single entity section, but one with the possibility of launching a wizard
55
		List<SpecimenOrObservationBase> collection = new ArrayList<SpecimenOrObservationBase>();
56
		if(entity.getDescribedSpecimenOrObservation() != null) {
57
			collection.add(entity.getDescribedSpecimenOrObservation());	
58
		}		
59
		return collection;
53 60
	}
54 61

  
55 62
	/** {@inheritDoc} */
56 63
	@Override
57 64
	public SpecimenOrObservationBase createNewElement() {
58
		DerivedUnit selection = DerivedUnitSelectionDialog.select(getShell(), getConversationHolder(), null);
65
		DerivedUnit selection = DerivedUnitSelectionDialog.select(getShell(), getConversationHolder(), null);		
59 66
		return selection;
60 67
	}
61 68

  
62 69
	/** {@inheritDoc} */
63 70
	@Override
64 71
	public void addElement(SpecimenOrObservationBase element) {
65
		getEntity().addDescribedSpecimenOrObservation(element);
72
		getEntity().setDescribedSpecimenOrObservation(element);
66 73
	}
67 74

  
68 75
	/** {@inheritDoc} */
69 76
	@Override
70 77
	public void removeElement(SpecimenOrObservationBase element) {
71
		getEntity().removeDescribedSpecimenOrObservation(element);
78
		getEntity().setDescribedSpecimenOrObservation(null);		
72 79
	}
73 80

  
74 81
	/** {@inheritDoc} */

Also available in: Unified diff