import org.eclipse.ui.IPersistableElement;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
import eu.etaxonomy.cdm.api.service.ITaxonService;
import eu.etaxonomy.cdm.model.taxon.Classification;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
* @param taxonNode
*/
public ChecklistEditorInput(TaxonNode taxonNode){
- super(true);
+ super(false);
+ System.out.println(this.toString());
this.conversation = CdmStore.createConversation();
- this.taxonNode = CdmStore.getCurrentApplicationConfiguration().getTaxonNodeService().load(taxonNode.getUuid());
+ this.taxonNode =CdmStore.getService(ITaxonNodeService.class).load(taxonNode.getUuid(), getTaxonNodePropertyPaths());
// getChildTaxa(taxonNode);
classification = taxonNode.getClassification();
+ initSession();
+ System.out.println(this.toString());
}
+
/**
* @param taxonNode2
public ConversationHolder getConversation() {
return conversation;
}
+
+ private List<String> getTaxonNodePropertyPaths() {
+ List<String> taxonNodePropertyPaths = new ArrayList<String>();
+ for(String propertyPath : getTaxonBasePropertyPaths()) {
+ taxonNodePropertyPaths.add("taxon." + propertyPath);
+ }
+ return taxonNodePropertyPaths;
+ }
+
+ private List<String> getTaxonBasePropertyPaths() {
+ List<String> taxonBasePropertyPaths = Arrays.asList(new String[] {
+ "sec",
+ "createdBy",
+ "updatedBy",
+ "annotations",
+ "markers",
+ "credits",
+ "extensions",
+ "rights",
+ "sources",
+ "descriptions",
+ "relationsToThisTaxon",
+ "relationsFromThisTaxon",
+ "taxonNodes",
+ "descriptions.descriptionElements.feature",
+ "descriptions.descriptionElements.area",
+ "descriptions.descriptionElements.status",
+ "descriptions.markers",
+ "name.descriptions",
+ "name.typeDesignations",
+ "name.status",
+ "name.nomenclaturalReference.inReference",
+ "name.taxonBases.taxonNodes",
+ "name.relationsFromThisName",
+ "name.relationsToThisName",
+ "name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations.synonym.name.status",
+ "name.homotypicalGroup.typifiedNames.relationsToThisName.fromName",
+ "synonymRelations.synonym.name.status.type",
+ "synonymRelations.synonym.name.relationsToThisName.fromName",
+ "synonymRelations.synonym.name.nomenclaturalReference.inReference.authorship",
+ "synonymRelations.synonym.name.nomenclaturalReference.authorship",
+ "synonymRelations.synonym.name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations"
+ });
+
+ return taxonBasePropertyPaths;
+ }
+
+// @Override
+// public void dispose(){
+// conversation.unbind();
+// conversation.close();
+// getCdmEntitySession().dispose();
+// super.dispose();
+// }
}