Project

General

Profile

Revision e92bdb50

IDe92bdb5094feb832b0163f85cce7f1b24ac4c1f8
Parent dbe52ecb
Child 40ffaa10

Added by Cherian Mathew over 8 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} */
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionDetailElement.java
65 65
		}
66 66
		else if(eventSource == selection_featureTree){
67 67
			FeatureTree featureTree = selection_featureTree.getSelection();
68
			getEntity().setDescriptiveSystem(featureTree.getDistinctFeatures());
68
			//FIXME:3.3MC---- 
69
			//getEntity().setDescriptiveSystem(featureTree.getDistinctFeatures());
70
			//FIXME:3.3MC----
69 71
		}
70 72
	}
71 73
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/ModifierSection.java
52 52
	/** {@inheritDoc} */
53 53
	@Override
54 54
	public DefinedTerm createNewElement() {		
55
		return DefinedTerm.NewInstance(TermType.Modifier);				
55
		return DefinedTerm.NewInstance(TermType.Modifier,"","Untitled","");				
56 56
	}
57 57

  
58 58
	/** {@inheritDoc} */
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/ScopeSection.java
50 50
	/** {@inheritDoc} */
51 51
	@Override
52 52
	public DefinedTerm createNewElement() {		
53
		return DefinedTerm.NewInstance(TermType.Scope);					
53
		return DefinedTerm.NewInstance(TermType.Scope,"","Untitled","");					
54 54
	}
55 55

  
56 56
	/** {@inheritDoc} */

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)