eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/perspective/Default.java -text
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/perspective/PolytomousKey.java -text
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/perspective/Taxonomic.java -text
+eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/perspective/Uses.java -text
eu.etaxonomy.taxeditor.application/src/main/resources/log4j.properties -text
eu.etaxonomy.taxeditor.bulkeditor/.classpath -text
eu.etaxonomy.taxeditor.bulkeditor/.project -text
eu.etaxonomy.taxeditor.cdmlib/lib/org.apache.commons.codec-1.3.0.jar -text
eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.equinox.common-3.6.0.v20100503.jar -text
eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.osgi-3.6.2.R36x_v20110210.jar -text
+eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.osgi-3.7.2.v20120110-1415.jar -text
eu.etaxonomy.taxeditor.cdmlib/lib/org.springframework.aop-3.0.4.RELEASE.jar -text
eu.etaxonomy.taxeditor.cdmlib/lib/org.springframework.aop-3.0.4.RELEASEsrc.zip -text
eu.etaxonomy.taxeditor.cdmlib/lib/org.springframework.asm-3.0.4.RELEASE.jar -text
eu.etaxonomy.taxeditor.cdmlib/lib/org.springframework.web-3.0.4.RELEASEsrc.zip -text
eu.etaxonomy.taxeditor.cdmlib/lib/org.springframework.web.servlet-3.0.4.RELEASE.jar -text
eu.etaxonomy.taxeditor.cdmlib/lib/org.springframework.web.servlet-3.0.4.RELEASEsrc.zip -text
-eu.etaxonomy.taxeditor.cdmlib/lib/poi-3.1-FINAL.jar -text
+eu.etaxonomy.taxeditor.cdmlib/lib/poi-3.6-src.zip -text
+eu.etaxonomy.taxeditor.cdmlib/lib/poi-3.6.jar -text
eu.etaxonomy.taxeditor.cdmlib/lib/postgresql-8.2-504.jdbc4.jar -text
eu.etaxonomy.taxeditor.cdmlib/lib/sanselan-0.97-incubator.jar -text
eu.etaxonomy.taxeditor.cdmlib/lib/saxon9he.jar -text
eu.etaxonomy.taxeditor.cdmlib/lib/spring-modules-lucene-0.8asrc.zip -text
eu.etaxonomy.taxeditor.cdmlib/lib/spring-security-config-3.0.5.RELEASE.jar -text
eu.etaxonomy.taxeditor.cdmlib/lib/spring-security-core-3.0.5.RELEASE.jar -text
+eu.etaxonomy.taxeditor.cdmlib/lib/spring-xml-1.5.6.jar -text
eu.etaxonomy.taxeditor.cdmlib/lib/wsdl4j-1.6.1.jar -text
eu.etaxonomy.taxeditor.cdmlib/lib/wsdl4j-1.6.1src.zip -text
eu.etaxonomy.taxeditor.cdmlib/lib/xalan-2.7.0.jar -text
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/TaxonEditorInput.java -text
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/TaxonEditorInputDataChangeBehaviour.java -text
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/TaxonEditorInputFactory.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/UseObjectManager.java -text
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/ViewerConfiguration.java -text
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/EditNewTaxonHandler.java -text
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/OpenParentHandler.java -text
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptLabelProvider.java -text
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptViewPart.java -text
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptViewerSorter.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/graph/ConceptGraphContentProvider.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/graph/ConceptGraphLabelProvider.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/graph/ConceptGraphView.java -text
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/AbstractDynamicConceptRelationMenu.java -text
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/ChangeConceptRelationshipTypeHandler.java -text
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/ChangeConceptRelationshipTypeMenu.java -text
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/operation/DeleteMediaOperation.java -text
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/operation/MoveMediaInListOperation.java -text
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/operation/RemoveImageFromDescriptionElementOperation.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesContentProvider.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesLabelProvider.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesViewPart.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/handler/CreateUseHandler.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/handler/CreateUseRecordHandler.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/handler/CreateUseSummaryHandler.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/operation/CreateTaxonUseOperation.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/operation/CreateUseRecordOperation.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/operation/CreateUseSummaryOperation.java -text
eu.etaxonomy.taxeditor.editor/src/main/resources/TaonDescriptionEditor.screen -text
eu.etaxonomy.taxeditor.editor/src/main/resources/log4j.properties -text
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/Application.java -text
eu.etaxonomy.taxeditor.help/.project -text
eu.etaxonomy.taxeditor.help/META-INF/MANIFEST.MF -text
eu.etaxonomy.taxeditor.help/build.properties -text
-eu.etaxonomy.taxeditor.help/html/concepts/maintopic.html -text
-eu.etaxonomy.taxeditor.help/html/concepts/subtopic.html -text
-eu.etaxonomy.taxeditor.help/html/concepts/subtopic2.html -text
eu.etaxonomy.taxeditor.help/html/gettingstarted/a_succesful_parsed_taxon_record.html -text
eu.etaxonomy.taxeditor.help/html/gettingstarted/about_bulk_editing.html -text
eu.etaxonomy.taxeditor.help/html/gettingstarted/about_the_manual.html -text
eu.etaxonomy.taxeditor.help/html/gettingstarted/uninomial_and_specific_epithet.html -text
eu.etaxonomy.taxeditor.help/html/gettingstarted/windows_vista.html -text
eu.etaxonomy.taxeditor.help/html/gettingstarted/windows_xp_and_older_systems.html -text
+eu.etaxonomy.taxeditor.help/html/img/10_1a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/10_1b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/10_1c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/10_1d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/10_1e.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/10_1f.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/10_1g.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/10_1h.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_10a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_10b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_10c.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/2_10d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_10e.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_10f.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_10g.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/2_11a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_11b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_11c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_11d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_1a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_1b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_1c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_1d.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/2_1e.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_1f.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_1g.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_2a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_2b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_3a.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/2_3b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_3c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_4a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_4b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_5a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_5b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_6a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_8a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_9a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_9b.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/2_9c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_1a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_2a.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/3_2b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_2c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_2d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_2e.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/3_4a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_4b.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/3_4c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_4d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_4e.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_4f.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/3_4g.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_4h.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_4i.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_1a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_1b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_1c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_1d.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/4_1e.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_1f.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_1g.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_1h.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/4_1i.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_1j.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_1k.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_1l.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/4_2a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_2b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_2c.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/4_2d_text.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3aa.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3b.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/4_3bb.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3cc.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3e.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3f.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/4_3g.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3h.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3i.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3j.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/4_3k.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1e.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1f.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1g.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1h.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1i.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1j.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1k.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1l.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1m.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1n.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1o.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1p.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1q.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1r.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/5_1s.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1t.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1u.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1v.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/5_1w.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1x.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_3a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_3b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_3c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_4a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_4b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_4c.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/5_4d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_4e.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_4f.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_4g.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/5_4h.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_4i.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_1a.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/6_1b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_1c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_1d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_2a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_2b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_2c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_2d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_2e.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_2f.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_3a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_3b.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/6_3c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_4a.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/6_4b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_5a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_5b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_5c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_5d.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/6_5e.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_5f.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_5g.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_6a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_6b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_6c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_6cc.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/6_6d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_1a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_1b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_2a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_2b.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/7_3a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_4a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_5a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_6a.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/7_6b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_7a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_7b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_7c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_8a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_8b.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/7_8c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_3a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_3b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_3c.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/8_4a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_4b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_5a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_5b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_5c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_5d.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/8_5e.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_5f.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_6a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_6b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_6c.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/9_1a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/9_2a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/9_2b.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/blackarrow.jpg -text
eu.etaxonomy.taxeditor.help/html/img/cybergate.jpg -text
-eu.etaxonomy.taxeditor.help/html/reference/maintopic.html -text
-eu.etaxonomy.taxeditor.help/html/reference/subtopic.html -text
-eu.etaxonomy.taxeditor.help/html/reference/subtopic2.html -text
-eu.etaxonomy.taxeditor.help/html/samples/maintopic.html -text
-eu.etaxonomy.taxeditor.help/html/samples/subtopic.html -text
-eu.etaxonomy.taxeditor.help/html/samples/subtopic2.html -text
-eu.etaxonomy.taxeditor.help/html/tasks/maintopic.html -text
-eu.etaxonomy.taxeditor.help/html/tasks/subtopic.html -text
-eu.etaxonomy.taxeditor.help/html/tasks/subtopic2.html -text
-eu.etaxonomy.taxeditor.help/html/toc.html -text
+eu.etaxonomy.taxeditor.help/html/img/fileicon.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/orangewarning.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/redwarning.jpg -text
+eu.etaxonomy.taxeditor.help/html/nameparser/authorship_part.html -text
+eu.etaxonomy.taxeditor.help/html/nameparser/name_part.html -text
+eu.etaxonomy.taxeditor.help/html/nameparser/nomenclatural_status_part.html -text
+eu.etaxonomy.taxeditor.help/html/nameparser/overview.html -text
+eu.etaxonomy.taxeditor.help/html/nameparser/reference_part.html -text
eu.etaxonomy.taxeditor.help/original_document/Taxonomic_Editor_User_Manual_Version_4.doc -text
+eu.etaxonomy.taxeditor.help/p2.inf -text
eu.etaxonomy.taxeditor.help/plugin.xml -text
eu.etaxonomy.taxeditor.help/pom.xml -text
eu.etaxonomy.taxeditor.help/src/eu/etaxonomy/taxeditor/help/Activator.java -text
eu.etaxonomy.taxeditor.help/toc.xml -text
eu.etaxonomy.taxeditor.help/tocgettingstarted.xml -text
+eu.etaxonomy.taxeditor.help/tocnameparser.xml -text
eu.etaxonomy.taxeditor.navigation/.classpath -text
eu.etaxonomy.taxeditor.navigation/.project -text
eu.etaxonomy.taxeditor.navigation/META-INF/MANIFEST.MF -text
eu.etaxonomy.taxeditor.navigation/icons/preferences-system-windows.png -text
eu.etaxonomy.taxeditor.navigation/icons/system-search.png -text
eu.etaxonomy.taxeditor.navigation/icons/tree_icon.jpg -text
+eu.etaxonomy.taxeditor.navigation/p2.inf -text
eu.etaxonomy.taxeditor.navigation/plugin.xml -text
eu.etaxonomy.taxeditor.navigation/pom.xml -text
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/NavigationUtil.java -text
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNodeLabelProvider.java -text
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNodePropertyTester.java -text
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapterAssistant.java -text
+eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/CopyHandler.java -text
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/DeleteHandler.java -text
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/EditHandler.java -text
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/MoveTaxonHandler.java -text
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/NewClassificationHandler.java -text
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/NewTaxonNodeHandler.java -text
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RefreshTreeHandler.java -text
+eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/CopyOperation.java -text
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/DeleteOperation.java -text
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/EditClassificationOperation.java -text
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/MoveTaxonOperation.java -text
eu.etaxonomy.taxeditor.printpublisher/.project -text
eu.etaxonomy.taxeditor.printpublisher/META-INF/MANIFEST.MF -text
eu.etaxonomy.taxeditor.printpublisher/build.properties -text
+eu.etaxonomy.taxeditor.printpublisher/p2.inf -text
eu.etaxonomy.taxeditor.printpublisher/plugin.xml -text
eu.etaxonomy.taxeditor.printpublisher/pom.xml -text
eu.etaxonomy.taxeditor.printpublisher/src/main/java/eu/etaxonomy/taxeditor/printpublisher/PrintUtil.java -text
eu.etaxonomy.taxeditor.store/icons/icon.png -text
eu.etaxonomy.taxeditor.store/icons/import_wiz.gif -text
eu.etaxonomy.taxeditor.store/icons/large_image.gif -text
+eu.etaxonomy.taxeditor.store/icons/leaf_detail.png -text
eu.etaxonomy.taxeditor.store/icons/linkto_help.gif -text
eu.etaxonomy.taxeditor.store/icons/lockedstate.gif -text
eu.etaxonomy.taxeditor.store/icons/ma_12x12.gif -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/datasource/wizard/CdmDataSourceSQLServerWizardPage.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/datasource/wizard/CdmDataSourceTypeSelectionWizardPage.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/datasource/wizard/CdmDataSourceWizard.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/UsageTermCollection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermDragListener.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermDropAdapter.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermEditor.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermBasePropertyTester.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermContentProvider.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermLabelProvider.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermTransfer.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/CreateDefinedTermHandler.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/CreateTermVocabularyHandler.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/DeleteTermBaseHandler.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/OpenDefinedTermEditorHandler.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/OpenDefinedTermMenu.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/AbstractDefinedTermEditorInput.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/DefinedTermEditorInputFactory.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/ExtensionTypeEditorInput.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/FeatureEditorInput.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/MarkerTypeEditorInput.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/ModifierEditorInput.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/NamedAreaEditorInput.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/NamedAreaLevelEditorInput.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/StateEditorInput.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/CreateDefinedTermOperation.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/CreateTermVocabularyOperation.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/DeleteTermBaseOperation.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/MoveDefinedTermOperation.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/AvailableFeaturesWizard.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/AvailableFeaturesWizardPage.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/EditFeatureTreeWizardPage.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/CommonHelper.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/ContextListenerAdapter.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DataChangeBridge.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DefaultTermComparator.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DescriptionHelper.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/FeatureNodeContainer.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/FeatureNodeContainerTree.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/NomenclaturalCodeHelper.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/PolytomousKeyRelationship.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/TaxeditorPartService.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/TaxonRelationshipTypeInverseContainer.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/TaxonTransfer.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/TextHelper.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/TimeHelper.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/Resources.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TaxonomicEditorGeneralPreferences.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TaxonomicPreferences.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TypeDesignationPreferences.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/AbstractMatchingPreferences.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/NonViralNameMatchingPreference.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/ReferenceMatchingPreference.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/TermStore.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/internal/TaxeditorStorePlugin.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/bar/AuthenticatedUserBar.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/LoginDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/UriDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/AbstractFilteredCdmResourceSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/AgentSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/ClassificationSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/CollectionSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/DerivedUnitSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/FeatureSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/FeatureTreeSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/FieldObservationSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/GroupSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/InstitutionSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/NameSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/NamedAreaSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/NomenclaturalAuthorTeamSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/PersonSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/PolytomousKeySelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/ReferenceSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/TaxonBaseSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/TaxonNodeSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/TeamSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/UserSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/AbstractCdmEntityWizardPage.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/AbstractCdmFormElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/AbstractCdmFormElementWithErrors.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/AbstractFormSection.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/BrowserElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/CdmFormFactory.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/CdmPropertyChangeEvent.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/CheckboxElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/DateDetailSection.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ICdmFormElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/IEnableableFormElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/IEntityElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/IErrorIntolerableElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/IExceptionHandler.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ILabeledElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/IPropertyChangeEmitter.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/IRelevantFormElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ISelectable.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ISelectableElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ImageElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/KeyStatementElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/KeyValueViewerElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/LabelElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/LanguageStringWithLabelElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/MultilanguageTextElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/NumberWithLabelElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/PartialElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/PointElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/RootElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/SelectionArbitrator.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/TextActionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/TextWithLabelElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/TimePeriodElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ToggleableTextElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/UriWithLabelElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/password/EditPasswordElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/password/PasswordWizard.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/password/PasswordWizardPage.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/EnumComboElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/TermComboElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/LoginDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/UriDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AbstractFilteredCdmResourceSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AgentSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ClassificationSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CollectionSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/DerivedUnitSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureTreeSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FieldObservationSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GroupSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/InstitutionSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NameSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NamedAreaSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalAuthorTeamSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PersonSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PolytomousKeySelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ReferenceSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SelectionDialogFactory.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonBaseSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonNodeSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TeamSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/UserSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractCdmEntityWizardPage.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractCdmFormElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractCdmFormElementWithErrors.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractFormSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/BrowserElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmPropertyChangeEvent.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CheckboxElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/DateDetailSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ICdmFormElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/IEnableableFormElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/IEntityElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/IErrorIntolerableElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/IExceptionHandler.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ILabeledElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/IPropertyChangeEmitter.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/IRelevantFormElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ISelectable.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ISelectableElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ImageElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/KeyStatementElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/KeyValueViewerElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/LabelElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/LanguageStringWithLabelElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/LayoutConstants.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/MultilanguageTextElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/NumberWithLabelElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/PartialElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/PointElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/RootElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/SelectionArbitrator.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TextActionElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TextWithLabelElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TimePeriodElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ToggleableTextElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/UriWithLabelElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/openurl/IOpenUrlEnabled.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/openurl/OpenUrlContentProvider.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/openurl/OpenUrlLabelProvider.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/openurl/OpenUrlResultPage.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/openurl/OpenUrlSelectorElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/openurl/OpenUrlSelectorWizard.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/password/EditPasswordElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/password/PasswordWizard.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/password/PasswordWizardPage.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractCdmDetailElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractCdmDetailSection.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractEntityCollectionElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailSection.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeWizardPage.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/common/ReferencedEntityDetailSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/common/RefereneEntityDetailElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DerivedUnitElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescribedSpecimenSection.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionDetailElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/AbstractReferencedEntityElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/AnnotationElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/AnnotationSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/CdmBaseElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/CdmBaseSection.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/CreditElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/CreditSection.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/ExtensionElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailSection.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonDetailElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonRelationshipDetailElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonRelationshipDetailSection.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/user/GroupsByUserDetailElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/user/GroupsByUserDetailSection.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/user/UserDetailElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/user/UserDetailSection.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/user/UserDetailWizardPage.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/AbstractSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/AgentSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/ClassificationSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/CollectionSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/DerivedUnitBaseSelectionElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/userecords/UseRecordDetailElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/userecords/UseRecordDetailSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/AbstractTermBaseDetailElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/DefinedTermDetailElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/DefinedTermDetailSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaDetailElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaDetailSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaLevelDetailSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermVocabularyDetailElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermVocabularyDetailSection.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EditFromSelectionWizard.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/FeatureSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/FeatureTreeSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/FieldObservationSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/GroupSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/InstitutionSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/NameSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/NamedAreaSelectionElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EntitySelectionElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/NomenclaturalAuthorTeamSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/PersonSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/PolytomousKeyNodeSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/PolytomousKeySelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/ReferenceSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/SynonymSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/TaxonBaseSelectionElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/TaxonNodeSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/TaxonSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/TeamSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/UserSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/AbstractEnumComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/AbstractTermComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/AnnotationTypeComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/DeterminationModifierComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/EmptyComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ExtensionTypeComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/LanguageComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/MarkerTypeComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/MeasurementUnitComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ModifierComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NameRelationshipTypeComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NameTypeDesignationStatusComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NamedAreaTypeComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NomenclaturalCodeComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NomenclaturalStatusTypeComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/PresenceAbsenceTermComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/PreservationMethodComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/RankComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ReferenceSystemComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ReferenceTypeComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/RightsTypeComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ScopeComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/SexComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/SpecimenTypeDesignationStatusComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/StageComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/StateComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/StatisticalMeasureComboElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/GoogleLanguageApiWrapper.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/ITranslationServiceWrapper.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/LanguageNotSupportedException.java -text
eu.etaxonomy.taxeditor.test/META-INF/MANIFEST.MF -text
eu.etaxonomy.taxeditor.test/build.properties -text
eu.etaxonomy.taxeditor.test/ide/eclipse/EDITor[!!-~]Tests.launch -text
+eu.etaxonomy.taxeditor.test/pom.xml -text
eu.etaxonomy.taxeditor.test/src/main/resources/log4j.xml -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/application/menu/general/NewMenuTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/navigation/navigator/contextmenu/ClassificationTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonWizardTest.java -text
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/AbstractEditorTest.java -text
-eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/ClassificationTest.java -text
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/ContextMenuHelper.java -text
-eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/LoginTest.java -text
-eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/NewMenuTest.java -text
-eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/NewTaxonWizardTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/SwtBotUtils.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/dialogs/LoginDialogTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/AbstractSelectionElementTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/ClassificationSelectionElementTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/NameSelectionElementTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/TaxonNodeSelectionElementTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/TaxonSelectionElementTest.java -text
eu.etaxonomy.taxeditor/.classpath -text
eu.etaxonomy.taxeditor/.project -text
eu.etaxonomy.taxeditor/deploy_nightly.sh -text
+/.project
eu.etaxonomy.taxeditor.application/.settings
eu.etaxonomy.taxeditor.application/target
eu.etaxonomy.taxeditor.bulkeditor/.settings
eu.etaxonomy.taxeditor.cdmlib/cdmlib-*.zip
eu.etaxonomy.taxeditor.cdmlib/dist
eu.etaxonomy.taxeditor.cdmlib/lib/cdmlib*
+eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.equinox.common-3.6.0.v20110523.jar
+eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.equinox.servletbridge.extensionbundle-1.2.0.v20100503.jar
+eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.equinox.transforms.hook-1.0.300.v20100719.jar
+eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.equinox.weaving.hook-1.0.100.v20110502.jar
+eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.osgi-3.7.1.R37x_v20110808-1106.jar
eu.etaxonomy.taxeditor.cdmlib/log4j-1.2.14src.zip
eu.etaxonomy.taxeditor.cdmlib/target
eu.etaxonomy.taxeditor.editor/.settings
eu.etaxonomy.taxeditor.editor/target
eu.etaxonomy.taxeditor.feature.platform/.settings
+eu.etaxonomy.taxeditor.feature.platform/bin
eu.etaxonomy.taxeditor.feature.platform/target
eu.etaxonomy.taxeditor.feature/.settings
eu.etaxonomy.taxeditor.feature/compile.eu.etaxonomy.taxeditor.product.feature.xml
eu.etaxonomy.taxeditor.feature/target
eu.etaxonomy.taxeditor.feature/workspace
eu.etaxonomy.taxeditor.help/.settings
+eu.etaxonomy.taxeditor.help/original_document/~$xonomic_Editor_User_Manual_Version_4.doc
eu.etaxonomy.taxeditor.help/target
eu.etaxonomy.taxeditor.navigation/.settings
eu.etaxonomy.taxeditor.navigation/target
eu.etaxonomy.taxeditor.store/hibernate.log
eu.etaxonomy.taxeditor.store/target
eu.etaxonomy.taxeditor.test/screenshots/*.jpeg
+eu.etaxonomy.taxeditor.test/target
eu.etaxonomy.taxeditor/.settings
eu.etaxonomy.taxeditor/target
/runtime-taxeditor.product
Bundle-ManifestVersion: 2
Bundle-Name: Application
Bundle-SymbolicName: eu.etaxonomy.taxeditor.application;singleton:=true
-Bundle-Version: 3.0.6.qualifier
+Bundle-Version: 3.0.12.qualifier
Bundle-Activator: eu.etaxonomy.taxeditor.TaxonomicEditorPlugin
Bundle-Vendor: EDIT
Bundle-Localization: plugin
id="eu.etaxonomy.taxeditor.application.perspective.polytomous"\r
name="Polytomous Key">\r
</perspective>\r
+ <perspective\r
+ class="eu.etaxonomy.taxeditor.perspective.Uses"\r
+ id="eu.etaxonomy.taxeditor.application.perspective.uses"\r
+ name="Uses">\r
+ </perspective>\r
+ \r
</extension>\r
<!--extension\r
point="org.eclipse.ui.views">\r
id="eu.etaxonomy.taxeditor.editor.forms.detailsView">\r
</showInPart>\r
</perspectiveExtension>\r
+ <perspectiveExtension\r
+ targetID="eu.etaxonomy.taxeditor.application.perspective.uses">\r
+ <showInPart\r
+ id="eu.etaxonomy.taxeditor.editor.forms.detailsView">\r
+ </showInPart>\r
+ </perspectiveExtension>\r
</extension>\r
<extension\r
point="org.eclipse.ui.menus">\r
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>3.0.6-SNAPSHOT</version>
+ <version>3.0.12-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
*
* @return a {@link java.lang.String} object.
*/
- protected static String getPluginId(){
+ public static String getPluginId(){
return TaxonomicEditorPlugin.PLUGIN_ID;
}
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.dialogs.LoginDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.LoginDialog;
/**
* <p>ApplicationWorkbenchWindowAdvisor class.</p>
--- /dev/null
+/**\r
+ * \r
+ */\r
+package eu.etaxonomy.taxeditor.perspective;\r
+\r
+import org.eclipse.ui.IPageLayout;\r
+import eu.etaxonomy.taxeditor.editor.view.uses.UsesViewPart;\r
+import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;\r
+import eu.etaxonomy.taxeditor.view.detail.DetailsViewPart;\r
+\r
+/**\r
+ * Uses Class\r
+ * @author a.theys \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class Uses extends Default {\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)\r
+ */\r
+ /** {@inheritDoc} */\r
+ @Override\r
+ public void createInitialLayout(IPageLayout layout) {\r
+ layout.addView(TaxonNavigator.ID, IPageLayout.LEFT, 0.25f, layout.getEditorArea());\r
+ layout.addView(DetailsViewPart.ID, IPageLayout.RIGHT, 0.25f, layout.getEditorArea());\r
+ layout.addView(UsesViewPart.ID, IPageLayout.BOTTOM, 0.25f, layout.getEditorArea());\r
+ \r
+ createAdditionalFolder(layout, layout.getEditorArea());\r
+ }\r
+ \r
+\r
+}\r
+\r
Bundle-ManifestVersion: 2
Bundle-Name: Bulkeditor Bundle
Bundle-SymbolicName: eu.etaxonomy.taxeditor.bulkeditor;singleton:=true
-Bundle-Version: 3.0.6.qualifier
+Bundle-Version: 3.0.12.qualifier
Bundle-Activator: eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin
Bundle-Vendor: EDIT
Export-Package: eu.etaxonomy.taxeditor.annotatedlineeditor,eu.etaxonomy.taxeditor.annotatedlineeditor.handler,eu.etaxonomy.taxeditor.bulkeditor,eu.etaxonomy.taxeditor.bulkeditor.command,eu.etaxonomy.taxeditor.bulkeditor.handler,eu.etaxonomy.taxeditor.bulkeditor.input,eu.etaxonomy.taxeditor.bulkeditor.internal,eu.etaxonomy.taxeditor.bulkeditor.referencingobjects
.,\\r
icons/,\\r
plugin.xml,\\r
- build.properties,\\r
p2.inf\r
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>3.0.6-SNAPSHOT</version>
+ <version>3.0.12-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
persistenceService.merge(annotation.getEntity(), annotation.getMergeTarget()); // merge
} else {
// TODO clarify w AM whether this needs to be executed on merged objects
- persistenceService.delete(annotation.getEntity()); // delete
+ //persistenceService.delete(annotation.getEntity()); // delete
}
}
model.clearDeletedAnnotations();
// TODO Auto-generated method stub
return false;
}
+
}
if (editor instanceof AnnotatedLineEditor) {
- ISelection selection = HandlerUtil.getActiveMenuSelection(event);
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
if (selection instanceof TextSelection) {
// Get current line
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
-import eu.etaxonomy.cdm.common.CdmUtils;
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.agent.AgentBase;
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.common.IAnnotatableEntity;
import eu.etaxonomy.cdm.model.common.ICdmBase;
-import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
import eu.etaxonomy.cdm.model.common.Marker;
import eu.etaxonomy.cdm.model.common.MarkerType;
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
AbstractBulkEditorInput input = editor.getEditorInput();
String typeText = input.getTypeText(entity);
- supplementalText += CdmUtils.isEmpty(typeText) ? "" : String.format(" [%s]", typeText);
+ supplementalText += StringUtils.isBlank(typeText) ? "" : String.format(" [%s]", typeText);
if (entity instanceof IAnnotatableEntity) {
IAnnotatableEntity annotatableEntity = (IAnnotatableEntity) HibernateProxyHelper.deproxy(entity);
String markerText = "";
List<String> markers = new ArrayList<String>();
for (Marker marker : annotatableEntity.getMarkers()) {
- markers.add(String.format("%1s = %2s", marker.getMarkerType().getLabel(), marker.getFlag() ? "yes" : "no"));
+ String markerLabel = marker.getMarkerType() == null? " unknown marker " : marker.getMarkerType().getLabel();
+ markers.add(String.format("%1s = %2s", markerLabel, marker.getFlag() ? "yes" : "no"));
}
if (! markers.isEmpty()) {
markerText = StringUtils.join(markers, ", ");
}
- supplementalText += CdmUtils.isEmpty(markerText) ? "" : String.format(" [%s]", markerText);
+ supplementalText += StringUtils.isBlank(markerText) ? "" : String.format(" [%s]", markerText);
}
return supplementalText;
*
* @return a {@link java.lang.String} object.
*/
- protected static String getPluginId(){
+ public static String getPluginId(){
return TaxeditorBulkeditorPlugin.PLUGIN_ID;
}
return new IContributionItem[] {
new ContributionItem() {
public void fill(Menu menu, int index){
- for(MarkerType markerType : CdmStore.getTermManager().getPreferredMarkerTypes()){
+ for(MarkerType markerType : CdmStore.getTermManager().getPreferredTerms(MarkerType.class)){
createMenuItem(menu, markerType);
}
}
for(Object object : structuredSelection.toList()){
LineAnnotation annotation = (LineAnnotation) model.getAnnotation(object);
-
- // persistenceService.delete(object);
+
+ try {
+ persistenceService.delete(object);
+ } catch (Exception e){
+ BulkEditorUtil.errorDialog("Could not delete", getClass(), e.getMessage(), null);
+ }
((BulkEditor) editor).removeAnnotatedLine(annotation);
}
(LineAnnotationModel) provider.getAnnotationModel(input);
IDocument document = provider.getDocument(input);
- ISelection selection = HandlerUtil.getActiveMenuSelection(event);
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
if (selection instanceof TextSelection) {
Annotation annotation = null;
*/
public Map<Object, String> getKeyLabelPairs() {
Map<Object, String> result = new HashMap<Object, String>();
- for (Rank rank : CdmStore.getTermManager().getPreferredRanks()) {
+ for (Rank rank : CdmStore.getTermManager().getPreferredTerms(Rank.class)) {
result.put(rank, rank.getLabel());
}
return result;
Composite container = new Composite(parent, SWT.NULL);
container.setLayout(new GridLayout());
- for (final MarkerType markerType : TermStore.getNonTechnicalMarkerTypes()) {
+ for (final MarkerType markerType : TermStore.getTerms(MarkerType.class)) {
final Button button = new Button(container, SWT.CHECK);
button.setText(String.format("Edit '%s' markers", markerType.getLabel()));
public boolean onComplete() {
return false;
}
+
+
}
<?xml version="1.0" encoding="UTF-8"?>\r
<classpath>\r
- <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.0.8-SNAPSHOT.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.0.8-SNAPSHOT.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.0.8-SNAPSHOT.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.0.8-SNAPSHOT.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.0.8-SNAPSHOT.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.0.8-SNAPSHOT.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.0.8-SNAPSHOT.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.0.8-SNAPSHOT.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/yjp-controller-api-redist-8.0.1.jar"/>\r
+ <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.0.12-SNAPSHOT.jar"/>\r
+ <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.0.12-SNAPSHOT.jar"/>\r
+ <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.0.12-SNAPSHOT.jar"/>\r
+ <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.0.12-SNAPSHOT.jar"/>\r
+ <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.0.12-SNAPSHOT.jar"/>\r
+ <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.0.12-SNAPSHOT.jar"/>\r
+ <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.0.12-SNAPSHOT.jar"/>\r
+ <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.0.12-SNAPSHOT.jar"/>\r
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>\r
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
<classpathentry exported="true" kind="lib" path="lib/activation-1.1.jar" sourcepath="lib/activation-1.1src.zip"/>\r
<classpathentry exported="true" kind="lib" path="lib/hibernate-annotations-3.4.0-SNAPSHOT.jar" sourcepath="lib/hibernate-annotations-3.4.0-SNAPSHOTsrc.zip"/>\r
<classpathentry exported="true" kind="lib" path="lib/hibernate-commons-annotations-3.4.0-SNAPSHOT.jar" sourcepath="lib/hibernate-commons-annotations-3.4.0-SNAPSHOTsrc.zip"/>\r
<classpathentry exported="true" kind="lib" path="lib/hibernate-core-3.4.0-SNAPSHOT.jar" sourcepath="lib/hibernate-core-3.4.0-SNAPSHOTsrc.zip"/>\r
- <classpathentry exported="true" kind="lib" path="lib/hibernate-envers-3.4.0-SNAPSHOT.jar" sourcepath="lib/hibernate-envers-3.4.0-SNAPSHOTsrc.zip"/>\r
<classpathentry exported="true" kind="lib" path="lib/hibernate-search-3.1.0.GA.jar" sourcepath="lib/hibernate-search-3.1.0.GAsrc.zip"/>\r
<classpathentry exported="true" kind="lib" path="lib/hibernate-tools-3.2.0.ga.jar"/>\r
<classpathentry exported="true" kind="lib" path="lib/hibernate-validator-4.0.0.CR1.jar" sourcepath="lib/hibernate-validator-4.0.0.CR1src.zip"/>\r
<classpathentry exported="true" kind="lib" path="lib/org.springframework.transaction-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.transaction-3.0.4.RELEASEsrc.zip"/>\r
<classpathentry exported="true" kind="lib" path="lib/org.springframework.web-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.web-3.0.4.RELEASEsrc.zip"/>\r
<classpathentry exported="true" kind="lib" path="lib/org.springframework.web.servlet-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.web.servlet-3.0.4.RELEASEsrc.zip"/>\r
- <classpathentry exported="true" kind="lib" path="lib/poi-3.1-FINAL.jar"/>\r
+ <classpathentry exported="true" kind="lib" path="lib/poi-3.6.jar"/>\r
<classpathentry exported="true" kind="lib" path="lib/postgresql-8.2-504.jdbc4.jar"/>\r
<classpathentry exported="true" kind="lib" path="lib/sanselan-0.97-incubator.jar"/>\r
<classpathentry exported="true" kind="lib" path="lib/saxon9he.jar"/>\r
<classpathentry exported="true" kind="lib" path="lib/xom-1.0.jar"/>\r
<classpathentry exported="true" kind="lib" path="lib/xsltc.jar"/>\r
<classpathentry exported="true" kind="lib" path="lib/xstream-1.3.1.jar" sourcepath="lib/xstream-1.3.1src.zip"/>\r
+ <classpathentry exported="true" kind="lib" path="lib/hibernate-envers-3.4.0-SNAPSHOT.jar" sourcepath="lib/hibernate-envers-3.4.0-SNAPSHOTsrc.zip"/>\r
+ <classpathentry exported="true" kind="lib" path="lib/spring-xml-1.5.6.jar"/>\r
<classpathentry kind="output" path="target/classes"/>\r
</classpath>\r
Bundle-ManifestVersion: 2
Bundle-Name: CDM Library Dependencies Plugin
Bundle-SymbolicName: eu.etaxonomy.taxeditor.cdmlib;singleton:=true
-Bundle-Version: 3.0.6.qualifier
+Bundle-Version: 3.0.12.qualifier
Eclipse-BundleShape: dir
Export-Package: com.google.api,
com.google.api.detect,
eu.etaxonomy.cdm.persistence.fetch,
eu.etaxonomy.cdm.model.common",
eu.etaxonomy.cdm.api.service.config;uses:="eu.etaxonomy.cdm.model.reference,eu.etaxonomy.cdm.model.taxon,eu.etaxonomy.cdm.persistence.query",
+ eu.etaxonomy.cdm.api.service.exception,
eu.etaxonomy.cdm.api.service.pager,
eu.etaxonomy.cdm.api.service.pager.impl;uses:="eu.etaxonomy.cdm.api.service.pager",
eu.etaxonomy.cdm.api.utility;uses:="eu.etaxonomy.cdm.model.taxon,eu.etaxonomy.cdm.model.media,eu.etaxonomy.cdm.model.description",
eu.etaxonomy.cdm.model.common",
eu.etaxonomy.cdm.common;uses:="org.jdom.output,org.jdom",
eu.etaxonomy.cdm.common.media,
+ eu.etaxonomy.cdm.common.monitor,
eu.etaxonomy.cdm.database;
uses:="org.springframework.transaction,
org.apache.log4j,
lib/hibernate-annotations-3.4.0-SNAPSHOT.jar,
lib/hibernate-commons-annotations-3.4.0-SNAPSHOT.jar,
lib/hibernate-core-3.4.0-SNAPSHOT.jar,
- lib/hibernate-envers-3.4.0-SNAPSHOT.jar,
lib/hibernate-search-3.1.0.GA.jar,
lib/hibernate-tools-3.2.0.ga.jar,
lib/hibernate-validator-4.0.0.CR1.jar,
lib/org.springframework.transaction-3.0.4.RELEASE.jar,
lib/org.springframework.web-3.0.4.RELEASE.jar,
lib/org.springframework.web.servlet-3.0.4.RELEASE.jar,
- lib/poi-3.1-FINAL.jar,
+ lib/poi-3.6.jar,
lib/postgresql-8.2-504.jdbc4.jar,
lib/sanselan-0.97-incubator.jar,
lib/saxon9he.jar,
lib/xom-1.0.jar,
lib/xsltc.jar,
lib/xstream-1.3.1.jar,
- lib/cdmlib-commons-3.0.8-SNAPSHOT.jar,
- lib/cdmlib-ext-3.0.8-SNAPSHOT.jar,
- lib/cdmlib-io-3.0.8-SNAPSHOT.jar,
- lib/cdmlib-model-3.0.8-SNAPSHOT.jar,
- lib/cdmlib-persistence-3.0.8-SNAPSHOT.jar,
- lib/cdmlib-print-3.0.8-SNAPSHOT.jar,
- lib/cdmlib-remote-3.0.8-SNAPSHOT.jar,
- lib/cdmlib-services-3.0.8-SNAPSHOT.jar,
- lib/yjp-controller-api-redist-8.0.1.jar
+ lib/hibernate-envers-3.4.0-SNAPSHOT.jar,
+ lib/spring-xml-1.5.6.jar,
+ lib/cdmlib-commons-3.0.12-SNAPSHOT.jar,
+ lib/cdmlib-ext-3.0.12-SNAPSHOT.jar,
+ lib/cdmlib-io-3.0.12-SNAPSHOT.jar,
+ lib/cdmlib-model-3.0.12-SNAPSHOT.jar,
+ lib/cdmlib-persistence-3.0.12-SNAPSHOT.jar,
+ lib/cdmlib-print-3.0.12-SNAPSHOT.jar,
+ lib/cdmlib-remote-3.0.12-SNAPSHOT.jar,
+ lib/cdmlib-services-3.0.12-SNAPSHOT.jar
bin.includes = META-INF/,\\r
- lib/,\\r
lib/junit-4.8.1src.zip,\\r
lib/org.springframework.aop-3.0.4.RELEASEsrc.zip,\\r
lib/org.springframework.asm-3.0.4.RELEASEsrc.zip,\\r
lib/hibernate-annotations-3.4.0-SNAPSHOT.jar,\\r
lib/hibernate-commons-annotations-3.4.0-SNAPSHOT.jar,\\r
lib/hibernate-core-3.4.0-SNAPSHOT.jar,\\r
- lib/hibernate-envers-3.4.0-SNAPSHOT.jar,\\r
lib/hibernate-search-3.1.0.GA.jar,\\r
lib/hibernate-tools-3.2.0.ga.jar,\\r
lib/hibernate-validator-4.0.0.CR1.jar,\\r
lib/jsr250-api-1.0.jar,\\r
lib/jta.jar,\\r
lib/jtds-1.2.2.jar,\\r
- lib/junit-4.4.jar,\\r
lib/junit-4.8.1.jar,\\r
lib/log4j-1.2.14.jar,\\r
lib/lsid-client-1.1.2.jar,\\r
lib/org.springframework.transaction-3.0.4.RELEASE.jar,\\r
lib/org.springframework.web-3.0.4.RELEASE.jar,\\r
lib/org.springframework.web.servlet-3.0.4.RELEASE.jar,\\r
- lib/poi-3.1-FINAL.jar,\\r
lib/postgresql-8.2-504.jdbc4.jar,\\r
lib/sanselan-0.97-incubator.jar,\\r
lib/saxon9he.jar,\\r
lib/xom-1.0.jar,\\r
lib/xsltc.jar,\\r
lib/xstream-1.3.1.jar,\\r
- lib/cdmlib-commons-3.0.8-SNAPSHOT.jar,\\r
- lib/cdmlib-ext-3.0.8-SNAPSHOT.jar,\\r
- lib/cdmlib-io-3.0.8-SNAPSHOT.jar,\\r
- lib/cdmlib-model-3.0.8-SNAPSHOT.jar,\\r
- lib/cdmlib-persistence-3.0.8-SNAPSHOT.jar,\\r
- lib/cdmlib-print-3.0.8-SNAPSHOT.jar,\\r
- lib/cdmlib-remote-3.0.8-SNAPSHOT.jar,\\r
- lib/cdmlib-services-3.0.8-SNAPSHOT.jar,\\r
- lib/yjp-controller-api-redist-8.0.1.jar\r
+ lib/poi-3.6.jar,\\r
+ lib/hibernate-envers-3.4.0-SNAPSHOT.jar,\\r
+ lib/spring-xml-1.5.6.jar,\\r
+ lib/cdmlib-commons-3.0.12-SNAPSHOT.jar,\\r
+ lib/cdmlib-ext-3.0.12-SNAPSHOT.jar,\\r
+ lib/cdmlib-io-3.0.12-SNAPSHOT.jar,\\r
+ lib/cdmlib-model-3.0.12-SNAPSHOT.jar,\\r
+ lib/cdmlib-persistence-3.0.12-SNAPSHOT.jar,\\r
+ lib/cdmlib-print-3.0.12-SNAPSHOT.jar,\\r
+ lib/cdmlib-remote-3.0.12-SNAPSHOT.jar,\\r
+ lib/cdmlib-services-3.0.12-SNAPSHOT.jar\r
jars.compile.order = cdmLibrary.jar\r
src.includes = lib/\r
-jre.compilation.profile = J2SE-1.6\r
bin.excludes = lib/activation-1.1src.zip,\\r
lib/c3p0-0.9.1src.zip,\\r
- lib/cdmlib-commons-3.0-sources.jar,\\r
- lib/cdmlib-ext-3.0-sources.jar,\\r
- lib/cdmlib-io-3.0-sources.jar,\\r
- lib/cdmlib-model-3.0-sources.jar,\\r
- lib/cdmlib-persistence-3.0-sources.jar,\\r
- lib/cdmlib-print-3.0-sources.jar,\\r
- lib/cdmlib-remote-3.0-sources.jar,\\r
- lib/cdmlib-services-3.0-sources.jar,\\r
lib/commons-beanutils-1.7.0src.zip,\\r
lib/commons-collections-3.2src.zip,\\r
lib/commons-dbcp-1.2.2src.zip,\\r
lib/slf4j-log4j12-1.5.2src.zip,\\r
lib/spring-modules-cache-0.7src.zip,\\r
lib/spring-modules-lucene-0.8asrc.zip,\\r
- lib/spring-security-core-3.0.0.RELEASEsrc.zip,\\r
lib/wsdl4j-1.6.1src.zip,\\r
lib/xml-resolver-1.2src.zip,\\r
lib/xstream-1.3.1src.zip,\\r
- lib/junit-4.8.1src.zip,\\r
- lib/cdmlib-services-3.0.6-SNAPSHOT-sources.jar,\\r
- lib/cdmlib-remote-3.0.6-SNAPSHOT-sources.jar,\\r
- lib/cdmlib-print-3.0.6-SNAPSHOT-sources.jar,\\r
- lib/cdmlib-persistence-3.0.6-SNAPSHOT-sources.jar,\\r
- lib/cdmlib-model-3.0.6-SNAPSHOT-sources.jar,\\r
- lib/cdmlib-io-3.0.6-SNAPSHOT-sources.jar,\\r
- lib/cdmlib-ext-3.0.6-SNAPSHOT-sources.jar,\\r
- lib/cdmlib-commons-3.0.6-SNAPSHOT-sources.jar,\\r
- lib/cdmlib-commons-3.0.6-SNAPSHOT.jar,\\r
- lib/cdmlib-ext-3.0.6-SNAPSHOT.jar\r
+ lib/junit-4.8.1src.zip\r
\r
<parent>\r
<groupId>eu.etaxonomy</groupId>\r
<artifactId>taxeditor-parent</artifactId>\r
- <version>3.0.6-SNAPSHOT</version>\r
+ <version>3.0.12-SNAPSHOT</version>\r
</parent>\r
<modelVersion>4.0.0</modelVersion>\r
<artifactId>eu.etaxonomy.taxeditor.cdmlib</artifactId>\r
<plugin>\r
<groupId>org.apache.maven.plugins</groupId>\r
<artifactId>maven-dependency-plugin</artifactId>\r
- <version>2.3</version>\r
+ <version>2.4</version>\r
<executions>\r
<execution>\r
<id>copy-dependencies</id>\r
<excludeTransitive>true</excludeTransitive>\r
</configuration>\r
</execution>\r
- <!--execution>\r
+ <execution>\r
<id>copy-dependencies-sources</id>\r
<phase>validate</phase>\r
<goals>\r
<overWriteReleases>true</overWriteReleases>\r
<overWriteSnapshots>true</overWriteSnapshots>\r
<excludeTransitive>true</excludeTransitive>\r
+ <failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>\r
</configuration>\r
- </execution-->\r
+ </execution>\r
</executions>\r
</plugin>\r
</plugins>\r
Bundle-ManifestVersion: 2
Bundle-Name: Editor Bundle
Bundle-SymbolicName: eu.etaxonomy.taxeditor.editor;singleton:=true
-Bundle-Version: 3.0.6.qualifier
+Bundle-Version: 3.0.12.qualifier
Bundle-Activator: eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
eu.etaxonomy.taxeditor.editor.name,
eu.etaxonomy.taxeditor.editor.name.handler,
eu.etaxonomy.taxeditor.editor.view.descriptive,
- eu.etaxonomy.taxeditor.editor.view.media
+ eu.etaxonomy.taxeditor.editor.view.media,
+ eu.etaxonomy.taxeditor.editor.view.uses
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.expressions,
id="eu.etaxonomy.taxeditor.editor.view.descriptive"
name="Descriptive"
restorable="true">
+ </view>
+ <view
+ allowMultiple="false"
+ class="eu.etaxonomy.taxeditor.editor.view.uses.UsesViewPart"
+ icon="icons/leaf.png"
+ id="eu.etaxonomy.taxeditor.editor.view.uses"
+ name="Uses"
+ restorable="true">
</view>
<view
allowMultiple="false"
name="Concept Relations"
restorable="true">
</view>
+ <view
+ class="eu.etaxonomy.taxeditor.editor.view.concept.graph.ConceptGraphView"
+ icon="icons/address-book-new.png"
+ id="eu.etaxonomy.taxeditor.editor.view.concept.graph"
+ name="Concept Graph"
+ restorable="true">
+ </view>
</extension>
<extension
point="org.eclipse.ui.elementFactories">
value="eu.etaxonomy.taxeditor.editor.view.concept">
</parameter>
</command>
+ <command
+ commandId="org.eclipse.ui.views.showView"
+ label="Concept Graph"
+ style="push">
+ <parameter
+ name="org.eclipse.ui.views.showView.viewId"
+ value="eu.etaxonomy.taxeditor.editor.view.concept.graph">
+ </parameter>
+ <visibleWhen
+ checkEnabled="false">
+ <reference
+ definitionId="isShowExperimentalFeatures">
+ </reference>
+ </visibleWhen>
+ </command>
</menuContribution>
<menuContribution
locationURI="menu:org.eclipse.ui.main.menu.navigate">
style="push">
</command>
</menuContribution>
+
+
+
+
+ <menuContribution
+ locationURI="popup:eu.etaxonomy.taxeditor.editor.view.uses">
+ <command
+ commandId="eu.etaxonomy.taxeditor.use.commands.adduse"
+ label="New Use"
+ style="push">
+ </command>
+ <command
+ commandId="eu.etaxonomy.taxeditor.editor.use.createUseSummary"
+ label="New Use Summary"
+ style="push">
+ <visibleWhen
+ checkEnabled="true">
+ <or>
+ <reference
+ definitionId="isDescription">
+ </reference>
+ <reference
+ definitionId="isDescriptionElement">
+ </reference>
+ <reference
+ definitionId="isFeatureNodeContainer">
+ </reference>
+ </or>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="eu.etaxonomy.taxeditor.editor.use.createUseRecord"
+ label="New Use Record"
+ style="push">
+ <visibleWhen
+ checkEnabled="true">
+ <or>
+ <reference
+ definitionId="isDescription">
+ </reference>
+ <reference
+ definitionId="isDescriptionElement">
+ </reference>
+ <reference
+ definitionId="isFeatureNodeContainer">
+ </reference>
+ </or>
+ </visibleWhen>
+ </command>
+ <separator
+ name="eu.etaxonomy.taxeditor.usesEditor.separator3"
+ visible="true">
+ </separator>
+ <separator
+ name="taxeditor-editor.separator1"
+ visible="true">
+ </separator>
+ <separator
+ name="eu.etaxonomy.taxeditor.taxonDescriptionEditor.separator.afterNew"
+ visible="true">
+ </separator>
+ <command
+ commandId="org.eclipse.ui.edit.delete"
+ label="Delete"
+ style="push">
+ </command>
+ <separator
+ name="eu.etaxonomy.taxeditor.taxonDescriptionEditor.separator.afterDelete"
+ visible="true">
+ </separator>
+ <command
+ commandId="org.eclipse.ui.file.save"
+ label="Save"
+ style="push">
+ </command>
+ </menuContribution>
+
+
+
+
+
<menuContribution
locationURI="popup:eu.etaxonomy.taxeditor.editor.view.media">
<command
</with>
</activeWhen>
</handler>
+ <handler
+ class="eu.etaxonomy.taxeditor.editor.view.descriptive.handler.DeleteHandler"
+ commandId="org.eclipse.ui.edit.delete">
+ <activeWhen>
+ <with
+ variable="activePartId">
+ <equals
+ value="eu.etaxonomy.taxeditor.editor.view.uses">
+ </equals>
+ </with>
+ </activeWhen>
+ </handler>
</extension>
<extension
name="Name Commands"
id="eu.etaxonomy.taxeditor.description.commands.moveDescriptionElements"
name="Move Description Elements">
</command>
+ <category
+ id="eu.etaxonomy.taxeditor.editor.view.uses.command.category"
+ name="-- New Uses">
+ </category>
+ <command
+ categoryId="eu.etaxonomy.taxeditor.editor.view.uses.command.category"
+ defaultHandler="eu.etaxonomy.taxeditor.editor.view.uses.handler.CreateUseHandler"
+ id="eu.etaxonomy.taxeditor.use.commands.adduse"
+ name="New Use">
+ </command>
+ <command
+ categoryId="eu.etaxonomy.taxeditor.editor.view.uses.command.category"
+ defaultHandler="eu.etaxonomy.taxeditor.editor.view.uses.handler.CreateUseSummaryHandler"
+ id="eu.etaxonomy.taxeditor.editor.use.createUseSummary"
+ name="New Use Summary">
+ </command>
+ <command
+ categoryId="eu.etaxonomy.taxeditor.editor.view.uses.command.category"
+ defaultHandler="eu.etaxonomy.taxeditor.editor.view.uses.handler.CreateUseRecordHandler"
+ id="eu.etaxonomy.taxeditor.editor.use.createUseRecord"
+ name="New Use Record">
+ </command>
<category
id="eu.etaxonomy.taxeditor.editor.media.category"
name="-- Media">
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>3.0.6-SNAPSHOT</version>
+ <version>3.0.12-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
boolean doSave = MessageDialog
.openConfirm(shell, "Confirm save",
- "The current editor must be saved before this action can be executed.");
+ "Warning - this operation will save the editor. This will also save all other unsaved changes " +
+ "in your working editor to the database. Please 'Cancel' if you are not ready to do this.");
if (!doSave) {
return false;
*
* @return a {@link java.lang.String} object.
*/
- protected static String getPluginId() {
+ public static String getPluginId() {
return TaxeditorEditorPlugin.PLUGIN_ID;
}
/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
+ * Copyright (C) 2007 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
package eu.etaxonomy.taxeditor.editor;
import org.eclipse.core.commands.operations.UndoContext;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorSite;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
/**
- *
- * Generates the tabbed editor with <code>TaxonNameEditor</code> on top and tabs for
- * "Descriptions", "Concepts", "Geography", etc.
- *
+ *
+ * Generates the tabbed editor with <code>TaxonNameEditor</code> on top and tabs
+ * for "Descriptions", "Concepts", "Geography", etc.
+ *
* @author p.ciardelli
* @author n.hoffmann
* @created 15.05.2008
* @version 1.0
*/
-public class MultiPageTaxonEditor extends FormEditor implements IConversationEnabled, IPostOperationEnabled, IDirtyMarkableSelectionProvider, IPartContentHasDetails {
+public class MultiPageTaxonEditor extends FormEditor implements
+ IConversationEnabled, IPostOperationEnabled,
+ IDirtyMarkableSelectionProvider, IPartContentHasDetails {
/** Constant <code>ID="eu.etaxonomy.taxeditor.editor.taxon"{trunked}</code> */
public static final String ID = "eu.etaxonomy.taxeditor.editor.taxon";
private IUndoContext undoContext;
private TaxonEditorInput input;
-
+
/**
- * <p>Constructor for MultiPageTaxonEditor.</p>
+ * <p>
+ * Constructor for MultiPageTaxonEditor.
+ * </p>
*/
public MultiPageTaxonEditor() {
- super();
+ super();
undoContext = new UndoContext();
}
-
+
/** {@inheritDoc} */
@Override
public void dispose() {
conversation.unregisterForDataStoreChanges(this);
conversation.close();
- super.dispose();
+ super.dispose();
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.ui.forms.editor.FormEditor#addPages()
*/
/** {@inheritDoc} */
input = (TaxonEditorInput) getEditorInput();
conversation = input.getConversationHolder();
conversation.registerForDataStoreChanges(this);
-
+
try {
- addPage(Page.NAME.getIndex(), new TaxonNameEditor(this), getEditorInput());
-// setPageText(Page.NAME.getIndex(), Page.NAME.getTitle());
-
+ addPage(Page.NAME.getIndex(), new TaxonNameEditor(this),
+ getEditorInput());
+ // setPageText(Page.NAME.getIndex(), Page.NAME.getTitle());
+
// TODO lazy create
-// addPage(Page.DESCRIPTIVE.getIndex(), new TaxonDescriptionTreeEditor(this), getEditorInput());
-// setPageText(Page.DESCRIPTIVE.getIndex(), Page.DESCRIPTIVE.getTitle());
-
-// EditorUtil.showPropertySheet();
-
+ // addPage(Page.DESCRIPTIVE.getIndex(), new
+ // TaxonDescriptionTreeEditor(this), getEditorInput());
+ // setPageText(Page.DESCRIPTIVE.getIndex(),
+ // Page.DESCRIPTIVE.getTitle());
+
+ // EditorUtil.showPropertySheet();
+
} catch (PartInitException e) {
EditorUtil.error(getClass(), e);
}
}
-
-
+
/** {@inheritDoc} */
@Override
public void doSave(IProgressMonitor monitor) {
monitor.beginTask("Saving Editor", 4);
- try{
- if( ! conversation.isBound()){
+ try {
+ if (!conversation.isBound()) {
conversation.bind();
}
monitor.worked(1);
-
- for(IEditorPart editorPage : getPages()){
- if(editorPage instanceof TaxonNameEditor){
- if(((TaxonNameEditor) editorPage).checkForEmptyNames()){
- MessageDialog.openWarning(EditorUtil.getShell(), "No Name Specified", "An attempt was made to save a taxon or synonym with " +
- "an empty name. Operation was cancelled.");
+
+ for (IEditorPart editorPage : getPages()) {
+ if (editorPage instanceof TaxonNameEditor) {
+ if (((TaxonNameEditor) editorPage).checkForEmptyNames()) {
+ MessageDialog
+ .openWarning(
+ EditorUtil.getShell(),
+ "No Name Specified",
+ "An attempt was made to save a taxon or synonym with "
+ + "an empty name. Operation was cancelled.");
return;
}
}
-
+
editorPage.doSave(monitor);
monitor.worked(1);
}
-
+
// commit the conversation and start a new transaction immediately
conversation.commit(true);
monitor.worked(1);
-
+
this.setDirty(false);
monitor.worked(1);
- }catch(Exception e){
- EditorUtil.errorDialog("An error occurred while saving", getClass(), "An error occurred while saving the editor. Please close and reopen the taxon again.", e);
+ } catch (Exception e) {
+ setFocus();
+ EditorUtil
+ .errorDialog(
+ "An error occurred while saving",
+ getClass(),
+ "An error occurred while saving the editor. Please close and reopen the taxon again.",
+ e);
disableEditor();
- }finally{
+ } finally {
monitor.done();
}
}
-
private void disableEditor() {
- for(IMultiPageTaxonEditorPage editorPage : getPages()){
+ for (IMultiPageTaxonEditorPage editorPage : getPages()) {
editorPage.setDisabled();
}
+ conversation.unregisterForDataStoreChanges(this);
+ conversation.close();
setDirty(false);
- getSite().getSelectionProvider().setSelection(new StructuredSelection());
- getSite().setSelectionProvider(null);
}
private void setDirty(boolean dirty) {
this.dirty = dirty;
firePropertyChange(PROP_DIRTY);
}
-
- /* (non-Javadoc)
+
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.ui.part.MultiPageEditorPart#isDirty()
*/
/**
- * <p>isDirty</p>
- *
+ * <p>
+ * isDirty
+ * </p>
+ *
* @return a boolean.
*/
public boolean isDirty() {
return dirty;
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.ui.forms.editor.FormEditor#editorDirtyStateChanged()
*/
/** {@inheritDoc} */
dirty = true;
super.editorDirtyStateChanged();
}
-
-
+
/**
* {@inheritDoc}
- *
- * Checks whether nested editors are calling <code>firePropertyChange(PROP_DIRTY)</code>
- * to signal an edit has taken place before passing property change along to
+ *
+ * Checks whether nested editors are calling
+ * <code>firePropertyChange(PROP_DIRTY)</code> to signal an edit has taken
+ * place before passing property change along to
* <code>super.handlePropertyChange(int propertyId)</code>.
*/
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.ui.part.MultiPageEditorPart#handlePropertyChange(int)
*/
protected void handlePropertyChange(int propertyId) {
}
super.handlePropertyChange(propertyId);
}
-
+
/** {@inheritDoc} */
@Override
- public void doSaveAs() {}
+ public void doSaveAs() {
+ }
/** {@inheritDoc} */
@Override
/** {@inheritDoc} */
@Override
- public void init(IEditorSite site, IEditorInput input) throws PartInitException {
-
+ public void init(IEditorSite site, IEditorInput input)
+ throws PartInitException {
+
if (!(input instanceof TaxonEditorInput))
throw new PartInitException(
"Invalid Input: Must be TaxonEditorInput");
-
+
this.input = (TaxonEditorInput) input;
-// try {
-// // Listen for name changes,
-// // change tab for this taxon editor accordingly
-// getTaxon().addPropertyChangeListener("name",
-// new PropertyChangeListener() {
-// public void propertyChange(PropertyChangeEvent e) {
-// setPartName();
-// }
-// });
-// } catch (NullPointerException e) {
-// EditorUtil.warn(getClass(), "Caught an NPE while initing an editor. This is most " +
-// "likely due to the unsuccesful attempt to restore the former " +
-// "state of the application. We ignore this because the workbench " +
-// "will simply be reset.");
-// }
+ // try {
+ // // Listen for name changes,
+ // // change tab for this taxon editor accordingly
+ // getTaxon().addPropertyChangeListener("name",
+ // new PropertyChangeListener() {
+ // public void propertyChange(PropertyChangeEvent e) {
+ // setPartName();
+ // }
+ // });
+ // } catch (NullPointerException e) {
+ // EditorUtil.warn(getClass(),
+ // "Caught an NPE while initing an editor. This is most " +
+ // "likely due to the unsuccesful attempt to restore the former " +
+ // "state of the application. We ignore this because the workbench " +
+ // "will simply be reset.");
+ // }
setPartName();
-
+
super.init(site, input);
}
-
- /**
- * Calls <code>MultiPageEditorPart.setPartName(String partName)</code>
- * with text appropriate to the state of the taxon: any taxon that has
- * been saved will by necessity have a name to display; a new taxon
- * should display "New taxon" in the editor tab.
- */
- protected void setPartName() {
-
- String partName = null;
- TaxonNameBase<?, ?> name = getTaxon().getName();
-
- if (name != null) {
- partName = name.getTitleCache();
- }
-
- if (partName == null || partName.equals("")) {
- partName = ("New taxon");
- }
-
- setPartName(partName);
- }
-
- /**
- * {@inheritDoc}
- *
- * Editor pages call this in their postOperation to notify the MultiPageTaxonEditor
- * of unsaved changes
- */
- public void changed(Object element) {
-// setDirty(true);
+
+ /**
+ * Calls <code>MultiPageEditorPart.setPartName(String partName)</code> with
+ * text appropriate to the state of the taxon: any taxon that has been saved
+ * will by necessity have a name to display; a new taxon should display
+ * "New taxon" in the editor tab.
+ */
+ protected void setPartName() {
+
+ String partName = null;
+ TaxonNameBase<?, ?> name = getTaxon().getName();
+
+ if (name != null) {
+ partName = name.getTitleCache();
+ }
+
+ if (partName == null || partName.equals("")) {
+ partName = ("New taxon");
+ }
+
+ setPartName(partName);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * Editor pages call this in their postOperation to notify the
+ * MultiPageTaxonEditor of unsaved changes
+ */
+ public void changed(Object element) {
+ // setDirty(true);
dirty = true;
super.editorDirtyStateChanged();
- if(element instanceof TaxonBase){
+ if (element instanceof TaxonBase) {
TaxonNameEditor page = (TaxonNameEditor) getPage(Page.NAME);
- AbstractGroupedContainer container = page.getContainer((TaxonBase) element);
- if(container != null){
+ AbstractGroupedContainer container = page
+ .getContainer((TaxonBase) element);
+ if (container != null) {
container.refresh();
}
}
- }
-
- /**
- * The accepted taxon that is the input for this editor
- *
- * @return the accepted taxon
- */
- public Taxon getTaxon(){
- return input.getTaxon();
- }
-
- /*
- * (non-Javadoc)
- * @see eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder()
- */
+ }
+
/**
- * <p>getConversationHolder</p>
- *
- * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
+ * The accepted taxon that is the input for this editor
+ *
+ * @return the accepted taxon
+ */
+ public Taxon getTaxon() {
+ return input.getTaxon();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder
+ * ()
+ */
+ /**
+ * <p>
+ * getConversationHolder
+ * </p>
+ *
+ * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
+ * object.
*/
public ConversationHolder getConversationHolder() {
return conversation;
}
-
+
/**
- * <p>setConversationHolder</p>
- *
- * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
+ * <p>
+ * setConversationHolder
+ * </p>
+ *
+ * @param conversation
+ * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
+ * object.
*/
- public void setConversationHolder(ConversationHolder conversation){
+ public void setConversationHolder(ConversationHolder conversation) {
this.conversation = conversation;
}
-
/**
- * <p>Getter for the field <code>undoContext</code>.</p>
- *
- * @return a {@link org.eclipse.core.commands.operations.IUndoContext} object.
+ * <p>
+ * Getter for the field <code>undoContext</code>.
+ * </p>
+ *
+ * @return a {@link org.eclipse.core.commands.operations.IUndoContext}
+ * object.
*/
public IUndoContext getUndoContext() {
return undoContext;
}
/**
- * <p>Setter for the field <code>undoContext</code>.</p>
- *
- * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
+ * <p>
+ * Setter for the field <code>undoContext</code>.
+ * </p>
+ *
+ * @param undoContext
+ * a {@link org.eclipse.core.commands.operations.IUndoContext}
+ * object.
*/
public void setUndoContext(IUndoContext undoContext) {
this.undoContext = undoContext;
}
-
+
/** {@inheritDoc} */
@Override
- public void setFocus(){
- //logger.warn("Setting focus to editor");
+ public void setFocus() {
+ // logger.warn("Setting focus to editor");
// bind the conversation
getConversationHolder().bind();
// pass focus to the active editor page
/*
* (non-Javadoc)
- * @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostCrudObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmCrudEvent)
+ *
+ * @see
+ * eu.etaxonomy.cdm.persistence.hibernate.ICdmPostCrudObserver#update(eu
+ * .etaxonomy.cdm.persistence.hibernate.CdmCrudEvent)
*/
/** {@inheritDoc} */
public void update(CdmDataChangeMap events) {
- if(dataChangeBehavior == null){
- dataChangeBehavior = new MultiPageTaxonEditorDataChangeBehaviour(this);
+ if (dataChangeBehavior == null) {
+ dataChangeBehavior = new MultiPageTaxonEditorDataChangeBehaviour(
+ this);
}
-
+
DataChangeBridge.handleDataChange(events, dataChangeBehavior);
}
-
/*
* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.store.operations.IPostOperationEnabled#postOperation()
+ *
+ * @see
+ * eu.etaxonomy.taxeditor.store.operations.IPostOperationEnabled#postOperation
+ * ()
*/
/** {@inheritDoc} */
public boolean postOperation(CdmBase objectAffectedByOperation) {
setDirty(true);
-
- for(IEditorPart editor : this.getPages()){
+
+ for (IEditorPart editor : this.getPages()) {
if (editor instanceof IPostOperationEnabled) {
- ((IPostOperationEnabled) editor).postOperation(objectAffectedByOperation);
+ ((IPostOperationEnabled) editor)
+ .postOperation(objectAffectedByOperation);
} else {
- EditorUtil.warn(getClass(), "postOperation not enabled for editor " + editor);
+ EditorUtil.warn(getClass(),
+ "postOperation not enabled for editor " + editor);
}
}
- EditorUtil.warn(getClass(), "postOperation called on MultiPageTaxonEditor. Can you make it more specific?");
-
+ EditorUtil
+ .warn(getClass(),
+ "postOperation called on MultiPageTaxonEditor. Can you make it more specific?");
+
return false;
}
-
+
/**
* Returns an <code>IEditorPart</code> implementation by type
- *
- * @param page the page type
- * @return a {@link eu.etaxonomy.taxeditor.editor.IMultiPageTaxonEditorPage} object.
+ *
+ * @param page
+ * the page type
+ * @return a {@link eu.etaxonomy.taxeditor.editor.IMultiPageTaxonEditorPage}
+ * object.
*/
- public IMultiPageTaxonEditorPage getPage(Page page){
- for(IEditorPart editor : this.getPages()){
- if(editor.getClass().equals(page.getClazz())){
- return (IMultiPageTaxonEditorPage) editor;
- }
+ public IMultiPageTaxonEditorPage getPage(Page page) {
+ for (IEditorPart editor : this.getPages()) {
+ if (editor.getClass().equals(page.getClazz())) {
+ return (IMultiPageTaxonEditorPage) editor;
+ }
}
return null;
}
-
+
/**
* Return a list of <code>AbstractTaxonEditor</code>s registered with this
* <code>MultiPageTaxonEditor</code>.
- *
+ *
* @return a {@link java.util.List} object.
*/
- public List<IMultiPageTaxonEditorPage> getPages(){
+ public List<IMultiPageTaxonEditorPage> getPages() {
ArrayList<IMultiPageTaxonEditorPage> editors = new ArrayList<IMultiPageTaxonEditorPage>();
- for(int i = 0; i < this.getPageCount(); i++){
-
- editors.add((IMultiPageTaxonEditorPage) this.getEditor(i));
+ for (int i = 0; i < this.getPageCount(); i++) {
+
+ editors.add((IMultiPageTaxonEditorPage) this.getEditor(i));
}
return editors;
}
-
+
/**
* Refreshes a certain page of the MultipageTaxonEditor
- *
- * @param page a {@link eu.etaxonomy.taxeditor.editor.Page} object.
+ *
+ * @param page
+ * a {@link eu.etaxonomy.taxeditor.editor.Page} object.
* @return a boolean.
*/
- public boolean redraw(Page page){
+ public boolean redraw(Page page) {
return redraw(page, true);
}
-
+
/**
- * Refreshes a certain page of the MultipageTaxonEditor and
- * sets focus to that page
- *
- * @param page a {@link eu.etaxonomy.taxeditor.editor.Page} object.
- * @param focus a boolean.
+ * Refreshes a certain page of the MultipageTaxonEditor and sets focus to
+ * that page
+ *
+ * @param page
+ * a {@link eu.etaxonomy.taxeditor.editor.Page} object.
+ * @param focus
+ * a boolean.
* @return a boolean.
*/
- public boolean redraw(Page page, boolean focus){
+ public boolean redraw(Page page, boolean focus) {
IMultiPageTaxonEditorPage editorPage = getPage(page);
return editorPage != null && editorPage.redraw(focus);
}
/**
- * <p>onComplete</p>
- *
+ * <p>
+ * onComplete
+ * </p>
+ *
* @return a boolean.
*/
public boolean onComplete() {
}
/**
- * Reloads the data for this
+ * Reloads the data for this
*/
public void reload() {
- if(isDirty()){
- EditorUtil.warningDialog("Editor has unsaved data", getClass(), "This editor can not be " +
- "refreshed because it contains unsaved data. Refreshing " +
- "this editor would discard the changes. Please save this editor, " +
- "close and reopen it manually in order to get the latest content");
- }else{
+ if (isDirty()) {
+ EditorUtil
+ .warningDialog(
+ "Editor has unsaved data",
+ getClass(),
+ "This editor can not be "
+ + "refreshed because it contains unsaved data. Refreshing "
+ + "this editor would discard the changes. Please save this editor, "
+ + "close and reopen it manually in order to get the latest content");
+ } else {
TaxonEditorInput input = (TaxonEditorInput) getEditorInput();
-
+
UUID uuid = input.getTaxonNode().getUuid();
-
+
conversation.clear();
-
+
try {
TaxonEditorInput newInput = TaxonEditorInput.NewInstance(uuid);
setInput(newInput);
- for(IMultiPageTaxonEditorPage editorPart : getPages()){
+ for (IMultiPageTaxonEditorPage editorPart : getPages()) {
editorPart.redraw();
}
} catch (Exception e) {
- EditorUtil.errorDialog("Error refreshing editor", getClass(), "Could not refresh this editor", e);
+ EditorUtil.errorDialog("Error refreshing editor", getClass(),
+ "Could not refresh this editor", e);
}
}
}
+
+ @Override
+ public String toString() {
+ return String.format("%s[%s]", this.getClass().getSimpleName(), getEditorInput());
+ }
}
package eu.etaxonomy.taxeditor.editor;
+import java.util.HashSet;
+import java.util.Set;
+
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.ListenerList;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.util.SafeRunnable;
*/
public class SimpleSelectionProvider implements ISelectionProvider {
- private ListenerList selectionChangedListeners = new ListenerList();
+ private Set<ISelectionChangedListener> selectionChangedListeners = new HashSet<ISelectionChangedListener>();
private ISelection selection;
private Job job;
// cancel previous selection setting
if(job != null){
- job.cancel();
+ if(job.getState() != Job.NONE){
+ job.cancel();
+ }
job = null;
}
display.asyncExec(new Runnable() {
public void run() {
- fireSelectionChanged(selectionChangedEvent);
+ SimpleSelectionProvider.this.fireSelectionChanged(selectionChangedEvent);
}
});
}
private void fireSelectionChanged(final SelectionChangedEvent event) {
- Object[] listeners = selectionChangedListeners.getListeners();
- for (int i = 0; i < listeners.length; ++i) {
- final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i];
+ for (final ISelectionChangedListener listener : selectionChangedListeners) {
SafeRunnable.run(new SafeRunnable() {
public void run() {
- l.selectionChanged(event);
+ listener.selectionChanged(event);
}
});
}
import eu.etaxonomy.cdm.api.service.IClassificationService;
import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
import eu.etaxonomy.cdm.api.service.ITaxonService;
+import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.cdm.model.taxon.ITreeNode;
import eu.etaxonomy.cdm.model.taxon.Synonym;
TaxonBase taxonBase = CdmStore.getService(ITaxonService.class).find(taxonBaseUuid);
- if(taxonBase instanceof Taxon){
- Taxon taxon = (Taxon) taxonBase;
+ if(taxonBase.isInstanceOf(Taxon.class)){
+ Taxon taxon = CdmBase.deproxy(taxonBase, Taxon.class);
if (taxon.isMisapplication()){
// TODO get accepted taxon
Set<TaxonNode> nodes = taxon.getTaxonNodes();
return getInputForMultipleNodes(conversation, nodes);
}else if(taxa.size() > 1){
- // FIXME implement a dialog that shows all possible taxa and let the user choose which he wants to open.
- EditorUtil.warningDialog("Not implemented yet", TaxonEditorInput.class, "There are multiple accepted taxa for the current selection. We currently do not know which one you want to open." +
- " This case is not handled yet by the software.");
+ Set<TaxonNode> taxonNodes = new HashSet<TaxonNode>();
+ for ( Taxon taxon : taxa ){
+ taxonNodes.addAll(taxon.getTaxonNodes());
+ }
+ return getInputForMultipleNodes(conversation, taxonNodes);
}else if(taxa.size() == 0){
// this is an undesired state
EditorUtil.warningDialog("Incorrect state", TaxonEditorInput.class, "Trying to open accepted taxon for a synonym or misapplication but" +
public TaxonBase getInitiallySelectedTaxonBase() {
return initiallySelectedTaxonBase;
}
+
+ @Override
+ public String toString() {
+ return String.format("%s[%s]", this.getClass().getSimpleName(), getTaxon());
+ }
}
--- /dev/null
+/**\r
+* Copyright (C) 2011 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor;\r
+\r
+import java.net.URI;\r
+import java.net.URISyntaxException;\r
+\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.ui.IMemento;\r
+\r
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
+import eu.etaxonomy.cdm.api.service.IFeatureTreeService;\r
+import eu.etaxonomy.cdm.api.service.ITermService;\r
+import eu.etaxonomy.cdm.api.service.IVocabularyService;\r
+import eu.etaxonomy.cdm.model.common.MarkerType;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.cdm.model.description.Feature;\r
+import eu.etaxonomy.cdm.model.description.FeatureNode;\r
+import eu.etaxonomy.cdm.model.description.FeatureTree;\r
+import eu.etaxonomy.cdm.model.description.Modifier;\r
+import eu.etaxonomy.cdm.model.description.State;\r
+import eu.etaxonomy.taxeditor.model.ContextListenerAdapter;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
+\r
+/**\r
+ * The context listener will call this class when the uses view is being loaded.\r
+ * It checks if the uses view's necessary terms are present in the database. \r
+ * It will persist the terms that aren't present, using the CDMLib's services classes. \r
+ * @author a.theys \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class UseObjectManager extends ContextListenerAdapter{\r
+ @Override\r
+ public void contextRefresh(IProgressMonitor monitor) {\r
+ monitor.subTask("Refreshing the Uses View");\r
+ StoreUtil.warn(getClass(), "Refreshing Uses View warn");\r
+ setupNecessaryItems(monitor);\r
+ }\r
+ \r
+ \r
+ @Override\r
+ public void contextStart(IMemento memento, IProgressMonitor monitor) {\r
+ monitor.subTask("Starting the Uses View");\r
+ StoreUtil.warn(getClass(), "Starting Uses View warn");\r
+ setupNecessaryItems(monitor);\r
+ }\r
+ \r
+ private void setupNecessaryItems(IProgressMonitor monitor) {\r
+ MarkerType existingMarkertype = (MarkerType) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseMarkerType);\r
+ TermVocabulary<State> stateVocabulary = (TermVocabulary<State>) CdmStore.getService(IVocabularyService.class).find(UsageTermCollection.uuidUseCategoryVocabulary);\r
+ Feature featureUseRecord = (Feature) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseRecordFeature);\r
+ Feature featureUseSummary = (Feature) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseSummaryFeature);\r
+ TermVocabulary<Modifier> countryVocabulary = (TermVocabulary<Modifier>) CdmStore.getService(IVocabularyService.class).find(UsageTermCollection.uuidCountryVocabulary);\r
+ TermVocabulary<Modifier> plantPartVocabulary = (TermVocabulary<Modifier>) CdmStore.getService(IVocabularyService.class).find(UsageTermCollection.uuidPlantPartVocabulary);\r
+ TermVocabulary<Modifier> humanGroupVocabulary = (TermVocabulary<Modifier>) CdmStore.getService(IVocabularyService.class).find(UsageTermCollection.uuidHumanGroupVocabulary);\r
+ \r
+ ConversationHolder conversation = CdmStore.createConversation();\r
+ if (existingMarkertype == null) {\r
+ existingMarkertype = MarkerType.NewInstance(UsageTermCollection.useMakerLabel, UsageTermCollection.useMakerLabel, null);\r
+ existingMarkertype.setUuid( UsageTermCollection.uuidUseMarkerType);\r
+ TermVocabulary<MarkerType> markerTypeVocabulary = (TermVocabulary<MarkerType>)CdmStore.getService(IVocabularyService.class).find((UsageTermCollection.uuidMarkersVocabulary));\r
+ markerTypeVocabulary.addTerm(existingMarkertype);\r
+ CdmStore.getService(IVocabularyService.class).saveOrUpdate(markerTypeVocabulary);\r
+ conversation.commit(true);\r
+ }\r
+ if (stateVocabulary == null) {\r
+ monitor.subTask("stateVocabulary empty");\r
+ URI termSourceUri = null;\r
+ try {\r
+ termSourceUri = new URI("eu.etaxonomy.cdm.model.description.State");\r
+ } catch (URISyntaxException e) {\r
+ e.printStackTrace();\r
+ }\r
+ stateVocabulary = TermVocabulary.NewInstance(UsageTermCollection.useCategoryVocabularyLabel, UsageTermCollection.useCategoryVocabularyLabel, null, termSourceUri);\r
+ stateVocabulary.setUuid(UsageTermCollection.uuidUseCategoryVocabulary);\r
+ State newDummyState = State.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);\r
+ newDummyState.setUuid(UsageTermCollection.uuidUseCategoryDummy);\r
+ State newDummySubCat = State.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);\r
+ newDummySubCat.setUuid(UsageTermCollection.uuidUseSubCategoryDummy);\r
+ newDummyState.addIncludes(newDummySubCat);\r
+ stateVocabulary.addTerm(newDummyState);\r
+ CdmStore.getService(IVocabularyService.class).saveOrUpdate(stateVocabulary);\r
+ conversation.commit(true);\r
+ }\r
+ if (countryVocabulary == null) {\r
+ monitor.subTask("countryVocabulary empty");\r
+ URI termSourceUri = null;\r
+ try {\r
+ termSourceUri = new URI("eu.etaxonomy.cdm.model.description.Modifier");\r
+ } catch (URISyntaxException e) {\r
+ e.printStackTrace();\r
+ }\r
+ countryVocabulary = TermVocabulary.NewInstance(UsageTermCollection.countryLabel, UsageTermCollection.countryLabel, null, termSourceUri);\r
+ countryVocabulary.setUuid(UsageTermCollection.uuidCountryVocabulary);\r
+ Modifier newDummyModifier = Modifier.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);\r
+ newDummyModifier.setUuid(UsageTermCollection.uuidCountryDummy);\r
+ countryVocabulary.addTerm(newDummyModifier);\r
+ CdmStore.getService(IVocabularyService.class).saveOrUpdate(countryVocabulary);\r
+ conversation.commit(true);\r
+ }\r
+ if (plantPartVocabulary == null) {\r
+ monitor.subTask("plantPartVocabulary empty");\r
+ URI termSourceUri = null;\r
+ try {\r
+ termSourceUri = new URI("eu.etaxonomy.cdm.model.description.Modifier");\r
+ } catch (URISyntaxException e) {\r
+ e.printStackTrace();\r
+ }\r
+ plantPartVocabulary = TermVocabulary.NewInstance(UsageTermCollection.plantPartLabel, UsageTermCollection.plantPartLabel, null, termSourceUri);\r
+ plantPartVocabulary.setUuid(UsageTermCollection.uuidPlantPartVocabulary);\r
+ Modifier newDummyModifier = Modifier.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);\r
+ newDummyModifier.setUuid(UsageTermCollection.uuidPlantPartDummy);\r
+ plantPartVocabulary.addTerm(newDummyModifier);\r
+ CdmStore.getService(IVocabularyService.class).saveOrUpdate(plantPartVocabulary);\r
+ conversation.commit(true);\r
+ }\r
+ if (humanGroupVocabulary == null) {\r
+ monitor.subTask("humanGroupVocabulary empty");\r
+ URI termSourceUri = null;\r
+ try {\r
+ termSourceUri = new URI("eu.etaxonomy.cdm.model.description.Modifier");\r
+ } catch (URISyntaxException e) {\r
+ e.printStackTrace();\r
+ }\r
+ humanGroupVocabulary = TermVocabulary.NewInstance(UsageTermCollection.humanGroupLabel, UsageTermCollection.humanGroupLabel, null, termSourceUri);\r
+ humanGroupVocabulary.setUuid(UsageTermCollection.uuidHumanGroupVocabulary);\r
+ Modifier newDummyModifier = Modifier.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);\r
+ newDummyModifier.setUuid(UsageTermCollection.uuidHumanGroupDummy);\r
+ Modifier newSubDummyModifier = Modifier.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);\r
+ newSubDummyModifier.setUuid(UsageTermCollection.uuidEthnicGroupDummy);\r
+ newDummyModifier.addIncludes(newSubDummyModifier);\r
+ humanGroupVocabulary.addTerm(newDummyModifier);\r
+ CdmStore.getService(IVocabularyService.class).saveOrUpdate(humanGroupVocabulary);\r
+ conversation.commit(true);\r
+ }\r
+ \r
+ if(featureUseRecord == null|| featureUseSummary == null) {\r
+ TermVocabulary<Feature> featureVocabulary = (TermVocabulary<Feature>)CdmStore.getService(IVocabularyService.class).find((UsageTermCollection.uuidFeatureVocabulary));\r
+ FeatureTree palmWebFeatureTree = CdmStore.getService(IFeatureTreeService.class).find(UsageTermCollection.uuidPalmWebFeatureTree);\r
+ \r
+ if (featureUseRecord == null ) {\r
+ featureUseRecord = Feature.NewInstance(UsageTermCollection.useRecordFeatureLabel, UsageTermCollection.useRecordFeatureLabel, null);\r
+ featureUseRecord.setUuid(UsageTermCollection.uuidUseRecordFeature);\r
+ featureUseRecord.isSupportsCategoricalData();\r
+ featureUseRecord.setSupportsCategoricalData(true);\r
+ featureVocabulary.addTerm(featureUseRecord);\r
+ FeatureNode useRecFeatureNode = FeatureNode.NewInstance(featureUseRecord);\r
+ palmWebFeatureTree.getRoot().addChild(useRecFeatureNode);\r
+ }\r
+ if (featureUseSummary == null) {\r
+ featureUseSummary = Feature.NewInstance(UsageTermCollection.useSummaryFeatureLabel, UsageTermCollection.useSummaryFeatureLabel, null);\r
+ featureUseSummary.setUuid(UsageTermCollection.uuidUseSummaryFeature);\r
+ featureUseSummary.isSupportsTextData();\r
+ featureUseSummary.setSupportsTextData(true);\r
+ featureVocabulary.addTerm(featureUseSummary);\r
+ FeatureNode useSumFeatureNode = FeatureNode.NewInstance(featureUseSummary);\r
+ palmWebFeatureTree.getRoot().addChild(useSumFeatureNode);\r
+ }\r
+ \r
+ CdmStore.getService(IVocabularyService.class).saveOrUpdate(featureVocabulary);\r
+ CdmStore.getService(IFeatureTreeService.class).saveOrUpdate(palmWebFeatureTree);\r
+ conversation.commit(true);\r
+ \r
+ }\r
+ conversation.close(); \r
+ }\r
+}\r
import org.osgi.framework.BundleContext;
import eu.etaxonomy.taxeditor.editor.EditorStateManager;
+import eu.etaxonomy.taxeditor.editor.UseObjectManager;
import eu.etaxonomy.taxeditor.store.CdmStore;
/**
super.start(context);
EditorStateManager stateManager = new EditorStateManager();
+ UseObjectManager useManager = new UseObjectManager();
CdmStore.getContextManager().addContextListener(stateManager);
+ CdmStore.getContextManager().addContextListener(useManager);
plugin = this;
logger.trace("Plugin started: " + this.getBundle().getSymbolicName());
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.model.IDirtyMarkableSelectionProvider;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
/**
* @author n.hoffmann
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectable;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ISelectable;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
/**
* @author n.hoffmann
Label label_statement = new Label(getLayoutComposite(), SWT.NULL);
label_statement.setText(getItemStatement());
- label_statement.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+ label_statement.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
Link link = new Link(getLayoutComposite(), SWT.NONE);
link.setText("<a>" + getItemLink() + "</a>");
.getActiveEditor();
IStructuredSelection selection = (IStructuredSelection) HandlerUtil
- .getActiveMenuSelection(event);
+ .getCurrentSelection(event);
if (selection.getFirstElement() instanceof PolytomousKeyNode) {
try {
.getActiveEditor();
IStructuredSelection selection = (IStructuredSelection) HandlerUtil
- .getActiveMenuSelection(event);
+ .getCurrentSelection(event);
if (selection.getFirstElement() instanceof PolytomousKeyNode) {
try {
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.swt.SWT;
import eu.etaxonomy.taxeditor.editor.name.container.AbstractGroupedContainer;
import eu.etaxonomy.taxeditor.editor.name.container.AcceptedGroup;
import eu.etaxonomy.taxeditor.editor.name.container.AcceptedNameContainer;
-import eu.etaxonomy.taxeditor.editor.name.container.ConceptGroup;
import eu.etaxonomy.taxeditor.editor.name.container.ContainerFactory;
import eu.etaxonomy.taxeditor.editor.name.container.HomotypicalSynonymGroup;
import eu.etaxonomy.taxeditor.editor.name.container.MisappliedGroup;
private ManagedForm managedForm;
private ScrolledForm scrolledForm;
private Composite parent;
- private ISelectionProvider selectionProvider;
+ private ISelectionProvider simpleSelectionProvider;
private final MultiPageTaxonEditor editor;
private final ConversationHolder conversation;
private MenuManager menuManager;
-
private Menu menu;
+ private AcceptedGroup acceptedGroup;
+ private List<HomotypicalSynonymGroup> heterotypicSynonymGroups = new ArrayList<HomotypicalSynonymGroup>();
private MisappliedGroup misappliedGroup;
- private ConceptGroup conceptGroup;
-
- private final List<HomotypicalSynonymGroup> heterotypicSynonymGroups = new ArrayList<HomotypicalSynonymGroup>();
-
private DropTarget target;
private ISelectionService selectionService;
- private AcceptedGroup acceptedGroup;
-
private TaxonBase objectAffectedByLastOperation;
/**
if (input instanceof AbstractGroupedContainer) {
selection = ((AbstractGroupedContainer) input).getData();
getSite().getSelectionProvider().setSelection(new StructuredSelection(selection));
+ }else if(input == null){
+ selection = null;
+ getSite().getSelectionProvider().setSelection(new StructuredSelection());
}
+
+
return super.setInput(input);
}
};
ContainerFactory.createOrUpdateAcceptedTaxonsHomotypicGroup(this);
ContainerFactory.createOrUpdateHeterotypicSynonymyGroups(this);
ContainerFactory.createOrUpdateMisapplicationsGroup(this);
- ContainerFactory.createOrUpdateConceptGroup(this);
// Redraw composite
managedForm.reflow(true);
public boolean postOperation(CdmBase objectAffectedByOperation) {
editor.changed(objectAffectedByOperation);
-
+
redraw(false);
if (objectAffectedByOperation instanceof TaxonBase) {
setSite(site);
setInput(input);
- selectionProvider = new SimpleSelectionProvider();
- getSite().setSelectionProvider(selectionProvider);
+ simpleSelectionProvider = new SimpleSelectionProvider();
+ getSite().setSelectionProvider(simpleSelectionProvider);
}
/**
return null;
}
- /**
- * <p>
- * Getter for the field <code>conceptGroup</code>.
- * </p>
- *
- * @return a
- * {@link eu.etaxonomy.taxeditor.editor.name.container.ConceptGroup}
- * object.
- */
- public ConceptGroup getConceptGroup() {
- return conceptGroup;
- }
-
/**
* <p>
* getDirtyNames
allGroups.add(getAcceptedGroup());
- allGroups.addAll(getHeterotypicSynonymGroups());
+ List<HomotypicalSynonymGroup> grps = getHeterotypicSynonymGroups();
+
+ heterotypicSynonymGroups = getHeterotypicSynonymGroups();
+
+ if (heterotypicSynonymGroups != null) {
+ allGroups.addAll(heterotypicSynonymGroups);
+ }
if (misappliedGroup != null) {
allGroups.add(misappliedGroup);
}
- if (conceptGroup != null) {
- allGroups.add(conceptGroup);
- }
-
return allGroups;
}
EditorUtil.getColor(Resources.COLOR_COMPOSITE_BACKGROUND));
}
- /**
- * <p>
- * Setter for the field <code>conceptGroup</code>.
- * </p>
- *
- * @param conceptGroup
- * a
- * {@link eu.etaxonomy.taxeditor.editor.name.container.ConceptGroup}
- * object.
- */
- public void setConceptGroup(ConceptGroup conceptGroup) {
- this.conceptGroup = conceptGroup;
- }
/**
* <p>
public void removeGroup(AbstractGroup group) {
if (group != null) {
group.dispose();
- getHeterotypicSynonymGroups().remove(group);
+
+ //if (heterotypicSynonymGroups != null) {
+ heterotypicSynonymGroups.remove(group);
+ //}
}
}
@Override
public void setDisabled(){
- setEnabled(false);
+ for(AbstractGroupedContainer groupedContainer : getGroupedContainers()){
+ groupedContainer.setDisabled(true);
+ }
+
+ // send an empty selection to the current provider
+ getManagedForm().setInput(null);
// coloring the widgets
}
// send an empty selection to the current provider
- selectionProvider.setSelection(new StructuredSelection());
-
- // decide on the new selection provider
-
- ISelectionProvider newSelectionProvider = enabled ? selectionProvider : new ISelectionProvider() {
-
- @Override
- public void setSelection(ISelection selection) {
-
- }
-
- @Override
- public void removeSelectionChangedListener(
- ISelectionChangedListener listener) {
-
- }
-
- @Override
- public ISelection getSelection() {
- return null;
- }
-
- @Override
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
-
- }
- };
-
- getSite().setSelectionProvider(newSelectionProvider);
-
- System.out.println("SELECTION PROVIDER" + getSite().getSelectionProvider());
+ getManagedForm().setInput(null);
}
}
focusListener = new FocusAdapter() {
@Override
public void focusGained(FocusEvent e) {
- if(!enabled){
+ if(disabled){
return;
}
for (AbstractGroupedContainer container : getEditor()
private boolean enabled;
+ private boolean disabled;
+
/**
* nonEditableInfo is a label displayed underneath a GroupedComposite's
* input field. For instance, NameComposites display things like name
*/
@Override
public boolean setFormInput(Object input) {
- // TODO Auto-generated method stub
return false;
}
*/
@Override
public boolean isStale() {
- // TODO Auto-generated method stub
return false;
}
+ public void setDisabled(boolean disabled) {
+ this.disabled = disabled;
+ setEnabled(disabled);
+ }
+
public void setEnabled(boolean enabled) {
this.enabled = enabled;
Color color = enabled ? control.getForeground() : EditorUtil.getColor(Resources.COLOR_DISABLED_EDITOR);
TaxonNameEditor taxonNameEditor) {
List<HomotypicalSynonymGroup> retainedGroups = new ArrayList<HomotypicalSynonymGroup>();
- for(HomotypicalSynonymGroup group : taxonNameEditor.getHeterotypicSynonymGroups()){
- retainedGroups.add(group);
+ List<HomotypicalSynonymGroup> heterotypicSynonymGroups = taxonNameEditor.getHeterotypicSynonymGroups();
+
+ if (heterotypicSynonymGroups != null) {
+
+ for(HomotypicalSynonymGroup group : heterotypicSynonymGroups){
+ retainedGroups.add(group);
+ }
}
for(HomotypicalGroup homotypicalGroup : taxonNameEditor.getTaxon().getHeterotypicSynonymyGroups()){
}
- /**
- * @param taxonNameEditor
- */
- public static void createOrUpdateConceptGroup(
- TaxonNameEditor taxonNameEditor) {
- Set<TaxonRelationship> filteredTaxonRelations = new HashSet<TaxonRelationship>();
-
- for (TaxonRelationship relationship : taxonNameEditor.getTaxon().getTaxonRelations()) {
- if (! relationship.getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR()) ||
- relationship.getType().equals(TaxonRelationshipType.TAXONOMICALLY_INCLUDED_IN())) {
- filteredTaxonRelations.add(relationship);
- }
- }
-
- if(! filteredTaxonRelations.isEmpty()){
- taxonNameEditor.setConceptGroup(new ConceptGroup(taxonNameEditor));
- }
- }
-
}
import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
import eu.etaxonomy.taxeditor.editor.name.operation.ChangeAcceptedTaxonToSynonymOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonNodeSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
/**
* <p>ChangeAcceptedTaxonToSynonymHandler class.</p>
import eu.etaxonomy.taxeditor.editor.name.operation.ChangeSynonymToAcceptedTaxonOperation;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonNodeSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
/**
* <p>ChangeSynonymToAcceptedTaxonHandler class.</p>
}
// Get synonym from selection
- StructuredSelection selection = (StructuredSelection) HandlerUtil.getActiveMenuSelection(event);
+ StructuredSelection selection = (StructuredSelection) HandlerUtil.getCurrentSelection(event);
if (!(selection.getFirstElement() instanceof Synonym)) {
logger.error("Selection does not contain a Synonym");
return null;
public Object execute(ExecutionEvent event) throws ExecutionException {
TaxonNameEditor editor = (TaxonNameEditor) EditorUtil.getActiveEditorPage(
Page.NAME);
- ISelection menuSelection = HandlerUtil.getActiveMenuSelection(event);
+ ISelection menuSelection = HandlerUtil.getCurrentSelection(event);
Object selecteObject = ((StructuredSelection) menuSelection).getFirstElement();
TaxonNameEditor editor = (TaxonNameEditor) EditorUtil.getActiveEditorPage(
Page.NAME);
- IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getActiveMenuSelection(event);
+ IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
TaxonBase selectedTaxonBase = (TaxonBase) selection.getFirstElement();
TaxonNameEditor editor = (TaxonNameEditor) EditorUtil.getActiveEditorPage(
Page.NAME);
- IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getActiveMenuSelection(event);
+ IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
TaxonBase selectedTaxonBase = (TaxonBase) selection.getFirstElement();
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
import org.eclipse.core.commands.common.NotDefinedException;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.handlers.HandlerUtil;
+import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.taxon.Synonym;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
-import eu.etaxonomy.taxeditor.editor.Page;
-import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
import eu.etaxonomy.taxeditor.editor.name.operation.SwapSynonymAndAcceptedOperation;
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
/**
* <p>SwapSynonymAndAcceptedHandler class.</p>
* @version 1.0
*/
public class SwapSynonymAndAcceptedHandler extends AbstractHandler implements
- IHandler {
+ IHandler, IPostOperationEnabled {
private static final Logger logger = Logger
.getLogger(SwapSynonymAndAcceptedHandler.class);
+ private MultiPageTaxonEditor editor;
+ private Taxon taxon;
/* (non-Javadoc)
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
*/
/** {@inheritDoc} */
public Object execute(ExecutionEvent event) throws ExecutionException {
- MultiPageTaxonEditor multiEditor = EditorUtil.getActiveMultiPageTaxonEditor();
-
- TaxonNameEditor editor = (TaxonNameEditor) multiEditor.getPage(Page.NAME);
-
+ editor = EditorUtil.getActiveMultiPageTaxonEditor();
+ Shell shell = HandlerUtil.getActiveShell(event);
Synonym synonym = (Synonym) EditorUtil.getSelection(event).getFirstElement();
-
- SwapSynonymAndAcceptedOperation operation;
+
+ // Force user to save taxon - not really necessary though, is it?
+ if (!EditorUtil.forceUserSave(editor, shell)) {
+ return null;
+ }
try {
- operation = new SwapSynonymAndAcceptedOperation(event.getCommand().getName(), editor.getUndoContext(),
- editor.getTaxon(), synonym, editor);
+ SwapSynonymAndAcceptedOperation operation = new SwapSynonymAndAcceptedOperation(event.getCommand().getName(), editor.getUndoContext(),
+ editor.getTaxon(), synonym, this);
+
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
return null;
}
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.operation.IPostOperationEnabled#postOperation(eu.etaxonomy.cdm.model.common.CdmBase, boolean)
+ */
+ @Override
+ public boolean postOperation(CdmBase objectAffectedByOperation) {
+ // Redraw existing editor
+ //((IPostOperationEnabled) editor).postOperation(null);
+
+ editor.doSave(EditorUtil.getMonitor());
+ editor.close(true);
+
+ if (objectAffectedByOperation instanceof Taxon) {
+
+ taxon = (Taxon) objectAffectedByOperation;
+
+
+ }
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.operation.IPostOperationEnabled#onComplete()
+ */
+ @Override
+ public boolean onComplete() {
+ Display display = Display.getCurrent();
+ display.asyncExec(new Runnable() {
+ public void run() {
+ try {
+ EditorUtil.openTaxonBase(taxon.getUuid());
+
+ } catch (Exception e) {
+ EditorUtil.warningDialog("Could not open editor for taxon", this, e.getMessage());
+ }
+
+ }
+ });
+ return true;
+ }
}
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
import eu.etaxonomy.cdm.api.service.ITaxonService;
+import eu.etaxonomy.cdm.api.service.exception.HomotypicalGroupChangeException;
import eu.etaxonomy.cdm.model.taxon.ITreeNode;
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.store.CdmStore;
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- newTaxon = CdmStore.getService(ITaxonService.class).changeSynonymToAcceptedTaxon(synonym, taxon, true, true, null, null);
+ try {
+ newTaxon = CdmStore.getService(ITaxonService.class).changeSynonymToAcceptedTaxon(synonym, taxon, true, true, null, null);
+ } catch (HomotypicalGroupChangeException e) {
+ EditorUtil.warningDialog("Operation may lead to inconsistent data", getClass(), e.getMessage());
+ }
monitor.worked(20);
synonym.setSec(null);
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import eu.etaxonomy.cdm.api.service.ITaxonService;
+import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.store.CdmStore;
@Override
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
-
+
monitor.worked(20);
CdmStore.getService(ITaxonService.class).swapSynonymAndAcceptedTaxon(synonym, taxon);
import org.eclipse.jface.viewers.StyledString;
import org.eclipse.swt.graphics.Image;
+import eu.etaxonomy.cdm.model.common.Language;
+import eu.etaxonomy.cdm.model.common.Representation;
+import eu.etaxonomy.cdm.model.reference.IReference;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
import eu.etaxonomy.taxeditor.model.ImageResources;
+import eu.etaxonomy.taxeditor.model.TaxonRelationshipTypeInverseContainer;
+import eu.etaxonomy.taxeditor.store.CdmStore;
/**
* @author n.hoffmann
@Override
public Image getImage(Object element) {
if(element instanceof TaxonRelationship){
- TaxonRelationshipType type = ((TaxonRelationship) element).getType();
-
- return getTaxonRelationshipImage(type);
+ return getTaxonRelationshipImage((TaxonRelationship) element);
}
return super.getImage(element);
}
@Override
public String getText(Object element) {
if(element instanceof TaxonRelationship){
- TaxonRelationship relationship = (TaxonRelationship) element;
-
- return String.format("%s %s %s", relationship.getFromTaxon(), relationship.getType().getLabel(), relationship.getToTaxon());
+ return formatRelationship((TaxonRelationship) element);
}
return "";
}
+ /**
+ * Creates a string that holds a representation of the {@link TaxonRelationship} in relation to
+ * the accepted taxon of the currently active {@link MultiPageTaxonEditor}.
+ *
+ * @param relationship
+ * @return a formatted String representation of the relationship
+ */
+ private String formatRelationship(TaxonRelationship relationship){
+ Taxon sourceTaxon = EditorUtil.getActiveMultiPageTaxonEditor().getTaxon();
+ TaxonRelationshipTypeInverseContainer container = TaxonRelationshipTypeInverseContainer.CreateFromSource(sourceTaxon, relationship);
+ Taxon relatedTaxon = TaxonRelationshipTypeInverseContainer.RelatedTaxon(sourceTaxon, relationship);
+ String string = String.format("%s %s", container.getAbbreviatedLabel(), relatedTaxon);
+
+ return string;
+ }
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider#getStyledText(java.lang.Object)
*/
}
/**
+ * TODO we will get the proper relationship symbol from the type's abbreviated label as a character.
+ * The image may be omitted then.
+ *
* @param type
* @return
*/
- public Image getTaxonRelationshipImage(TaxonRelationshipType type) {
-
+ private Image getTaxonRelationshipImage(TaxonRelationship relationship) {
+ TaxonRelationshipType type = (relationship).getType();
return ImageResources.getImage(ImageResources.CONCEPT_ICON);
}
}
--- /dev/null
+/**
+ *
+ */
+package eu.etaxonomy.taxeditor.editor.view.concept.graph;
+
+import java.util.Set;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.zest.core.viewers.IGraphContentProvider;
+
+
+
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
+import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
+
+/**
+ * @author andreas
+ *
+ */
+public class ConceptGraphContentProvider implements IGraphContentProvider {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ @Override
+ public void dispose() {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.zest.core.viewers.IGraphContentProvider#getSource(java.lang.Object)
+ */
+ @Override
+ public Object getSource(Object taxonRelationship) {
+ return ((TaxonRelationship)taxonRelationship).getFromTaxon();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.zest.core.viewers.IGraphContentProvider#getDestination(java.lang.Object)
+ */
+ @Override
+ public Object getDestination(Object taxonRelationship) {
+ return ((TaxonRelationship)taxonRelationship).getToTaxon();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.zest.core.viewers.IGraphContentProvider#getElements(java.lang.Object)
+ */
+ @Override
+ public Object[] getElements(Object inputElement) {
+ if(inputElement instanceof TaxonEditorInput){
+ Taxon taxon = ((TaxonEditorInput) inputElement).getTaxon();
+
+ Map<String, TaxonRelationship> filteredTaxonRelations = new HashMap<String, TaxonRelationship>();
+ getTaxonRelationshipsRecursive(filteredTaxonRelations, taxon);
+
+ return filteredTaxonRelations.values().toArray();
+ }
+ return new Object[0];
+ }
+
+ private void getTaxonRelationshipsRecursive(Map<String, TaxonRelationship> filteredTaxonRelations, Taxon taxon) {
+ // TODO extract method into new class TaxonHelper in
+ // eu.etaxonomy.taxeditor.model;
+ // see also ConceptContentProvider
+ for (TaxonRelationship relationship : taxon.getTaxonRelations()) {
+
+ if (!relationship.getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR())
+ && !relationship.getType().equals(TaxonRelationshipType.INVALID_DESIGNATION_FOR())
+ && !relationship.getType().equals(TaxonRelationshipType.TAXONOMICALLY_INCLUDED_IN())) {
+
+ if(!relationship.getToTaxon().equals(taxon)){
+ continue;
+ }
+
+ String key = relationship.getFromTaxon().getUuid().toString() + relationship.getType().getUuid();
+ if(!filteredTaxonRelations.containsKey(key)) {
+ filteredTaxonRelations.put(key, relationship);
+ Taxon toTaxon = relationship.getToTaxon();
+ if(toTaxon != null){
+ getTaxonRelationshipsRecursive(filteredTaxonRelations, toTaxon);
+
+ }
+ }
+ }
+
+
+ }
+
+
+ }
+
+}
--- /dev/null
+/**
+ *
+ */
+package eu.etaxonomy.taxeditor.editor.view.concept.graph;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.zest.core.viewers.IEntityStyleProvider;
+
+import eu.etaxonomy.cdm.model.common.Language;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author andreas
+ *
+ */
+public class ConceptGraphLabelProvider extends LabelProvider implements
+ IEntityStyleProvider {
+
+
+
+ @Override
+ public String getText(Object element) {
+ if(element instanceof Taxon){
+ return ((Taxon)element).getTitleCache();
+ } else if( element instanceof TaxonRelationship) {
+ return ((TaxonRelationship)element).getType().getRepresentation(Language.ENGLISH()).getAbbreviatedLabel();
+ }
+ return "TODO";
+ }
+
+ @Override
+ public Color getNodeHighlightColor(Object entity) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Color getBorderColor(Object entity) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Color getBorderHighlightColor(Object entity) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public int getBorderWidth(Object entity) {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public Color getBackgroundColour(Object entity) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Color getForegroundColour(Object entity) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public IFigure getTooltip(Object element) {
+ if( element instanceof TaxonRelationship) {
+ return new Label(((TaxonRelationship)element).getType().getRepresentation(CdmStore.getDefaultLanguage()).getLabel());
+ }
+ return null;
+ }
+
+ @Override
+ public boolean fisheyeNode(Object entity) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+}
--- /dev/null
+/**
+ *
+ */
+package eu.etaxonomy.taxeditor.editor.view.concept.graph;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.zest.core.viewers.GraphViewer;
+import org.eclipse.zest.core.widgets.ZestStyles;
+import org.eclipse.zest.layouts.LayoutAlgorithm;
+import org.eclipse.zest.layouts.LayoutStyles;
+import org.eclipse.zest.layouts.algorithms.TreeLayoutAlgorithm;
+
+import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.editor.key.AbstractGraphKeyEditor;
+import eu.etaxonomy.taxeditor.view.AbstractCdmEditorViewPart;
+
+/**
+ * @author andreas
+ *
+ */
+public class ConceptGraphView extends AbstractCdmEditorViewPart {
+
+ public static final String ID = "eu.etaxonomy.taxeditor.editor.view.concept.graph";
+
+ private GraphViewer viewer;
+ private LayoutAlgorithm layoutAlgoritm;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void selectionChanged(IWorkbenchPart part, ISelection selection) {
+
+// if(part instanceof ConceptGraphView){
+// // ConceptGraphView is maximized
+// return;
+// }
+
+ if(EditorUtil.getActiveEditor() == null){
+ showEmptyPage();
+ return;
+ }
+
+ if(part instanceof BulkEditor){
+ showEmptyPage();
+ return;
+ }
+
+
+ if(part instanceof MultiPageTaxonEditor){
+ if(! part.equals(this.part)){
+ IEditorInput input = ((IEditorPart) part).getEditorInput();
+ showViewer(part, new StructuredSelection(input));
+ }
+ showViewer();
+ }
+
+ }
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.operation.IPostOperationEnabled#onComplete()
+ */
+ @Override
+ public boolean onComplete() {
+ // TODO IGNORED
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.view.AbstractCdmViewPart#getViewer()
+ */
+ @Override
+ public Viewer getViewer() {
+ return viewer;
+ }
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.view.AbstractCdmViewPart#createViewer(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ public void createViewer(Composite parent) {
+
+ viewer = new GraphViewer(parent, SWT.NONE);
+ getSite().setSelectionProvider(viewer);
+
+ viewer.setContentProvider(new ConceptGraphContentProvider());
+ viewer.setLabelProvider(new ConceptGraphLabelProvider());
+
+ viewer.setConnectionStyle(ZestStyles.CONNECTIONS_DIRECTED);
+
+ viewer.setLayoutAlgorithm(getLayoutAlgoritm(), false);
+
+// createMenu();
+//
+// createToolbar();
+
+
+ }
+
+ private LayoutAlgorithm getLayoutAlgoritm() {
+
+ if (layoutAlgoritm == null) {
+ // layoutAlgoritm = new CompositeLayoutAlgorithm(
+ // LayoutStyles.NO_LAYOUT_NODE_RESIZING,
+ // new LayoutAlgorithm[] {
+ // new TreeLayoutAlgorithm(
+ // LayoutStyles.NO_LAYOUT_NODE_RESIZING),
+ // new HorizontalShift(
+ // LayoutStyles.NO_LAYOUT_NODE_RESIZING) });
+
+ layoutAlgoritm = new TreeLayoutAlgorithm(
+ LayoutStyles.NO_LAYOUT_NODE_RESIZING);
+ layoutAlgoritm.setEntityAspectRatio(0.5);
+ }
+ return layoutAlgoritm;
+ }
+
+}
*/
package eu.etaxonomy.taxeditor.editor.view.concept.handler;
-import java.util.Arrays;
-import java.util.List;
-
import org.eclipse.jface.action.ContributionItem;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.ui.handlers.IHandlerService;
-import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
+import eu.etaxonomy.taxeditor.model.TaxonRelationshipTypeInverseContainer;
import eu.etaxonomy.taxeditor.store.CdmStore;
/**
* @version 1.0
*/
public abstract class AbstractDynamicConceptRelationMenu extends ContributionItem {
-
- private static List<TaxonRelationshipType> excludeRelationshipTypes = Arrays.asList(new TaxonRelationshipType[]{
- TaxonRelationshipType.TAXONOMICALLY_INCLUDED_IN(),
- TaxonRelationshipType.MISAPPLIED_NAME_FOR(),
- TaxonRelationshipType.ALL_RELATIONSHIPS()
- });
/*
* (non-Javadoc)
@Override
public void fill(Menu menu, int index){
final IHandlerService handlerService = (IHandlerService) TaxeditorEditorPlugin.getDefault().getWorkbench().getService(IHandlerService.class);
-
- List<TaxonRelationshipType> relationshipTypes = CdmStore.getTermManager().getPreferredTaxonRelationshipTypes();
- relationshipTypes.removeAll(excludeRelationshipTypes);
-
- for(final TaxonRelationshipType type : relationshipTypes){
+ for(final TaxonRelationshipTypeInverseContainer container : CdmStore.getTermManager().getPreferredTerms(TaxonRelationshipTypeInverseContainer.class)){
MenuItem menuItem = new MenuItem(menu, -1);
- menuItem.setText(type.getLabel());
- menuItem.setData(type);
+ menuItem.setText(container.getTitleCache());
+ menuItem.setData(container);
menuItem.addSelectionListener(new SelectionListener(){
public void widgetDefaultSelected(SelectionEvent e) {}
public void widgetSelected(SelectionEvent ev) {
Event event = new Event();
- event.data = type;
+ event.data = container;
try {
handlerService.executeCommand(getCommandName(), event);
} catch (Exception e) {
* @return a {@link java.lang.String} object.
*/
public abstract String getCommandName();
+
}
package eu.etaxonomy.taxeditor.editor.view.concept.handler;
+import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.common.NotDefinedException;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.runtime.Status;
import org.eclipse.swt.widgets.Event;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.handlers.HandlerUtil;
-import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
-import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.Page;
import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
import eu.etaxonomy.taxeditor.editor.view.concept.operation.CreateConceptRelationOperation;
+import eu.etaxonomy.taxeditor.model.TaxonRelationshipTypeInverseContainer;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
-import eu.etaxonomy.taxeditor.parser.ParseHandler;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonBaseSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonBaseSelectionDialog;
/**
* <p>CreateConceptRelationHandler class.</p>
* @version 1.0
*/
public class CreateConceptRelationHandler extends AbstractHandler {
- private static final Logger logger = Logger
- .getLogger(CreateConceptRelationHandler.class);
-
+
/* (non-Javadoc)
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
*/
TaxonNameEditor editor = (TaxonNameEditor) EditorUtil.getActiveEditorPage(
Page.NAME);
- Taxon relatedConcept = TaxonBaseSelectionDialog.selectTaxon(HandlerUtil.getActiveShell(event), editor.getConversationHolder());
-
- TaxonRelationshipType type = (TaxonRelationshipType) ((Event)event.getTrigger()).data;
+ Taxon taxonToBeFiltered = editor.getTaxon();
+ /* we need to get the activePart before calling TaxonBaseSelectionDialog.selectTaxon(), otherwise the
+ * the variable of the parent applicationContext in event are overwritten during this method call
+ * this is Linux specific bugfix see: #2685 ([LINUX] Editing concept relationships does not work under linux)
+ */
IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
+
+ Taxon relatedConcept = TaxonBaseSelectionDialog.selectTaxon(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), taxonToBeFiltered);
+
+
+ if(relatedConcept == null){
+ return Status.CANCEL_STATUS;
+ }
+
+ TaxonRelationshipTypeInverseContainer typeInverseContainer = (TaxonRelationshipTypeInverseContainer) ((Event)event.getTrigger()).data;
+
+
IPostOperationEnabled postOperationEnabled = (activePart instanceof IPostOperationEnabled) ? (IPostOperationEnabled) activePart : null;
try {
AbstractPostOperation operation = new CreateConceptRelationOperation(event.getCommand().getName(),
- editor.getUndoContext(), editor.getTaxon(), relatedConcept, type, postOperationEnabled);
+ editor.getUndoContext(), editor.getTaxon(), relatedConcept, typeInverseContainer, postOperationEnabled);
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ EditorUtil.warn(getClass(), "Command name not set");
}
return null;
public Object execute(ExecutionEvent event) throws ExecutionException {
MultiPageTaxonEditor editor = EditorUtil.getActiveMultiPageTaxonEditor();
- ISelection selection = HandlerUtil.getActiveMenuSelection(event);
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
if(selection instanceof IStructuredSelection){
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
+import eu.etaxonomy.taxeditor.model.TaxonRelationshipTypeInverseContainer;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
public class CreateConceptRelationOperation extends AbstractPostOperation {
private Taxon concept;
- private TaxonRelationshipType taxonRelationshipType;
+ private TaxonRelationshipTypeInverseContainer taxonRelationshipTypeInverseContainer;
/**
* <p>Constructor for CreateConceptRelationOperation.</p>
* @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
*/
public CreateConceptRelationOperation(String label,
- IUndoContext undoContext, Taxon taxon, Taxon concept, TaxonRelationshipType taxonRelationshipType
+ IUndoContext undoContext, Taxon taxon, Taxon concept, TaxonRelationshipTypeInverseContainer taxonRelationshipTypeInverseContainer
, IPostOperationEnabled postOperationEnabled) {
super(label, undoContext, taxon, postOperationEnabled);
this.concept = concept;
- this.taxonRelationshipType = taxonRelationshipType;
+ this.taxonRelationshipTypeInverseContainer = taxonRelationshipTypeInverseContainer;
+ }
+
+ public CreateConceptRelationOperation(String label,
+ IUndoContext undoContext, Taxon taxon, Taxon concept, TaxonRelationshipType taxonRelationshipType
+ , IPostOperationEnabled postOperationEnabled) {
+ this(label, undoContext, taxon, concept, new TaxonRelationshipTypeInverseContainer(taxonRelationshipType, false), postOperationEnabled);
}
/* (non-Javadoc)
monitor.worked(20);
// add concept to taxon
- concept.addTaxonRelation(taxon, taxonRelationshipType, null, null);
+ if(taxonRelationshipTypeInverseContainer.isInverse()){
+ concept.addTaxonRelation(taxon, taxonRelationshipTypeInverseContainer.getType(), null, null);
+ } else {
+ taxon.addTaxonRelation(concept, taxonRelationshipTypeInverseContainer.getType(), null, null);
+ }
monitor.worked(40);
// redraw editor if exists
public IStatus undo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- taxon.removeTaxon(concept, taxonRelationshipType);
+ taxon.removeTaxon(concept, taxonRelationshipTypeInverseContainer.getType());
// redraw editor if exists
return postExecute(null);
/**
* @param viewer
*/
- protected DescriptionElementDropAdapter(Viewer viewer) {
+ public DescriptionElementDropAdapter(Viewer viewer) {
super(viewer);
}
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;
+import eu.etaxonomy.cdm.api.service.ITermService;
+import eu.etaxonomy.cdm.model.common.Marker;
+import eu.etaxonomy.cdm.model.common.MarkerType;
import eu.etaxonomy.cdm.model.description.DescriptionBase;
+import eu.etaxonomy.cdm.model.description.Feature;
import eu.etaxonomy.cdm.model.description.FeatureTree;
import eu.etaxonomy.cdm.model.description.TaxonDescription;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
+import eu.etaxonomy.taxeditor.editor.UsageTermCollection;
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
import eu.etaxonomy.taxeditor.model.FeatureNodeContainerTree;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.store.TermStore;
/**
*/
public class DescriptiveContentProvider implements ITreeContentProvider {
- private static final Object[] NO_CHILDREN = new Object[0];
- private Map<TaxonDescription, FeatureNodeContainerTree> featureNodeContainerCache;
+ protected static final Object[] NO_CHILDREN = new Object[0];
+ protected Map<TaxonDescription, FeatureNodeContainerTree> featureNodeContainerCache;
/**
* <p>Constructor for DescriptiveContentProvider.</p>
// create a transient tree with all features if none was selected
if(featureTree == null){
- featureTree = FeatureTree.NewInstance(TermStore.getFeatures());
+ featureTree = FeatureTree.NewInstance(TermStore.getTerms(Feature.class));
}
return featureTree;
* @param parentElement
* @return
*/
- private List<DescriptionBase> getDescriptions(TaxonEditorInput parentElement) {
+ protected List<DescriptionBase> getDescriptions(TaxonEditorInput parentElement) {
Taxon taxon = parentElement.getTaxon();
List<DescriptionBase> descriptions = new ArrayList<DescriptionBase>();
for(DescriptionBase description : taxon.getDescriptions()){
if(! description.isImageGallery()){
- descriptions.add(description);
+ MarkerType useMarkertype = (MarkerType) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseMarkerType);
+ Set<Marker> descriptionMarkers = description.getMarkers();
+ if(descriptionMarkers != null && !descriptionMarkers.isEmpty()) {
+ for (Marker marker: descriptionMarkers) {
+ if(!(marker.getMarkerType().equals(useMarkertype))) {
+ descriptions.add(description);
+ }
+ }
+ }
+ else {
+ descriptions.add(description);
+ }
}
+
}
return descriptions;
}
/**
- *
- */
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
package eu.etaxonomy.taxeditor.editor.view.descriptive;
import org.eclipse.jface.viewers.ColumnLabelProvider;
import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;
import eu.etaxonomy.taxeditor.editor.key.AbstractGraphKeyEditor;
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
import eu.etaxonomy.taxeditor.model.FeatureNodeContainerTree;
/** Constant <code>ID="eu.etaxonomy.taxeditor.editor.view.desc"{trunked}</code> */
public static final String ID = "eu.etaxonomy.taxeditor.editor.view.descriptive";
- private TreeViewer viewer;
+ protected TreeViewer viewer;
- private Map<TaxonDescription, FeatureNodeContainerTree> featureNodeContainerCache = new HashMap<TaxonDescription, FeatureNodeContainerTree>();
+ protected Map<TaxonDescription, FeatureNodeContainerTree> featureNodeContainerCache = new HashMap<TaxonDescription, FeatureNodeContainerTree>();
- private ToggleDescriptionAction showAllElementsAction;
+ protected ToggleDescriptionAction showAllElementsAction;
- private ToggleDescriptionAction hideAllElementsAction;
+ protected ToggleDescriptionAction hideAllElementsAction;
- private int dndOperations = DND.DROP_COPY | DND.DROP_MOVE;
+ protected int dndOperations = DND.DROP_COPY | DND.DROP_MOVE;
/** {@inheritDoc} */
@Override
public void createViewer(Composite parent) {
-
viewer = new TreeViewer(new Tree(parent, SWT.MULTI | SWT.H_SCROLL
| SWT.V_SCROLL | SWT.FULL_SELECTION));
-
viewer.setContentProvider(new DescriptiveContentProvider(featureNodeContainerCache));
viewer.setLabelProvider(new DescriptiveLabelProvider());
-
viewer.setSorter(new DescriptiveViewerSorter());
-
viewer.setAutoExpandLevel(2);
-
-
Transfer[] transfers = new Transfer[] { DescriptionElementTransfer.getInstance() };
viewer.addDragSupport(dndOperations, transfers, new DescriptionElementDragListener(
this));
return super.getInitialSelection();
}
- private void createToolbar() {
+ protected void createToolbar() {
IToolBarManager toolBarManager = getViewSite().getActionBars().getToolBarManager();
toolBarManager.add(showAllElementsAction);
toolBarManager.add(hideAllElementsAction);
/*
* TODO add to the views menu
*/
- private void createMenu(){
+ protected void createMenu(){
MenuManager menuManager = new MenuManager();
menuManager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
return;
}
+ if(part instanceof DefinedTermEditor){
+ showEmptyPage();
+ return;
+ }
+
if(part instanceof MultiPageTaxonEditor){
if(! part.equals(this.part)){
IEditorInput input = ((IEditorPart) part).getEditorInput();
* @created May 28, 2010
* @version 1.0
*/
- private class ToggleDescriptionAction extends Action{
+ protected class ToggleDescriptionAction extends Action{
private boolean expanded;
public ToggleDescriptionAction(boolean expand){
TaxonDescription description = null;
- ISelection selection = HandlerUtil.getActiveMenuSelection(event);
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
if (selection instanceof ITreeSelection) {
TreePath[] paths = ((ITreeSelection) selection).getPaths();
Object firstSegment = paths[0].getFirstSegment();
}
if (description != null) {
-
- Feature feature = (Feature) ((Event) event.getTrigger()).data;
-
AbstractPostOperation operation = null;
try {
// TODO use undo context specific to editor
- operation = new CreateDescriptionElementOperation(event
- .getCommand().getName(),
- EditorUtil.getUndoContext(), taxon,
- description, feature, postOperationEnabled);
+ operation = operationCreationInstance(event.getCommand().getName(), event, taxon, description, postOperationEnabled);
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
EditorUtil.warn(getClass(), "Command name not set");
return null;
}
+
+ /**
+ * Added to make the Class more generic and limit the amount of code changes required
+ * @param label
+ * @param event
+ * @param taxon
+ * @param description
+ * @param postOperationEnabled
+ * @return
+ */
+ protected AbstractPostOperation operationCreationInstance(String label, ExecutionEvent event, Taxon taxon, TaxonDescription description, IPostOperationEnabled postOperationEnabled) {
+ Feature feature = (Feature) ((Event) event.getTrigger()).data;
+ return new CreateDescriptionElementOperation(label,
+ EditorUtil.getUndoContext(), taxon,
+ description, feature, postOperationEnabled);
+ }
+
}
// $Id$
/**
-* Copyright (C) 2007 EDIT
+* Copyright (C) 2011 EDIT
* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
*
* See LICENSE.TXT at the top of this package for the full license terms.
*/
package eu.etaxonomy.taxeditor.editor.view.descriptive.handler;
+
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
Taxon taxon = ((TaxonEditorInput) input).getTaxon();
AbstractPostOperation operation;
try {
- // TODO use undo context specific to editor
- operation = new CreateTaxonDescriptionOperation(event.getCommand().getName(),
- EditorUtil.getUndoContext(), taxon, postOperationEnabled);
+
+ operation = createOperationInstance(event.getCommand().getName(), taxon, postOperationEnabled);
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
EditorUtil.warn(getClass(), "Command name not set.");
}
return null;
}
+
+ /**Comments for funtion createOperationInstance
+ * The function is used to make the specific object creation more generic
+ * @param eventLabel
+ * @param taxon
+ * @param postOperationEnabled
+ * @return
+ */
+ protected AbstractPostOperation createOperationInstance(String eventLabel, Taxon taxon, IPostOperationEnabled postOperationEnabled) {
+ // TODO use undo context specific to editor
+ return new CreateTaxonDescriptionOperation(eventLabel, EditorUtil.getUndoContext(), taxon, postOperationEnabled);
+ }
+
}
// $Id$
/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
+ * Copyright (C) 2007 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
package eu.etaxonomy.taxeditor.editor.view.descriptive.handler;
import eu.etaxonomy.cdm.model.description.FeatureTree;
import eu.etaxonomy.cdm.model.description.TaxonDescription;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.UsageTermCollection;
import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptiveViewPart;
import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.CreateDescriptionElementOperation;
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
import eu.etaxonomy.taxeditor.store.CdmStore;
/**
- * <p>DynamicFeatureMenu class.</p>
- *
+ * <p>
+ * DynamicFeatureMenu class.
+ * </p>
+ *
* @author n.hoffmann
* @created 17.04.2009
* @version 1.0
*/
public class DynamicFeatureMenu extends CompoundContributionItem {
-
- private ISelectionService selectionService = EditorUtil.getActivePart().getSite().getWorkbenchWindow().getSelectionService();
- private IHandlerService handlerService = (IHandlerService) EditorUtil.getService(IHandlerService.class);
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
+
+ private ISelectionService selectionService = EditorUtil.getActivePart()
+ .getSite().getWorkbenchWindow().getSelectionService();
+ private IHandlerService handlerService = (IHandlerService) EditorUtil
+ .getService(IHandlerService.class);
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
*/
/** {@inheritDoc} */
@Override
protected IContributionItem[] getContributionItems() {
-
- return new IContributionItem[] {
- new ContributionItem() {
- public void fill(Menu menu, int index){
-
- ISelection selection = selectionService.getSelection(DescriptiveViewPart.ID);
-
- if(selection instanceof IStructuredSelection){
- IStructuredSelection structuredSelection = (IStructuredSelection) selection;
- Object selectedElement = structuredSelection.getFirstElement();
-
- if(selectedElement instanceof TaxonDescription){
- FeatureTree featureTree = getFeatureTree((TaxonDescription) selectedElement);
-
- for(FeatureNode childNode : featureTree.getRootChildren()){
- createMenuItem(menu, childNode.getFeature());
- }
- }
- else if(selectedElement instanceof FeatureNodeContainer){
- FeatureNode featureNode = ((FeatureNodeContainer) selectedElement).getFeatureNode();
-
- // add the feature to the menu
- createMenuItem(menu, featureNode.getFeature());
-
- // add possible children to the menu
- for(FeatureNode childNode : featureNode.getChildren()){
- createMenuItem(menu, childNode.getFeature());
- }
- }
- else if(selectedElement instanceof DescriptionElementBase){
- Feature feature = ((DescriptionElementBase) selectedElement).getFeature();
- createMenuItem(menu, feature);
- }
- }
+
+ return new IContributionItem[] { new ContributionItem() {
+ public void fill(Menu menu, int index) {
+
+ ISelection selection = selectionService
+ .getSelection(DescriptiveViewPart.ID);
+
+ if (selection instanceof IStructuredSelection) {
+ IStructuredSelection structuredSelection = (IStructuredSelection) selection;
+ Object selectedElement = structuredSelection
+ .getFirstElement();
+
+ if (selectedElement instanceof TaxonDescription) {
+ FeatureTree featureTree = getFeatureTree((TaxonDescription) selectedElement);
+
+ for (FeatureNode childNode : featureTree.getRootChildren()) {
+ createMenuItem(menu, childNode.getFeature());
+
+ }
+ } else if (selectedElement instanceof FeatureNodeContainer) {
+ FeatureNode featureNode = ((FeatureNodeContainer) selectedElement)
+ .getFeatureNode();
+
+ // add the feature to the menu
+ createMenuItem(menu, featureNode.getFeature());
+
+ // add possible children to the menu
+ for (FeatureNode childNode : featureNode.getChildren()) {
+ createMenuItem(menu, childNode.getFeature());
+ }
+ } else if (selectedElement instanceof DescriptionElementBase) {
+ Feature feature = ((DescriptionElementBase) selectedElement)
+ .getFeature();
+ createMenuItem(menu, feature);
}
}
- };
- }
-
+ }
+ } };
+ }
+
private void createMenuItem(Menu menu, final Feature feature) {
MenuItem menuItem = new MenuItem(menu, -1);
- final Feature deproxiedFeature = (Feature) HibernateProxyHelper.deproxy(feature);
+ final Feature deproxiedFeature = (Feature) HibernateProxyHelper
+ .deproxy(feature);
+
menuItem.setText(deproxiedFeature.getLabel());
- menuItem.addSelectionListener(new SelectionListener(){
+ menuItem.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {}
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
public void widgetSelected(SelectionEvent ev) {
Event event = new Event();
event.data = deproxiedFeature;
try {
- handlerService.executeCommand(CreateDescriptionElementOperation.ID, event);
+ handlerService.executeCommand(
+ CreateDescriptionElementOperation.ID, event);
} catch (Exception e) {
EditorUtil.error(getClass(), e);
}
- }
+ }
});
+
}
-
+
/**
* Retrieves the feature tree associated with the given description
*
- * TODO as of now this is always the same thing because feature trees may not be associated
- * to descriptions yet.
+ * TODO as of now this is always the same thing because feature trees may
+ * not be associated to descriptions yet.
*
* @param description
* @return
*/
- private FeatureTree getFeatureTree(DescriptionBase description){
+ private FeatureTree getFeatureTree(DescriptionBase description) {
FeatureTree featureTree = null;
-
- // TODO change this to the feature tree associated with this taxon description
- if (description.hasStructuredData()){
- featureTree = PreferencesUtil.getDefaultFeatureTreeForStructuredDescription();
- }else{
- featureTree = PreferencesUtil.getDefaultFeatureTreeForTextualDescription();
+
+ // TODO change this to the feature tree associated with this taxon
+ // description
+ if (description.hasStructuredData()) {
+ featureTree = PreferencesUtil
+ .getDefaultFeatureTreeForStructuredDescription();
+ } else {
+ featureTree = PreferencesUtil
+ .getDefaultFeatureTreeForTextualDescription();
}
-
- if(featureTree == null){
- featureTree = FeatureTree.NewInstance(CdmStore.getTermManager().getPreferredFeatures());
+
+ if (featureTree == null) {
+ featureTree = FeatureTree.NewInstance(CdmStore.getTermManager()
+ .getPreferredTerms(Feature.class));
}
-
+
return featureTree;
}
}
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonBaseSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonBaseSelectionDialog;
+
/**
* @author n.hoffmann
}
}
- Taxon targetTaxon = TaxonBaseSelectionDialog.selectTaxon(HandlerUtil.getActiveShell(event), EditorUtil.getActiveMultiPageTaxonEditor().getConversationHolder());
+ Taxon targetTaxon = TaxonBaseSelectionDialog.selectTaxon(HandlerUtil.getActiveShell(event), EditorUtil.getActiveMultiPageTaxonEditor().getConversationHolder(), null);
TaxonDescription targetDescription = TaxonDescription.NewInstance(targetTaxon);
targetDescription.setTitleCache(String.format("Copied from %s", EditorUtil.getActiveMultiPageTaxonEditor().getTaxon()), true);
--- /dev/null
+/**\r
+ * Copyright (C) 2011 EDIT\r
+ * European Distributed Institute of Taxonomy \r
+ * http://www.e-taxonomy.eu\r
+ * \r
+ * The contents of this file are subject to the Mozilla Public License Version 1.1\r
+ * See LICENSE.TXT at the top of this package for the full license terms.\r
+ */\r
+package eu.etaxonomy.taxeditor.editor.view.uses;\r
+\r
+import java.util.ArrayList;\r
+import java.util.HashSet;\r
+import java.util.List;\r
+import java.util.Map;\r
+import java.util.Set;\r
+\r
+import org.eclipse.jface.viewers.ITreeContentProvider;\r
+import org.eclipse.jface.viewers.Viewer;\r
+\r
+import eu.etaxonomy.cdm.api.service.ITermService;\r
+import eu.etaxonomy.cdm.model.common.Marker;\r
+import eu.etaxonomy.cdm.model.common.MarkerType;\r
+import eu.etaxonomy.cdm.model.description.DescriptionBase;\r
+import eu.etaxonomy.cdm.model.description.Feature;\r
+import eu.etaxonomy.cdm.model.description.FeatureTree;\r
+import eu.etaxonomy.cdm.model.description.TaxonDescription;\r
+import eu.etaxonomy.cdm.model.taxon.Taxon;\r
+import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;\r
+import eu.etaxonomy.taxeditor.editor.UsageTermCollection;\r
+import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptiveContentProvider;\r
+import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;\r
+import eu.etaxonomy.taxeditor.model.FeatureNodeContainerTree;\r
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+import eu.etaxonomy.taxeditor.store.TermStore;\r
+\r
+/**\r
+ * The class provides the required content to the Uses View\r
+ * @author a.theys \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class UsesContentProvider extends DescriptiveContentProvider implements ITreeContentProvider {\r
+\r
+ Set<MarkerType> markerTypes = new HashSet<MarkerType>();\r
+ \r
+ /**\r
+ * <p>Constructor for DescriptiveContentProvider.</p>\r
+ *\r
+ * @param featureNodeContainerCache a {@link java.util.Map} object.\r
+ */\r
+ public UsesContentProvider(Map<TaxonDescription, FeatureNodeContainerTree> featureNodeContainerCache) {\r
+ super(featureNodeContainerCache);\r
+ this.featureNodeContainerCache = featureNodeContainerCache;\r
+ }\r
+\r
+ /**\r
+ * Get all descriptions associated with the given TaxonEditorInput\r
+ * \r
+ * @param parentElement\r
+ * @return\r
+ */\r
+ @Override\r
+ protected List<DescriptionBase> getDescriptions(TaxonEditorInput parentElement) {\r
+ this.markerTypes.addAll(CdmStore.getTermManager().getPreferredTerms(MarkerType.class));\r
+ Taxon taxon = parentElement.getTaxon();\r
+ List<DescriptionBase> descriptions = new ArrayList<DescriptionBase>();\r
+ \r
+ for(DescriptionBase description : taxon.getDescriptions()){\r
+ if(! description.isImageGallery()){\r
+ MarkerType useMarkertype = (MarkerType) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseMarkerType);\r
+ Set<Marker> descriptionMarkers = description.getMarkers();\r
+ if(descriptionMarkers != null) {\r
+ for (Marker marker: descriptionMarkers) {\r
+ if(marker.getMarkerType().equals(useMarkertype)) {\r
+ descriptions.add(description);\r
+ }\r
+ }\r
+ }\r
+ }\r
+ } \r
+ return descriptions;\r
+ }\r
+\r
+}\r
--- /dev/null
+/**\r
+* Copyright (C) 2011 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.view.uses;\r
+\r
+import java.util.Arrays;\r
+import java.util.List;\r
+\r
+import org.eclipse.jface.viewers.ColumnLabelProvider;\r
+import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider;\r
+import org.eclipse.jface.viewers.StyledString;\r
+\r
+import eu.etaxonomy.cdm.model.common.Language;\r
+import eu.etaxonomy.cdm.model.common.LanguageString;\r
+import eu.etaxonomy.cdm.model.description.CategoricalData;\r
+import eu.etaxonomy.cdm.model.description.DescriptionBase;\r
+import eu.etaxonomy.cdm.model.description.Modifier;\r
+import eu.etaxonomy.cdm.model.description.StateData;\r
+import eu.etaxonomy.cdm.model.description.TextData;\r
+import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+import eu.etaxonomy.taxeditor.editor.UsageTermCollection;\r
+\r
+/**\r
+ * UsesLabelProvider Class\r
+ * @author a.theys \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class UsesLabelProvider extends ColumnLabelProvider implements\r
+ IStyledLabelProvider {\r
+ \r
+ /** {@inheritDoc} */\r
+ public String getText(Object element) {\r
+ String text = "";\r
+\r
+ if (element instanceof DescriptionBase) {\r
+ text = ((DescriptionBase) element).getTitleCache();\r
+ if (text == null || text.length() == 0) {\r
+ text = "Use: No label provided";\r
+ }\r
+ else {\r
+ text = "Use: " + text;\r
+ }\r
+ }\r
+ else if (element instanceof CategoricalData) {\r
+ if (!((CategoricalData) element).getStates().isEmpty()) {\r
+ boolean isUseCategoryAbsent = true;\r
+ for (StateData statedata : ((CategoricalData) element).getStates()) {\r
+ if(statedata.getState() != null && statedata.getModifyingText().get(CdmStore.getDefaultLanguage()) !=null && statedata.getModifyingText().get(CdmStore.getDefaultLanguage()).getText().equals(UsageTermCollection.useCategoryVocabularyLabel)) {\r
+ text = text + statedata.getState().getTitleCache() + ";";\r
+ isUseCategoryAbsent = false;\r
+ }\r
+ }\r
+ if(isUseCategoryAbsent) {\r
+ text = text + UsageTermCollection.notAvailableLabel + ";";\r
+ }\r
+ \r
+ boolean isUseSubCategoryAbsent = true;\r
+ for (StateData statedata : ((CategoricalData) element).getStates()) {\r
+ if(statedata.getState() != null && statedata.getModifyingText().get(CdmStore.getDefaultLanguage()) !=null && statedata.getModifyingText().get(CdmStore.getDefaultLanguage()).getText().equals(UsageTermCollection.useSubCategoryVocabularyLabel)) {\r
+ text = text + statedata.getState().getTitleCache() + ";";\r
+ isUseSubCategoryAbsent = false;\r
+ }\r
+ }\r
+ if(isUseSubCategoryAbsent) {\r
+ text = text + UsageTermCollection.notAvailableLabel + ";";\r
+ }\r
+ }\r
+ else {\r
+ text = text + UsageTermCollection.notAvailableLabel + ";" + UsageTermCollection.notAvailableLabel + ";";\r
+ }\r
+ if (!((CategoricalData) element).getModifiers().isEmpty()) {\r
+ for (Modifier modifier: ((CategoricalData) element).getModifiers()){\r
+ modifier.getPartOf();\r
+ modifier.getVocabulary();\r
+ }\r
+ \r
+ boolean isPlantPartAbsent = true;\r
+ for (Modifier modifier: ((CategoricalData) element).getModifiers()){\r
+ if(GetVocabularyType(modifier, UsageTermCollection.plantPartLabel)) {\r
+ text = text + modifier.getTitleCache()+ ";";\r
+ isPlantPartAbsent = false;\r
+ }\r
+ \r
+ }\r
+ if (isPlantPartAbsent) {\r
+ text = text + UsageTermCollection.notAvailableLabel + ";";\r
+ }\r
+ \r
+ boolean isHumanGroupAbsent = true;\r
+ for (Modifier modifier: ((CategoricalData) element).getModifiers()){\r
+ if(GetVocabularyType(modifier, UsageTermCollection.humanGroupLabel)) {\r
+ text = text + modifier.getTitleCache()+ ";";\r
+ isHumanGroupAbsent = false;\r
+ }\r
+ }\r
+ if (isHumanGroupAbsent) {\r
+ text = text + UsageTermCollection.notAvailableLabel + ";";\r
+ }\r
+ \r
+ boolean isEthnicGroupAbsent = true;\r
+ for (Modifier modifier: ((CategoricalData) element).getModifiers()){\r
+ if(GetVocabularyType(modifier, UsageTermCollection.ethnicGroupLabel)) {\r
+ text = text + modifier.getTitleCache()+ ";";\r
+ isEthnicGroupAbsent = false;\r
+ }\r
+ }\r
+ if (isEthnicGroupAbsent) {\r
+ text = text + UsageTermCollection.notAvailableLabel + ";";\r
+ }\r
+ \r
+ boolean isCountryAbsent = true;\r
+ for (Modifier modifier: ((CategoricalData) element).getModifiers()){\r
+ if(GetVocabularyType(modifier, UsageTermCollection.countryLabel)) {\r
+ text = text + modifier.getTitleCache()+ ";";\r
+ isCountryAbsent = false;\r
+ }\r
+ }\r
+ if (isCountryAbsent) {\r
+ text = text + UsageTermCollection.notAvailableLabel + ";";\r
+ }\r
+ }\r
+ else {\r
+ text = text + UsageTermCollection.notAvailableLabel + ";" + UsageTermCollection.notAvailableLabel + ";" + UsageTermCollection.notAvailableLabel + ";" + UsageTermCollection.notAvailableLabel + ";";\r
+ }\r
+ \r
+ if (text == null || text.length() == 0) {\r
+ text = "No data provided";\r
+ }\r
+ else {\r
+ String[] textElements = text.split(";");\r
+ String dataportalString = textElements[0] + ";" + textElements[1] + ";" + textElements[5] + ";" + textElements[2] + ";" + textElements[3] + ";" + textElements[4] + ";" ; \r
+ \r
+ ((CategoricalData)element).putModifyingText(CdmStore.getDefaultLanguage(), dataportalString);\r
+ }\r
+ return text;\r
+ }\r
+ \r
+ else if (element instanceof TextData) {\r
+ List<Language> languages = Arrays.asList(new Language[]{CdmStore.getDefaultLanguage()});\r
+ LanguageString languageString = ((TextData) element).getPreferredLanguageString(languages);\r
+ text = languageString != null ? languageString.getText() : null;\r
+ if (text == null || text.length() == 0) {\r
+ text = "No data provided";\r
+ }\r
+ }\r
+ \r
+ else if (element instanceof FeatureNodeContainer){\r
+ text = ((FeatureNodeContainer)element).getFeature().getTitleCache();\r
+ }\r
+\r
+ return text;\r
+ }\r
+\r
+ /** Function dertmining which vocabulary is the term part of \r
+ * \r
+ * @param term\r
+ * @param vocabularyExpected\r
+ * @return\r
+ */\r
+ private boolean GetVocabularyType(Modifier term, String vocabularyExpected) {\r
+ if ((term.getPartOf() != null) && (term.getPartOf().getTitleCache().equals(vocabularyExpected))) {\r
+ return true;\r
+ }\r
+ else if ((term.getVocabulary() != null) && (term.getPartOf() == null) && (term.getVocabulary().getTitleCache().equals(vocabularyExpected))) {\r
+ return true;\r
+ }\r
+ else if ((vocabularyExpected.equals(UsageTermCollection.ethnicGroupLabel)) && ((term.getPartOf() != null))) {\r
+ return true;\r
+ }\r
+ return false;\r
+ }\r
+ \r
+ /** {@inheritDoc} */\r
+ @Override\r
+ public StyledString getStyledText(Object element) {\r
+ return new StyledString(this.getText(element),\r
+ StyledString.QUALIFIER_STYLER);\r
+ }\r
+ \r
+ \r
+\r
+}\r
--- /dev/null
+/**\r
+ * Copyright (C) 2011 EDIT\r
+ * European Distributed Institute of Taxonomy \r
+ * http://www.e-taxonomy.eu\r
+ * \r
+ * The contents of this file are subject to the Mozilla Public License Version 1.1\r
+ * See LICENSE.TXT at the top of this package for the full license terms.\r
+ */\r
+package eu.etaxonomy.taxeditor.editor.view.uses;\r
+\r
+import org.eclipse.jface.viewers.TreeViewer;\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.dnd.Transfer;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Tree;\r
+\r
+import eu.etaxonomy.cdm.model.common.CdmBase;\r
+import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementDragListener;\r
+import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementDropAdapter;\r
+import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementTransfer;\r
+import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptiveViewPart;\r
+import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;\r
+import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;\r
+\r
+\r
+/**\r
+ * The Class create a speific Use View to keep the taxonomic view clean\r
+ * @author a.theys \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class UsesViewPart extends DescriptiveViewPart implements IPartContentHasDetails, IPartContentHasSupplementalData {\r
+\r
+ /** Constant <code>ID="eu.etaxonomy.taxeditor.editor.view.uses"</code> */\r
+ public static final String ID = "eu.etaxonomy.taxeditor.editor.view.uses";\r
+ /** {@inheritDoc} */\r
+ @Override\r
+ public void createViewer(Composite parent) {\r
+ \r
+ viewer = new TreeViewer(new Tree(parent, SWT.MULTI | SWT.H_SCROLL\r
+ | SWT.V_SCROLL | SWT.FULL_SELECTION));\r
+ viewer.setContentProvider(new UsesContentProvider(featureNodeContainerCache));\r
+ viewer.setLabelProvider(new UsesLabelProvider());\r
+ viewer.setAutoExpandLevel(2);\r
+ \r
+ \r
+ \r
+ Transfer[] transfers = new Transfer[] { DescriptionElementTransfer.getInstance() };\r
+ viewer.addDragSupport(dndOperations, transfers, new DescriptionElementDragListener(\r
+ this));\r
+ viewer.addDropSupport(dndOperations, transfers,\r
+ new DescriptionElementDropAdapter(viewer));\r
+ \r
+ // Propagate selection from viewer\r
+ getSite().setSelectionProvider(viewer);\r
+ \r
+ showAllElementsAction = new ToggleDescriptionAction(false); \r
+ hideAllElementsAction = new ToggleDescriptionAction(true);\r
+ \r
+ // Add context menu to tree\r
+ createMenu();\r
+ \r
+ createToolbar();\r
+\r
+ }\r
+ \r
+ /** {@inheritDoc} */\r
+ @Override\r
+ public boolean postOperation(CdmBase objectAffectedByOperation) {\r
+ viewer.refresh();\r
+ return super.postOperation(objectAffectedByOperation);\r
+ }\r
+ \r
+\r
+\r
+}\r
--- /dev/null
+/**\r
+* Copyright (C) 2011 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.view.uses.handler;\r
+\r
+import eu.etaxonomy.cdm.model.taxon.Taxon;\r
+import eu.etaxonomy.taxeditor.editor.EditorUtil;\r
+import eu.etaxonomy.taxeditor.editor.view.descriptive.handler.CreateDescriptionHandler;\r
+import eu.etaxonomy.taxeditor.editor.view.uses.operation.CreateTaxonUseOperation;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+\r
+/**\r
+ * CreateUseHandler Class\r
+ * @author a.theys \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class CreateUseHandler extends CreateDescriptionHandler {\r
+\r
+ \r
+ /** {@inheritDoc} */\r
+ @Override\r
+ protected AbstractPostOperation createOperationInstance(String eventLabel, Taxon taxon, IPostOperationEnabled postOperationEnabled) {\r
+ return new CreateTaxonUseOperation(eventLabel, EditorUtil.getUndoContext(), taxon, postOperationEnabled);\r
+ }\r
+}\r
--- /dev/null
+/**
+ * Copyright (C) 2011 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
+
+package eu.etaxonomy.taxeditor.editor.view.uses.handler;
+
+import org.eclipse.core.commands.ExecutionEvent;
+
+import eu.etaxonomy.cdm.api.service.ITermService;
+import eu.etaxonomy.cdm.model.description.Feature;
+import eu.etaxonomy.cdm.model.description.TaxonDescription;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.UsageTermCollection;
+import eu.etaxonomy.taxeditor.editor.view.descriptive.handler.CreateDescriptionElementHandler;
+import eu.etaxonomy.taxeditor.editor.view.uses.operation.CreateUseRecordOperation;
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * CreateUseRecordHandler Class
+ * @author a.theys
+ * @created mar 13, 2012
+ * @version 1.0
+ */
+public class CreateUseRecordHandler extends CreateDescriptionElementHandler {
+ /** {@inheritDoc} */
+ @Override
+ protected AbstractPostOperation operationCreationInstance(String label, ExecutionEvent event, Taxon taxon, TaxonDescription description, IPostOperationEnabled postOperationEnabled) {
+ //Use Record Feature retrieval below
+ Feature feature = (Feature) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseRecordFeature);
+ feature.setSupportsCategoricalData(true);
+ return new CreateUseRecordOperation(label,
+ EditorUtil.getUndoContext(), taxon,
+ description, feature, postOperationEnabled);
+ }
+
+
+
+}
--- /dev/null
+/**\r
+* Copyright (C) 2011 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.view.uses.handler;\r
+\r
+\r
+import org.eclipse.core.commands.ExecutionEvent;\r
+\r
+import eu.etaxonomy.cdm.api.service.ITermService;\r
+import eu.etaxonomy.cdm.model.description.Feature;\r
+import eu.etaxonomy.cdm.model.description.TaxonDescription;\r
+import eu.etaxonomy.cdm.model.taxon.Taxon;\r
+import eu.etaxonomy.taxeditor.editor.EditorUtil;\r
+import eu.etaxonomy.taxeditor.editor.UsageTermCollection;\r
+import eu.etaxonomy.taxeditor.editor.view.descriptive.handler.CreateDescriptionElementHandler;\r
+import eu.etaxonomy.taxeditor.editor.view.uses.operation.CreateUseSummaryOperation;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+\r
+/**\r
+ * CreateUseSummaryHandler Class\r
+ * @author a.theys \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class CreateUseSummaryHandler extends CreateDescriptionElementHandler {\r
+ /** {@inheritDoc} */\r
+ @Override\r
+ protected AbstractPostOperation operationCreationInstance(String label, ExecutionEvent event, Taxon taxon, TaxonDescription description, IPostOperationEnabled postOperationEnabled) {\r
+ //Use Record Feature retrieval below\r
+ Feature feature = (Feature) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseSummaryFeature);\r
+ feature.setSupportsTextData(true);\r
+ return new CreateUseSummaryOperation(label, EditorUtil.getUndoContext(), taxon, description, feature, postOperationEnabled);\r
+ }\r
+ \r
+}\r
--- /dev/null
+/**\r
+* Copyright (C) 2011 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.view.uses.operation;\r
+\r
+import java.util.UUID;\r
+\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.operations.IUndoContext;\r
+import org.eclipse.core.runtime.IAdaptable;\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.core.runtime.IStatus;\r
+\r
+import eu.etaxonomy.cdm.api.service.ITermService;\r
+import eu.etaxonomy.cdm.model.common.Marker;\r
+import eu.etaxonomy.cdm.model.common.MarkerType;\r
+import eu.etaxonomy.cdm.model.description.TaxonDescription;\r
+import eu.etaxonomy.cdm.model.taxon.Taxon;\r
+import eu.etaxonomy.taxeditor.editor.UsageTermCollection;\r
+import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.CreateTaxonDescriptionOperation;\r
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+\r
+/**\r
+ * CreateTaxonUseOperation Class\r
+ * @author a.theys \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class CreateTaxonUseOperation extends CreateTaxonDescriptionOperation {\r
+ private TaxonDescription description;\r
+ private Marker marker;\r
+\r
+ /**\r
+ * <p>Constructor for CreateTaxonUseOperation.</p>\r
+ *\r
+ * @param label a {@link java.lang.String} object.\r
+ * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.\r
+ * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.\r
+ * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.\r
+ */\r
+ public CreateTaxonUseOperation(String label, IUndoContext undoContext,\r
+ Taxon taxon, IPostOperationEnabled postOperationEnabled) {\r
+ this(label, undoContext, taxon, postOperationEnabled, false);\r
+ }\r
+\r
+ /**\r
+ * <p>Constructor for CreateTaxonUseOperation.</p>\r
+ *\r
+ * @param label a {@link java.lang.String} object.\r
+ * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.\r
+ * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.\r
+ * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.\r
+ * @param isImageGallery a boolean.\r
+ */\r
+ public CreateTaxonUseOperation(String label, IUndoContext undoContext,\r
+ Taxon taxon, IPostOperationEnabled postOperationEnabled, boolean isImageGallery) {\r
+ super(label, undoContext, taxon, postOperationEnabled);\r
+ }\r
+ \r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+ */\r
+ /** {@inheritDoc} */\r
+ @Override\r
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
+ throws ExecutionException {\r
+ \r
+ description = TaxonDescription.NewInstance(taxon);\r
+ monitor.worked(20);\r
+ MarkerType useMarkerType = (MarkerType) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseMarkerType);\r
+ marker = Marker.NewInstance(useMarkerType, true);\r
+ description.addMarker(marker);\r
+ monitor.worked(40);\r
+\r
+ return postExecute(description);\r
+ }\r
+}\r
+\r
--- /dev/null
+/**
+* Copyright (C) 2011 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.editor.view.uses.operation;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+
+import eu.etaxonomy.cdm.model.description.CategoricalData;
+import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
+import eu.etaxonomy.cdm.model.description.Feature;
+import eu.etaxonomy.cdm.model.description.TaxonDescription;
+import eu.etaxonomy.cdm.model.description.TextData;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+
+
+/**
+ * CreateUseRecordOperation Class
+ * @author a.theys
+ * @created mar 13, 2012
+ * @version 1.0
+ */
+public class CreateUseRecordOperation extends AbstractPostOperation {
+
+ /** Constant <code>ID="eu.etaxonomy.taxeditor.editor.view.use."{trunked}</code> */
+ public static final String ID = "eu.etaxonomy.taxeditor.editor.use.createUseRecord";
+ private TaxonDescription description;
+ private Feature feature;
+ private DescriptionElementBase element;
+
+ /**
+ * <p>Constructor for CreateUseRecordOperation.</p>
+ *
+ * @param label a {@link java.lang.String} object.
+ * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
+ * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.
+ * @param description a {@link eu.etaxonomy.cdm.model.description.TaxonDescription} object.
+ * @param feature a {@link eu.etaxonomy.cdm.model.description.Feature} object.
+ * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
+ */
+ public CreateUseRecordOperation(String label, IUndoContext undoContext,
+ Taxon taxon, TaxonDescription description, Feature feature, IPostOperationEnabled postOperationEnabled) {
+ super(label, undoContext, taxon, postOperationEnabled);
+
+ this.description = description;
+ this.feature = feature;
+ }
+
+
+ /**
+ * <p>Constructor for CreateUseRecordOperation.</p>
+ *
+ * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
+ * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.
+ * @param description a {@link eu.etaxonomy.cdm.model.description.TaxonDescription} object.
+ * @param feature a {@link eu.etaxonomy.cdm.model.description.Feature} object.
+ * @param element a {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase} object.
+ * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
+ * @param label a {@link java.lang.String} object.
+ */
+ public CreateUseRecordOperation(String label,
+ IUndoContext undoContext, Taxon taxon,
+ TaxonDescription description, Feature feature,
+ DescriptionElementBase element, IPostOperationEnabled postOperationEnabled) {
+ this(label, undoContext, taxon, description, feature, postOperationEnabled);
+
+ this.element = element;
+ }
+
+ @Override
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+ monitor.worked(20);
+ if (element == null) {
+ if(feature.isSupportsCategoricalData()){
+ element = CategoricalData.NewInstance();
+ }
+ else {
+ element = TextData.NewInstance();
+ }
+ }
+
+
+ element.setFeature(feature);
+ description.addElement(element);
+ monitor.worked(40);
+
+ return postExecute(element);
+ }
+
+ @Override
+ public IStatus redo(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+
+ description.addElement(element);
+
+ return postExecute(element);
+ }
+
+ @Override
+ public IStatus undo(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+ description.removeElement(element);
+
+ return postExecute(null);
+ }
+}
--- /dev/null
+/**\r
+* Copyright (C) 2011 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.view.uses.operation;\r
+\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.operations.IUndoContext;\r
+import org.eclipse.core.runtime.IAdaptable;\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.core.runtime.IStatus;\r
+\r
+import eu.etaxonomy.cdm.model.description.DescriptionElementBase;\r
+import eu.etaxonomy.cdm.model.description.Feature;\r
+import eu.etaxonomy.cdm.model.description.TaxonDescription;\r
+import eu.etaxonomy.cdm.model.description.TextData;\r
+import eu.etaxonomy.cdm.model.taxon.Taxon;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+\r
+\r
+/**\r
+ * CreateUseSummaryOperation Class\r
+ * @author a.theys \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class CreateUseSummaryOperation extends AbstractPostOperation {\r
+ \r
+ public static final String ID = "eu.etaxonomy.taxeditor.editor.use.createUseRecord";\r
+ \r
+ private TaxonDescription description;\r
+ private Feature feature;\r
+ private DescriptionElementBase element;\r
+\r
+ \r
+ /**\r
+ * <p>Constructor for CreateUseSummaryOperation.</p>\r
+ *\r
+ * @param label a {@link java.lang.String} object.\r
+ * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.\r
+ * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.\r
+ * @param description a {@link eu.etaxonomy.cdm.model.description.TaxonDescription} object.\r
+ * @param feature a {@link eu.etaxonomy.cdm.model.description.Feature} object.\r
+ * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.\r
+ */\r
+ public CreateUseSummaryOperation(String label, IUndoContext undoContext,\r
+ Taxon taxon, TaxonDescription description, Feature feature, IPostOperationEnabled postOperationEnabled) {\r
+ super(label, undoContext, taxon, postOperationEnabled);\r
+ \r
+ this.description = description;\r
+ this.feature = feature;\r
+ }\r
+\r
+ /**\r
+ * <p>Constructor for CreateUseSummaryOperation.</p>\r
+ *\r
+ * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.\r
+ * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.\r
+ * @param description a {@link eu.etaxonomy.cdm.model.description.TaxonDescription} object.\r
+ * @param feature a {@link eu.etaxonomy.cdm.model.description.Feature} object.\r
+ * @param element a {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase} object.\r
+ * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.\r
+ * @param label a {@link java.lang.String} object.\r
+ */\r
+ public CreateUseSummaryOperation(String label,\r
+ IUndoContext undoContext, Taxon taxon,\r
+ TaxonDescription description, Feature feature,\r
+ DescriptionElementBase element, IPostOperationEnabled postOperationEnabled) {\r
+ this(label, undoContext, taxon, description, feature, postOperationEnabled);\r
+ \r
+ this.element = element;\r
+ }\r
+\r
+ /** {@inheritDoc} */\r
+ @Override\r
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
+ throws ExecutionException {\r
+ monitor.worked(20);\r
+ if (element == null) {\r
+\r
+ element = TextData.NewInstance();\r
+ }\r
+\r
+ \r
+ element.setFeature(feature);\r
+ description.addElement(element);\r
+ monitor.worked(40);\r
+\r
+ return postExecute(element);\r
+ }\r
+\r
+ @Override\r
+ public IStatus redo(IProgressMonitor monitor, IAdaptable info)\r
+ throws ExecutionException {\r
+ \r
+ description.addElement(element);\r
+ \r
+ return postExecute(element);\r
+ }\r
+\r
+ @Override\r
+ public IStatus undo(IProgressMonitor monitor, IAdaptable info)\r
+ throws ExecutionException {\r
+ description.removeElement(element);\r
+ \r
+ return postExecute(null);\r
+ }\r
+}\r
<projectDescription>
<name>eu.etaxonomy.taxeditor.feature.platform</name>
- <comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
- <projects/>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
</projectDescription>
\ No newline at end of file
<feature\r
id="eu.etaxonomy.taxeditor.feature.platform"\r
label="Taxeditor Dependencies"\r
- version="3.0.6.qualifier"\r
+ version="3.0.12.qualifier"\r
os="linux,macosx,win32"\r
ws="cocoa,gtk,win32"\r
arch="x86,x86_64">\r
\r
<license url="http://www.eclipse.org/legal/epl-v10.html">\r
- The contents of this file are subject to the Eclipse Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
-http://www.eclipse.org/legal/epl-v10.html
-
+ The contents of this file are subject to the Eclipse Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\r
+http://www.eclipse.org/legal/epl-v10.html\r
+\r
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.\r
</license>\r
\r
<plugin\r
id="org.eclipse.equinox.security.macosx"\r
os="macosx"\r
- ws="cocoa"\r
- arch="x86,x86_64"\r
download-size="0"\r
install-size="0"\r
version="0.0.0"\r
<plugin\r
id="org.eclipse.core.filesystem.win32.x86"\r
os="win32"\r
+ ws="win32"\r
arch="x86"\r
download-size="0"\r
install-size="0"\r
<plugin\r
id="org.eclipse.core.net.win32.x86"\r
os="win32"\r
+ ws="win32"\r
arch="x86"\r
download-size="0"\r
install-size="0"\r
<plugin\r
id="org.eclipse.core.resources.win32.x86"\r
os="win32"\r
- arch="x86,x86_64"\r
+ arch="x86"\r
download-size="0"\r
install-size="0"\r
version="0.0.0"\r
<plugin\r
id="org.eclipse.equinox.security.win32.x86"\r
os="win32"\r
- arch="x86,x86_64"\r
+ arch="x86"\r
download-size="0"\r
install-size="0"\r
version="0.0.0"\r
<plugin\r
id="org.eclipse.swt.win32.win32.x86"\r
os="win32"\r
+ ws="win32"\r
arch="x86"\r
download-size="0"\r
install-size="0"\r
version="0.0.0"\r
unpack="false"/>\r
\r
- <plugin\r
- id="org.eclipse.swt.motif.linux.x86"\r
- os="linux"\r
- ws="motif"\r
- arch="x86"\r
- download-size="0"\r
- install-size="0"\r
- version="0.0.0"\r
- fragment="true"\r
- unpack="false"/>\r
-\r
- <plugin\r
- id="org.eclipse.equinox.launcher.motif.linux.x86"\r
- os="linux"\r
- ws="motif"\r
- arch="x86"\r
- download-size="0"\r
- install-size="0"\r
- version="0.0.0"\r
- fragment="true"/>\r
-\r
<plugin\r
id="org.apache.commons.logging"\r
download-size="0"\r
version="0.0.0"\r
unpack="false"/>\r
\r
- <plugin\r
- id="org.eclipse.swt.cocoa.macosx"\r
- os="macosx"\r
- arch="x86"\r
- download-size="0"\r
- install-size="0"\r
- version="0.0.0"\r
- fragment="true"\r
- unpack="false"/>\r
-\r
<plugin\r
id="org.eclipse.equinox.p2.core"\r
download-size="0"\r
<plugin\r
id="org.eclipse.core.filesystem.win32.x86_64"\r
os="win32"\r
+ ws="win32"\r
arch="x86_64"\r
download-size="0"\r
install-size="0"\r
<plugin\r
id="org.eclipse.core.net.win32.x86_64"\r
os="win32"\r
+ ws="win32"\r
arch="x86_64"\r
download-size="0"\r
install-size="0"\r
<plugin\r
id="org.eclipse.swt.win32.win32.x86_64"\r
os="win32"\r
+ ws="win32"\r
arch="x86_64"\r
download-size="0"\r
install-size="0"\r
<plugin\r
id="org.eclipse.core.filesystem.macosx"\r
os="macosx"\r
- ws="cocoa"\r
- arch="x86,x86_64"\r
download-size="0"\r
install-size="0"\r
version="0.0.0"\r
fragment="true"\r
unpack="false"/>\r
\r
+ <plugin\r
+ id="org.hamcrest"\r
+ download-size="0"\r
+ install-size="0"\r
+ version="0.0.0"\r
+ unpack="false"/>\r
+\r
+ <plugin\r
+ id="org.hamcrest.core"\r
+ download-size="0"\r
+ install-size="0"\r
+ version="0.0.0"\r
+ unpack="false"/>\r
+\r
+ <plugin\r
+ id="org.apache.lucene"\r
+ download-size="0"\r
+ install-size="0"\r
+ version="0.0.0"\r
+ unpack="false"/>\r
+\r
+ <plugin\r
+ id="org.apache.lucene.analysis"\r
+ download-size="0"\r
+ install-size="0"\r
+ version="0.0.0"\r
+ unpack="false"/>\r
+\r
+ <plugin\r
+ id="org.eclipse.help.base"\r
+ download-size="0"\r
+ install-size="0"\r
+ version="0.0.0"\r
+ unpack="false"/>\r
+\r
+ <plugin\r
+ id="org.eclipse.help.webapp"\r
+ download-size="0"\r
+ install-size="0"\r
+ version="0.0.0"\r
+ unpack="false"/>\r
+\r
+ <plugin\r
+ id="org.apache.jasper"\r
+ download-size="0"\r
+ install-size="0"\r
+ version="0.0.0"\r
+ unpack="false"/>\r
+\r
+ <plugin\r
+ id="org.eclipse.equinox.jsp.jasper.registry"\r
+ download-size="0"\r
+ install-size="0"\r
+ version="0.0.0"\r
+ unpack="false"/>\r
+\r
+ <plugin\r
+ id="org.eclipse.equinox.http.registry"\r
+ download-size="0"\r
+ install-size="0"\r
+ version="0.0.0"\r
+ unpack="false"/>\r
+\r
+ <plugin\r
+ id="org.eclipse.jdt.core"\r
+ download-size="0"\r
+ install-size="0"\r
+ version="0.0.0"\r
+ unpack="false"/>\r
+\r
+ <plugin\r
+ id="org.hamcrest.text"\r
+ download-size="0"\r
+ install-size="0"\r
+ version="0.0.0"\r
+ unpack="false"/>\r
+\r
<plugin\r
id="org.hamcrest.core"\r
download-size="0"\r
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>3.0.6-SNAPSHOT</version>
+ <version>3.0.12-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>eu.etaxonomy.taxeditor.feature.platform</artifactId>
<projectDescription>
<name>eu.etaxonomy.taxeditor.feature</name>
- <comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+ <comment></comment>
<projects>
<project>eu.etaxonomy.taxeditor.application</project>
<project>eu.etaxonomy.taxeditor.bulkeditor</project>
<project>eu.etaxonomy.taxeditor.printpublisher</project>
<project>eu.etaxonomy.taxeditor.store</project>
</projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
</projectDescription>
\ No newline at end of file
-bin.includes = plugin_customization.ini,\
- feature.xml
+bin.includes = feature.xml
category.id.eu.etaxonomy=EDIT
category.description.eu.etaxonomy=EDIT Taxonomic Editor
<feature
id="eu.etaxonomy.taxeditor.feature"
label="Taxonomic Editor"
- version="3.0.6.qualifier"
+ version="3.0.12.qualifier"
provider-name="EDIT"
plugin="eu.etaxonomy.taxeditor.application"
os="linux,macosx,win32"
id="eu.etaxonomy.taxeditor.application"
download-size="0"
install-size="0"
- version="3.0.6.qualifier"
+ version="0.0.0"
unpack="false"/>
<plugin
id="eu.etaxonomy.taxeditor.bulkeditor"
download-size="0"
install-size="0"
- version="3.0.6.qualifier"
+ version="0.0.0"
unpack="false"/>
<plugin
id="eu.etaxonomy.taxeditor.editor"
download-size="0"
install-size="0"
- version="3.0.6.qualifier"
+ version="0.0.0"
unpack="false"/>
<plugin
id="eu.etaxonomy.taxeditor.navigation"
download-size="0"
install-size="0"
- version="3.0.6.qualifier"
+ version="0.0.0"
unpack="false"/>
<plugin
id="eu.etaxonomy.taxeditor.store"
download-size="0"
install-size="0"
- version="3.0.6.qualifier"
+ version="0.0.0"
unpack="false"/>
<plugin
id="eu.etaxonomy.taxeditor.printpublisher"
download-size="0"
install-size="0"
- version="3.0.6.qualifier"
+ version="0.0.0"
unpack="false"/>
<plugin
id="eu.etaxonomy.taxeditor.cdmlib"
download-size="0"
install-size="0"
- version="3.0.6.qualifier"/>
+ version="0.0.0"/>
<plugin
id="javax.servlet"
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>3.0.6-SNAPSHOT</version>
+ <version>3.0.12-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>eu.etaxonomy.taxeditor.feature</artifactId>
Bundle-ManifestVersion: 2
Bundle-Name: Help
Bundle-SymbolicName: eu.etaxonomy.taxeditor.help; singleton:=true
-Bundle-Version: 3.0.6.qualifier
+Bundle-Version: 3.0.12.qualifier
Bundle-Activator: eu.etaxonomy.taxeditor.help.Activator
Bundle-Vendor: EDIT
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.help.ui,
- org.eclipse.help.webapp
+ org.eclipse.help.webapp,
+ org.hamcrest
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
META-INF/,\
.,\
html/,\
- *.xml
+ *.xml,\
+ p2.inf
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Main Topic</title>
-</head>
-
-<body>
-<h1>Main Topic</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Sub Topic</title>
-</head>
-
-<body>
-<h1>Sub Topic</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Sub Topic 2</title>
-</head>
-
-<body>
-<h1>Sub Topic 2</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
+<h3>6.1.4 A Successfully Parsed Taxon Record</h3>\r
+ <p>\r
+A successfully parsed taxon record is given in the following example. You should note there is no warning symbol in the Taxon Name panel, and the<strong>Uninomial</strong>, <strong>Specific Epithet </strong>and <strong>Authorship</strong> of the new taxon, shown in the <strong>Name Cache</strong> menu, have been parsed to the correct locations.\r
+ </p>\r
+ <p>\r
+ <img src="../img/6_1b.jpg"/>\r
+ </p>\r
+\r
+<h3>\r
+ About Bulk Editing\r
+ </h3>\r
+ <p>\r
+ <img src="../img/6_5a.jpg"/>\r
+ </p>\r
+ <p align="center">\r
+ <strong>Toolbar</strong>\r
+ ><strong>General ></strong> <strong>Bulk Editor</strong> menu\r
+ </p>\r
+ <p>\r
+The bulk editor allows multiple taxon records that share <strong>Names</strong>, <strong>Name Relationships</strong>, <strong>References, Specimens and Observations,</strong> or <strong>Authors and Author Teams</strong> data to be edited. These data types are not\r
+ easily edited in the course of normal taxon editing and are frequently referenced (shared) in several places within a dataset, therefore they are\r
+ edited in a separate location.\r
+ </p>\r
+ <p>\r
+ Furthermore References frequently contain a number of duplicate entries, for example, after a mass import, where multiple entries for a single object\r
+ must be merged to insure data integrity. The Bulk Editor allows you to search for and merge duplicate reference records.\r
+ </p>\r
+ <p>\r
+The <strong>Bulk Editor</strong> consists of a search field and a list editor. The list is populated when a search is executed. The<strong>Details Panel</strong> is used to display and edit details of the object which is currently activated; changes made in the <strong>Details Panel</strong> are reflected immediately in the list.\r
+ </p>\r
+ <p>\r
+ This version of the manual will explain how to edit the name of multiple taxa records.\r
+ </p>
\ No newline at end of file
<p>
Double-click here and the taxon opens here in a new tab<br />
- <img src="" alt="" />
+ <p><img src="../img/3_4b.jpg" alt="" /></p>
</p>
+<h3>Adding a Description Tree to a Taxon</h3>\r
+ <p>\r
+ The taxon must first be activated in the <strong>Taxon Name</strong> panel.\r
+ </p>\r
+ <p>\r
+ The Description Panel must also be open <strong>Windows > Show View ></strong> <strong>Descriptive</strong>.\r
+ </p>\r
+ <p>\r
+ 1. Point the mouse cursor in the Description panel box.\r
+ </p>\r
+ <ol start="2" type="1">\r
+ <li>\r
+ Click on the right hand mouse button and a menu will appear\r
+ </li>\r
+ <li>\r
+ Select <strong>New Descriptive Data</strong>\r
+ </li>\r
+ </ol>\r
+ <p>\r
+ <img src="../img/8_3a.jpg"/>\r
+ </p>\r
+\r
+ <p>\r
+An entry will appear in the Descriptive panel and the “<strong>Description Details</strong>” box will open in the <strong>Details panel</strong>\r
+ </p>\r
+ <p>\r
+ <img src="../img/8_3b.jpg"/>\r
+ </p>\r
+ <p>\r
+ <img src="../img/8_3c.jpg"/>\r
+ </p>\r
+ <h2>Adding a Heterotypic Synonym\r
+ </h2>\r
+ <p>\r
+ There is a quick and easy way of attaching synonyms to a taxon record:\r
+ </p>\r
+ <p>\r
+1. In the <strong>Taxon Navigator</strong> panel, double-click the taxon to which you want to attach a synonym; this will open the record in the <strong>Taxon Name </strong>panel if it is not already open (see <strong>Activating Taxon Records</strong> on page 25 for more information).\r
+ </p>\r
+ <p>\r
+ 2. Click in the <strong>Taxon Name</strong> panel to the right of any text already entered.\r
+ </p>\r
+ <p>\r
+ 3. Press <strong>Return </strong>on the keyboard.\r
+ </p>\r
+ <p>\r
+ Another text box will appear in the <strong>Taxon Name </strong>panel, below that of the root taxon/accepted name for which you are entering a synonym.\r
+ You will notice the standard taxonomic synonym indicator (=) at the left hand side of the new text box within a green circle:\r
+ </p>\r
+ <p>\r
+ <img src="../img/7_1a.jpg"/>\r
+ </p>\r
+ <p>\r
+ If the synonym text box was opened in error, point the mouse arrow into the synonym text box and click the right mouse button; a drop-down menu will\r
+ open > click on the <strong>Delete </strong>option:\r
+ </p>\r
+ <p>\r
+ <img src="../img/7_1b.jpg"/>\r
+ </p>\r
+ <p>\r
+ 4. Enter the name of the synonym.\r
+ </p>\r
+ <p>\r
+ 5. Save the synonym (see <strong>Saving Synonyms</strong> below).\r
+ </p>\r
+ <h2>Adding a Homotypic Synonym\r
+ </h2>\r
+ <p>\r
+ By default, a carriage return from a taxon record in the <strong>Taxon Name</strong> panel will create a new text box for a heterotypic synonym, as\r
+ detailed above. Homotypic synonyms can be added using a drop-down menu:\r
+ </p>\r
+ <ol start="1" type="1">\r
+ <li>\r
+ Point the mouse arrow into the text box for the taxon to which you are attaching a homotypic synonym and click the right mouse button; a drop-down\r
+ menu will appear.\r
+ </li>\r
+ <li>\r
+ Point the mouse at the <strong>New</strong> option at the top of the menu; a new menu will appear.\r
+ </li>\r
+ <li>\r
+ Click on the <strong>Homotypic Synonym</strong> option:\r
+ </li>\r
+ </ol>\r
+ <p>\r
+ <img src="../img/7_2a.jpg"/>\r
+\r
+ </p>\r
+ <p>\r
+ Another text box will appear in the <strong>Taxon Name</strong> panel, below that of the root taxon/accepted name for which you are entering a synonym.\r
+ You will notice the homotypic synonym icon of (º) inside a blue circle:\r
+ </p>\r
+ <p>\r
+<img src="../img/7_2b.jpg"/>\r
+\r
+ </p>\r
+ <p>\r
+ 4. Enter the name of the synonym.\r
+ </p>\r
+ <p>\r
+ 5. Save the synonym (see <strong>Saving Synonyms</strong> below).\r
+ </p>
\ No newline at end of file
+ <h2>Adding a Species Description to a Taxon Record\r
+ </h2>\r
+ <p>\r
+ Add the descriptive data type of “Description” as described in section <strong>8.4</strong> above. The <strong>Descriptive</strong> panel\r
+ should look like this:\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/8_6a.jpg"/>\r
+ </p>\r
+ <p>\r
+ As with several other descriptive data types available, the description of a species is added as free text.\r
+ </p>\r
+ <ol start="1" type="1">\r
+ <li>\r
+ Point the mouse cursor in the Details box; the cursor will appear.\r
+ </li>\r
+ <li>\r
+ Type in your species description, this will appear automatically in the Descriptive panel. For example:\r
+ </li>\r
+ </ol>\r
+ <p align="center">\r
+ <img src="../img/8_6b.jpg"/>\r
+ </p>\r
+ <p>\r
+ <strong>Tip!</strong>\r
+ You can also cut and paste text from a word document or another database where you store taxonomic information. Simply highlight the text you want to\r
+ copy from the original document, press Ctrl on your keyboard and then C whilst still holding the Ctrl button. Release both buttons. You have just\r
+ copied the text. Now click in the box of the Taxonomic Editor where you would like to paste the text and press Ctrl and then V whilst still holding the\r
+ Ctrl button. The text will be pasted.\r
+ </p>\r
+ <p>\r
+ 3. Save the changes by clicking on the Save icon:\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/8_6c.jpg"/>\r
+ </p>
\ No newline at end of file
+ <h2>Adding annotations to Taxon Record\r
+ </h2>\r
+ <p>\r
+ The following is an example of how to use the supplemental data panel. The taxon must first be activated in the <strong>Taxon Name</strong> panel. The\r
+ Supplemental data Panel must also be open <strong>Windows > Show View >Supplemental</strong>.\r
+ </p>\r
+ <ol start="1" type="1">\r
+ <li>\r
+ Expand Annotations box using the arrow to the left of the data box name\r
+ </li>\r
+ <li>\r
+ Add new annotation by clicking on the + symbol on the right of the box\r
+ </li>\r
+ </ol>\r
+ <p>\r
+ <img src="../img/9_2a.jpg"/>\r
+ </p>\r
+ <p>\r
+ 3. Select annotation type from the drop down box; editorial or technical\r
+ </p>\r
+ <p>\r
+ 4. Enter annotation to freetext box\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/9_2b.jpg"/>\r
+ </p>
\ No newline at end of file
+ <h2>Adding Common Name Descriptive Data to a Taxon Record\r
+ </h2>\r
+ <p>\r
+ Add the descriptive data type of “Common Name” as described in section <strong>8.4</strong> above. The <strong>Details panel </strong>\r
+ should look like this.\r
+ </p>\r
+ <p>\r
+ <img src="../img/8_5a.jpg"/>\r
+ </p>\r
+ <p>\r
+ <strong>Tip!</strong>\r
+ <em> </em>\r
+ Each individual panel of the Taxonomic Editor can be resized; if you are having difficulties viewing the entire Descriptions panel you can use the\r
+arrows which appear at the top, bottom, left and right of the panel to resize it (see <strong> <a href="#_Changing_Panel_Sizes">Changing Panel Sizes</a></strong> page 39).\r
+ </p>\r
+ <ol start="1" type="1">\r
+ <li>\r
+ Click in the “Language” field in the <strong>Common Name Details</strong> box; the field will be highlighted and a drop-down menu will\r
+ appear:\r
+ </li>\r
+ </ol>\r
+ <p align="center">\r
+ <img src="../img/8_5b.jpg"/>\r
+ </p>\r
+ <ol start="2" type="1">\r
+ <li>\r
+ Enter the first digit of the name of the language. The first language name that begins with that letter will be shown. Continue to enter the first\r
+ digit of the name until the language you wish to select is shown in the highlighted box.\r
+ </li>\r
+ </ol>\r
+ <p>\r
+ For example, to input the language of the common name as “Thai”, after clicking and highlighting the Language field, press “T”\r
+ on the keyboard. Repeat the pressing until the name “Thai” in shown the Language field:\r
+ </p>\r
+ <p>\r
+ <img src="../img/8_5c.jpg"/>\r
+ </p>\r
+ <ol start="3" type="1">\r
+ <li>\r
+ When the language you want to select is shown in the Language field, press return on the keyboard to confirm your selection; the drop-down menu\r
+ will close and your selection will be shown in the Language field:\r
+ </li>\r
+ </ol>\r
+ <p>\r
+ <img src="../img/8_5d.jpg"/>\r
+ </p>\r
+ <ol start="4" type="1">\r
+ <li>\r
+ Click in the “<strong>Common Name</strong>” field in the <strong>Common Name Details</strong> box; the cursor will appear in the box.\r
+ </li>\r
+ <li>\r
+ Type in the common name of the activated Taxon; the text will appear in the Common Name field:\r
+ </li>\r
+ </ol>\r
+ <p align="center">\r
+ <img src="../img/8_5e.jpg"/>\r
+ </p>\r
+ <p>\r
+ 6. Save the changes by clicking on the Save icon:\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/8_5f.jpg"/>\r
+ </p>
\ No newline at end of file
+ <h1>Adding Descriptive Data to Taxon Record\r
+ </h1>\r
+ <p>\r
+ There is a variety of types of descriptive data that can be added to a taxon (shown below). If you do not need to use all of these kinds of data you\r
+can remove the available descriptive data types via the <strong>Preferences</strong> menu as explained in <strong>Show/Hide Options of Drop-Down</strong> Menus on page 30. Due to the variety of data types available, examples will be given here rather than\r
+ instructions specific to every data type.\r
+ </p>\r
+ <p>\r
+ <strong>Please Note: </strong>\r
+ The Descriptive Data element is under construction and there may be some changes to later versions of the Taxonomic Editor.\r
+ </p>\r
+ <h1>Adding Media Data to a Taxon Record\r
+ </h1>
\ No newline at end of file
<ul>
<li><strong>Description:</strong> You can add a new data field to the Descriptive panel.</li>
- <li><strong>Features:</strong> the features you would like to include in your taxon descriptions, for example “common name”, “distribution” and “ecology”.</li>
+ <li><strong>Features:</strong> the features you would like to include in your taxon descriptions, for example "common name", "distribution" and "ecology".</li>
<li><strong>Named Area Type:</strong> you can add a new data option to the Named Area Type field drop down box found in the Details sheet.</li>
<li><strong>Extension Types:</strong> You can add a new data option to the Extension Type field drop-down box found in the Supplemental Data panel.</li>
<li><strong>Marker Types:</strong> You can add a new data option to the Marker Type field drop-down box found in the Supplemental Data panel.</li>
<ol>
<li>Open the <strong>Preferences</strong> pop-up box (<strong>Toolbar > Window</strong> menu > <strong>Preferences</strong> option).</li>
<li>Navigate to the element you wish to change by expanding the <strong>Taxonomic Editor > Description</strong> menu found in the Taxonomic Editor menu:
- <p><img src="" alt="" /></p>
+ <p><img src="../img/4_1d.jpg" alt="" /></p>
<li>
<li>Click on the data field you would like to add to from the menu on the left hand side of the pop-up. The existing options associated with the drop-down list for that data field will appear in the main panel of the pop-up box. The example shown below is adding a new feature or data field to the overall Description.</li>
<li>Click the <strong>New</strong> button.</li>
<li>Click the <strong>Finish</strong> button.</li>
</ol>
-<p><img src="" alt="" /></p>
+<p><img src="../img/4_1e.jpg" alt="" /></p>
<p>Your new data option will be added to the drop-down box for the selected data field in the Properties Sheet.</p>
+<h1>Adding Supplemental Data to a Taxon Record\r
+ </h1>\r
+ <p>\r
+The Supplemental data panel is accessed in the same way as the descriptive panel. <strong>Windows </strong>> <strong>Show View</strong> > <strong>Supplemental.</strong>\r
+ </p>
\ No newline at end of file
<strong>Taxon</strong>
:
<p>
- <img src="" alt="" />
+ <img src="../img/5_3a.jpg" alt="" />
</p>
</li>
<li>Enter the name of the taxon, including authorship if you wish.</li>
</ol>
<p>
- <img src="" alt="" />
- The new taxon record will appear in the Taxon Navigator panel and is
- saved automatically:
+ <img src="../img/5_3b.jpg" alt="" /></p>
+ <p>The new taxon record will appear in the Taxon Navigator panel and is
+ saved automatically:
</p>
-
+<p><img src="../img/5_3c.jpg" alt="" /></p>
<p>
You can continue to add new taxa to any node in the classification in
this way in order to build up your taxonomic treatment. To create and
<ol>
<li>Click on the <strong>General</strong> menu in the toolbar > <strong>New > Taxon</strong>:
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_4a.jpg" alt="" /></p>
<p>The New Taxon pop-up box will open.</p>
</li>
<li>Click the <strong>Browse</strong> button to the right of the Classification field:
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_4b.jpg" alt="" /></p>
- <p>The “Choose a classification” pop-up box will open.</p>
+ <p>The "Choose a classification" pop-up box will open.</p>
</li>
<li>Enter a search term for the name of the Classification, for example
the first letter of the name. As you type, matching taxonomic trees
- will be shown in the “Matching items” field below:
+ will be shown in the "Matching items" field below:
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_4c.jpg" alt="" /></p>
</li>
<li>Click the name of the desired classification from the list in the
- “Matching items” field.
+ "Matching items" field.
</li>
<li>Click <strong>OK</strong>; the pop-up box will close and the name of the
Classification will be shown in the Classification field:
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_4d.jpg" alt="" /></p>
<p>If appropriate, you can now choose a parent to attach the new taxon to
in the exact same way:</p>
</li>
<li>Click the <strong>Browse</strong> button to the right of the Parent field:
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_4e.jpg" alt="" /></p>
- <p>The “Select parent taxon” pop-up box will open.</p>
+ <p>The "Select parent taxon" pop-up box will open.</p>
</li>
<li>Select classification from drop down at the bottom of the box.
</li>
<li>Enter a search term for the name of the parent taxon, for example the
first letter of the name. As you type, matching taxa from your
- selected Taxonomic Tree will be shown in the “Matching items” field
+ selected Taxonomic Tree will be shown in the "Matching items" field
below:
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_4f.jpg" alt="" /></p>
</li>
<li>Click the name of the desired parent taxon from the list in the
- “Matching items” field.
+ "Matching items" field.
</li>
<li>Click <strong>OK</strong>; the pop-up box will close and the name of the parent taxon
will be shown in the Parent field:
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_4g.jpg" alt="" /></p>
</li>
<li>Click in the <strong>New Taxon</strong> field.
</li>
<li>Enter the name of the taxon, including authorship if you wish.
</li>
<li>Click the <strong>Finish</strong> button or press the <strong>Return</strong> button on the keyboard:
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_4h.jpg" alt="" /></p>
</li>
</ol>
<p>The new taxon record will appear in the <strong>Taxon Navigator</strong> panel and is
saved automatically:</p>
-<p><img src="" alt="" /></p>
+<p><img src="../img/5_4i.jpg" alt="" /></p>
<p>You can continue new taxa to any node in the classification in this
way in order to build up your taxonomic treatment. To create and manage
+<h2>Adding the Nomenclatural Status of a Name using the Details Panel\r
+ </h2>\r
+ <p>\r
+ The Details panel can be used to assign a status to a taxon name, for example, illegitimate, invalid, valid.\r
+ </p>\r
+ <p>\r
+If the taxon you want to edit is not yet open you can activate it by double-clicking the taxon record in the <strong>Taxon Navigator</strong> (see <strong>The Taxon Name Panel </strong>on page 224 for further details).\r
+ </p>\r
+ <ol start="1" type="1">\r
+ <li>\r
+ Expand the Nomenclatural Status menu by clicking the arrow icon to the left of the field label:\r
+ </li>\r
+ <li>\r
+ Click on the + symbol in the Nomenclatural Status box.\r
+ </li>\r
+ </ol>\r
+ <p align="center">\r
+ <img src="../img/6_3a.jpg"/>\r
+ </p>\r
+ <ol start="3" type="1">\r
+ <li>\r
+ Click on the arrow in Nomenclatural Status type field; a drop-down menu will appear at the right of the field.\r
+ </li>\r
+ </ol>\r
+ <p align="center">\r
+ <img src="../img/6_3b.jpg"/>\r
+ </p>\r
+ <ol start="4" type="1">\r
+ <li>\r
+ To navigate to and select the nomenclatural status you have several options:\r
+ </li>\r
+ </ol>\r
+ <p>\r
+ a. Use the up and down arrows on the keyboard until the desired nomenclatural status is highlighted and press the return button.\r
+ </p>\r
+ <p>\r
+ b. Navigate the menu by using the mouse to move the scroll bar to the right of the menu up and down, or if your mouse has a wheel you can also use\r
+ that. Click on the desired nomenclatural status.\r
+ </p>\r
+ <p>\r
+ c. Type the first letter of the name of the nomenclatural status, for example, “V” for “Valid”. The Editor will automatically\r
+ jump to the first entry within the menu with that first letter. Repeat pressing the letter until the desired nomenclatural status is highlighted and\r
+ press the return button.\r
+ </p>\r
+ <p>\r
+ <strong> </strong>\r
+ </p>\r
+ <p>\r
+ The drop-down menu will close, your selection will be shown in the Nomenclatural Status field, and the text string in the Taxon Name panel will be\r
+ updated:\r
+ </p>\r
+ <p>\r
+ <img src="../img/6_3c.jpg"/>\r
+ </p>\r
+ <p>\r
+ 5. Save the record (see <strong>Saving your Work</strong><strong> </strong>on page<strong> </strong>77).\r
+ </p>\r
+ <p>\r
+ It is also possible to add further information regarding the Nomenclatural Status using the other free text (Rule Considered and Reference detail) and\r
+ Browse boxes in the Details panel.\r
+ </p>
\ No newline at end of file
+<h3>Black text only = No warning signal\r
+ </h3>\r
+ <p>\r
+A successful parsing action will be apparent from the lack of a warning sign and no underline appearing beneath the name in the <strong>Taxon Name</strong> panel. This indicates that the text string has been separated into its constituent parts with confidence.\r
+ </p>\r
+ <table cellpadding="0" cellspacing="0">\r
+ <tbody>\r
+ <tr>\r
+ <td height="34" width="143">\r
+ <table cellpadding="0" cellspacing="0" width="100%">\r
+ <tbody>\r
+ <tr>\r
+ <td>\r
+ <div>\r
+ <p>\r
+ No warning signal\r
+ </p>\r
+ </div>\r
+ </td>\r
+ </tr>\r
+ </tbody>\r
+ </table>\r
+ </td>\r
+ </tr>\r
+ </tbody>\r
+ </table>\r
+ <img src="../img/6_1c.jpg"/>\r
+ <p>\r
+ You may still check the parsing results in the <strong>Details Panel</strong> if you wish (see <strong>Dealing with Parsing Problems</strong> below).\r
+ </p>
\ No newline at end of file
+ <h3>Building a Description Tree by adding Descriptive Data Types\r
+ </h3>\r
+ <p>\r
+ A description tree must first be created for the taxon; see the section above.\r
+ </p>\r
+ <p>\r
+ 1. Point the mouse cursor at the entry in the <strong>Descriptive panel</strong>.\r
+ </p>\r
+ <p>\r
+ 2. Press the right-hand mouse button; a menu will appear.\r
+ </p>\r
+ <p>\r
+ 3. Point the mouse cursor at the “<strong>New</strong>” option in the menu; a drop-down menu of all available descriptive data types will\r
+ be shown:\r
+ </p>\r
+ <p>\r
+ <img src="../img/8_4a.jpg"/>\r
+ </p>\r
+ <ol start="4" type="1">\r
+ <li>\r
+Click on the descriptive data type that you wish to enter for the taxon, for example “Common Name”; the data type will be added to the <strong>Description Tree</strong> and its specific data entry box will be activated in the<strong> Details</strong> panel:\r
+ </li>\r
+ </ol>\r
+ <p>\r
+ <img src="../img/8_4b.jpg"/>\r
+ </p>\r
+ <p>\r
+ A customised Descriptive Tree consisting of different description types can be created in this way. As stated previously the format of the types of\r
+ descriptive data varies; for some the data is input as free text but for others data must be chosen from options given in a drop-down menu. Therefore\r
+ examples of how to input certain descriptive data types will be given in the following sections, rather than showing how to input data for each data\r
+ type.\r
+ </p>
\ No newline at end of file
+<h2>Bulk Editing\r
+ </h2>\r
+
\ No newline at end of file
+ <h3>Bulk Editing Names\r
+ </h3>\r
+ <p>\r
+The bulk editor allows multiple taxon records that share <strong>Names</strong>, <strong>Name Relationships</strong>, <strong>References, Specimens and Observations,</strong> or <strong>Authors and Author Teams</strong> data to be edited. These data types are not\r
+ easily edited in the course of normal taxon editing and are frequently referenced (shared) in several places within a dataset, therefore they are\r
+ edited in a separate location.\r
+ </p>\r
+ <p>\r
+ In this example, we search for all the taxa within a Genus and change the Genus name.\r
+ </p>\r
+ <ol start="1" type="1">\r
+ <li>\r
+ In the Toolbar area, click on the Window menu >Bulk Editor; a drop-down menu will appear.\r
+ </li>\r
+ <li>\r
+ Click the <strong>Name</strong> option.\r
+ </li>\r
+ </ol>\r
+ <p>\r
+ <img src="../img/6_5b.jpg"/>\r
+ </p>\r
+ <p>\r
+ You will notice that a new tab has opened in the Taxon name panel titled <strong>Name</strong>. The tab has a search bar at the top and a blank space\r
+ below which will display the results of your search.\r
+ </p>\r
+ <ol start="3" type="1">\r
+ <li>\r
+ Click in search box.\r
+ </li>\r
+ <li>\r
+ Enter a search term in the search box.\r
+ </li>\r
+ </ol>\r
+ <p>\r
+ To find multiple variations for the same name it is best to use a shortened version of the name with the ‘wildcard’ icon, an asterisk (*).\r
+ The Taxonomic Editor will return all records that match the initial letters you have input but with no restrictions on the following characters (see\r
+ the example below).\r
+ </p>\r
+ <p>\r
+ Press <strong>Return</strong> on the keyboard or click on the <strong>Search</strong> button to run your search. A list of matching records will appear\r
+ beneath the search bar.\r
+ </p>\r
+ <p>\r
+ <img src="../img/6_5c.jpg"/>\r
+ </p>\r
+ <p>\r
+ You will also find that the <strong>Details Panel </strong>will display information regarding each entry in the search results when you double-click\r
+ its name within the list:\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/6_5d.jpg"/>\r
+ </p>\r
+ <p>\r
+ In order to now change the genus name of all the taxa displayed in the Taxon Names panel, click through the list and edit the name in the Details panel\r
+ to the right:\r
+ </p>\r
+ <ol start="5" type="1">\r
+ <li>\r
+ Click on a taxon from the list in the Taxon Name panel; the taxon record will be activated in the Details panel as shown above.\r
+ </li>\r
+ <li>\r
+ Expand the Name menu by clicking the arrow icon to the left of the field label:\r
+ </li>\r
+ </ol>\r
+ \r
+ <img src="../img/6_5e.jpg"/>\r
+ <ol start="7" type="1">\r
+ <li>\r
+ Click on <strong>Edit</strong>.\r
+ </li>\r
+ <li>\r
+ Edit the taxon name as desired, for example:\r
+ </li>\r
+ </ol>\r
+ <p>\r
+ <img src="../img/6_5g.jpg"/>\r
+ </p>\r
+ <ol start="9" type="1">\r
+ <li>\r
+ Click on Edit to finish.\r
+ </li>\r
+ <li>\r
+ Click the <strong>Save</strong> icon in the toolbar; the name will automatically be changed in the Taxon Names panel and in the Taxon Navigator:\r
+ </li>\r
+ </ol>\r
+ <p>\r
+ <img src="../img/6_5f.jpg"/>\r
+ </p>\r
+ <p>\r
+ You can now move down the list in the Taxon Names tab and edit all the names as described above.\r
+ </p>
\ No newline at end of file
+ <h2>Changing a Synonym to an Accepted Name\r
+ </h2>\r
+ <p>\r
+1. The accepted name taxon record which has the synonym attached to it that you wish to change to an accepted name has to be open in the <strong>Taxon Names</strong> panel (see <strong>The Taxon Name </strong>Panel on page 24 to learn how to search for and open a taxon record).\r
+ </p>\r
+ <p>\r
+ 2. Right-click anywhere within the text box of the synonym in the<strong> Taxon Names</strong> panel; a drop-down menu will appear.\r
+ </p>\r
+ <p>\r
+ 3. Point the mouse arrow over the <strong>Change To</strong> option; a new drop-down menu will appear.\r
+ </p>\r
+ <p>\r
+ 4. Click the <strong>Accepted Name</strong> option:\r
+ </p>\r
+ <p>\r
+ <img src="../img/7_6a.jpg"/>\r
+ </p>\r
+ <p>\r
+ 5. Save your changes (see <strong>Saving Synonyms</strong> on page 81 above); your changes will appear in the <strong>Taxon Navigator</strong> panel:\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/7_6b.jpg"/></p>\r
+ <h2>\r
+ </h2>
\ No newline at end of file
+ <h2>Changing an Accepted Name to a Synonym\r
+ </h2>\r
+ <p>\r
+1. The accepted name taxon record that you wish to change to a synonym has to be open in the <strong>Taxon Name</strong> panel (see <strong>The Taxon Name Panel </strong> on page 24 to learn how to search for and open a taxon record).\r
+ </p>\r
+ <p>\r
+ 2. Right-click anywhere within the text box of the taxon record in the <strong>Taxon Name </strong>panel; a drop-down menu will appear.\r
+ </p>\r
+ <p>\r
+ 3. Click on the option “Change Accepted Taxon to a Synonym”:\r
+ </p>\r
+ <p>\r
+ <img src="../img/7_7a.jpg"/>\r
+ </p>\r
+ <p>\r
+ The “Choose the accepted taxon” pop-up box will open.\r
+ </p>\r
+ <ol start="4" type="1">\r
+ <li>\r
+ Enter the name of the accepted name that you wish to attach the synonym to in the search bar at the top of the pop-up box; as you type, matching\r
+ entries will be filtered automatically and will be shown in the “Matching items” box beneath the search bar:\r
+ </li>\r
+ </ol>\r
+ <p>\r
+ <img src="../img/7_7b.jpg"/>\r
+ </p>\r
+\r
+ <ol start="5" type="1">\r
+ <li>\r
+ Select the desired accepted name by either:\r
+ </li>\r
+ <ol start="1" type="a">\r
+ <li>\r
+ Point the mouse cursor to the desired accepted name and clicking the left mouse button twice; or\r
+ </li>\r
+ <li>\r
+ Point the mouse cursor to the desired accepted name; click the left mouse button once and then click the OK button.\r
+ </li>\r
+ </ol>\r
+ </ol>\r
+ <p>\r
+ The “Choose the accepted taxon” pop-up box will close and the record that has been edited will be shown as a synonym in the Taxon Name\r
+ panel.\r
+ </p>\r
+ <p>\r
+ <img src="../img/7_7c.jpg"/>\r
+ </p>\r
+ <p>\r
+ The change is automatically saved.\r
+ </p>\r
<p>You can close the activated taxon record by clicking on the Exit icon at the right of the tab:</p>
-<p><img src="" alt="" /></p>
+ <p><img src="../img/3_4h.jpg" alt="" /></p>
<p>If you want to close a taxon record for which the tab for the record is visible, click on the tab to activate the record and click the Exit icon as shown above.</p>
The taxon record will close and the taxon name will disappear from the list.</li>
</ol>
-<p><img src="" alt="" /></p>
+ <p><img src="../img/3_4i.jpg" alt="" /></p>
-<h2>Connecting to a Different Datasources</h2>
+<h2>Connecting to a Different Datasource</h2>
<p>
The open Datasource is indicated by an open folder icon in the Datasource panel:
</p>
-<p><img src="" alt="" /></p>
+<p><img src="../img/2_11a.jpg" alt="" /></p>
<p>To open a different Datasource .</p>
<ol>
<li>Click the right mouse button with the cursor pointing to the Datasource you wish to select.</li>
<li>Click <strong>Connect</strong>.
- <p><img src="" alt="" /></p>
+ <p><img src="../img/2_11b.jpg" alt="" /></p>
The "Confirm Datasource Change" pop-up box will open.
- <p><img src="" alt="" /></p>
+ <p><img src="../img/2_11c.jpg" alt="" /></p>
</li>
<li>Click <strong>OK</strong>.
The Taxonomic Editor will restart with the selected Datasource open.
<p>If you are opening a Datasource with a Nomenclatural Code that is different to the preferred Nomenclatural Code that you selected when installing the Taxonomic Editor, you will receive a warning:
</p>
- <p><img src="" alt="" /></p>
+ <p><img src="../img/2_11d.jpg" alt="" /></p>
</li>
<li>Click <strong>OK</strong>; the warning will close and the Nomenclatural Code will be changed to match that of the Datasource.</li>
</ol>
\ No newline at end of file
+ <h2>Create an image gallery\r
+ </h2>\r
+ <p>\r
+The taxon must first be activated in the <strong>Taxon Name</strong> panel. The Media Panel must also be open <strong>Windows > Show View ></strong> <strong>Media</strong>.\r
+ </p>\r
+ <p>\r
+ 1. Point the mouse cursor in the Media panel.\r
+ </p>\r
+ <ol start="2" type="1">\r
+ <li>\r
+ Click on the right hand mouse button and a menu will appear\r
+ </li>\r
+ <li>\r
+ Select <strong>New Image Gallery </strong>\r
+ </li>\r
+ </ol>\r
+ <p>\r
+ <strong> </strong>\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/10_1a.jpg"/>\r
+ </p>\r
+ <p>\r
+ 4. Click on Image gallery to open in details panel . You can change the label here, should you wish, in the Label freetext box.\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/10_1b.jpg"/>\r
+ </p>\r
+ <p>\r
+ 5. Expand the image gallery by clicking on the menu arrow in the media panel. There will already be one existing ‘empty media’.\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/10_1c.jpg"/>\r
+ </p>\r
+ <p>\r
+ 6. To add additional images (or galleries) right click in the window and make selection from menu.\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/10_1d.jpg"/>\r
+ </p>\r
+ <p>\r
+ 7. Click on image to open in details panel.\r
+ </p>\r
+ <p>\r
+ <img src="../img/10_1e.jpg"/>\r
+ </p>\r
+ <p>\r
+8. Add title, artist and description as required. This will automatically be updated in the Media window. Then click on + symbol to expand <strong>Media Representation</strong> menu.\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/10_1f.jpg"/>\r
+ </p>\r
+ <p>\r
+ 9. Enter the type of image file in the Mime type field. Click on the + symbol to expand <strong>Media Representation Part</strong> menu.\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/10_1g.jpg"/>\r
+ </p>\r
+ <p>\r
+ 10. Enter the URI of where the image is to be found in the URI field. The size, height and width fields will be automatically filled. The image will be\r
+ visible beneath this.\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/10_1h.jpg"/>\r
+ </p>\r
+</div>
\ No newline at end of file
<p>It is recommended that you create a desktop shortcut to the file location of the TaxonomicEditor.exe file as soon as you have downloaded and installed the Taxonomic Editor. You will then be able to open the Taxonomic Editor using the shortcut instead of having to navigate to the .exe file location. These instructions apply only to Windows systems.</p>
<ol>
- <li>Locate and open the extracted Taxonomic Editor folder in the destination in which you chose to extract the folder (if you selected the “Show extracted files when complete” option when extracting the folder it will automatically open).</li>
+ <li>Locate and open the extracted Taxonomic Editor folder in the destination in which you chose to extract the folder (if you selected the “Show extracted files when complete� option when extracting the folder it will automatically open).</li>
<li>Right-click the <strong>TaxonomicEditor.exe</strong> file; a drop-down menu will appear.</li>
<li>Click the <strong>Send To</strong> option.</li>
<li>Click the <strong>Desktop (create shortcut)</strong> option.</li>
</ol>
-<p><img src="" alt="" /></p>
+<p><img src="../img/2_4a.jpg" alt="" /></p>
<p>This will create a shortcut on your desktop that will automatically open the Taxonomic Editor:</p>
-<p><img src="" alt="" /></p>
+<p><img src="../img/2_4b.jpg" alt="" /></p>
<p>You can double-click this icon to open the Taxonomic Editor.</p>
\ No newline at end of file
<li>Click the <strong>General</strong> menu in the <strong>Toolbar</strong> > move the mouse to the <strong>New</strong>
option; a drop-down menu will appear > Click the <strong>Classification</strong> option:
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1b.jpg" alt="" /></p>
<p>Alternatively, you can access the New > Classification menu by clicking the right
mouse button with the mouse arrow pointing within the Taxon Navigator
<li>Enter a label for the Classification. This could be the name of a
project or publication, for example:
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1c.jpg" alt="" /></p>
<p>You may enter reference details if you wish:</p>
</li>
<li>Click the <strong>Browse</strong> button to the right of the Reference field:
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1d.jpg" alt="" /></p>
`
<p>A new pop-up box entitled <strong>"Choose a reference"</strong> will appear. The cursor
will appear in the search box by default. You can search here for a
reference that you already have within your database:</p>
</li>
<li>Type in the title of the reference; as you type, matching references
- from within your database will be filtered and shown in the </strong>“Matching
- items”</strong> box beneath the search box:
+ from within your database will be filtered and shown in the </strong>"Matching
+ items"</strong> box beneath the search box:
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1e.jpg" alt="" /></p>
<p>If you are creating a new database or do not have the required reference
already input, you can choose to create a new reference by clicking
- the text at the bottom of the “Choose a reference” box:</p>
+ the text at the bottom of the "Choose a reference" box:</p>
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1f.jpg" alt="" /></p>
</li>
- <li>The </strong>“Create reference”</strong> pop-up box will appear:
+ <li>The </strong>"Create reference"</strong> pop-up box will appear:
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1g.jpg" alt="" /></p>
<p>Choose a reference type from the drop-down menu:</p>
</li>
<li>Click on the arrow to the right of the Reference Type field; a
drop-down list will appear:
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1h.jpg" alt="" /></p>
</li>
<li>Scroll down the list; there are several methods for doing this:
<li>Enter the title of the reference in the title field.</li>
<li>To enter Author details click on browse existing.
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1i.jpg" alt="" /></p>
</li>
- <li>The <strong>“choose team”</strong> pop up box will appear. The cursor will appear in
+ <li>The <strong>"choose team"</strong> pop up box will appear. The cursor will appear in
the search box by default. You can search for an author or team of
authors that you already have within your database:
</li>
<li>Type in the name of the Author; as you type, matching authors from
- within your database will be filtered down and shown in the <strong>“matching
- items”</strong> box beneath the search box.
+ within your database will be filtered down and shown in the <strong>"matching
+ items"</strong> box beneath the search box.
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1j.jpg" alt="" /></p>
<p>If you are creating a new database or do not have the required author
already input, you can choose to create a new author by clicking on
- the text at the bottom of the <strong>“Choose Team”</strong> box.</p>
+ the text at the bottom of the <strong>"Choose Team"</strong> box.</p>
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1k.jpg" alt="" /></p>
</li>
- <li>The “New Entity” pop-up box will appear
+ <li>The "New Entity pop-up box will appear
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1l.jpg" alt="" /></p>
</li>
- <li>Click on the + sign to add team member. A” person” field will then
+ <li>Click on the + sign to add team member. A" person" field will then
appear.
</li>
<li>Click on the edit button
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1m.jpg" alt="" /></p>
</li>
- <li>A ‘new entity’ free text box will pop-up. To enter a person (author)
+ <li>A ‘new entity’ free text box will pop-up. To enter a person (author)
click on the edit button. The fields will become white and can now be
edited.
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1n.jpg" alt="" /></p>
</li>
<li>Enter author name and click on edit.
</li>
<li>Click finish.
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1o.jpg" alt="" /></p>
</li>
<li>The name will then automatically appear in the Choose a person pop-up
box.
</li>
<li>Select OK.
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1p.jpg" alt="" /></p>
</li>
<li>Click finish on new entity pop-up box. Or if there are multiple
authors repeat steps 14 to 21 to add additional people.
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1q.jpg" alt="" /></p>
</li>
<li>Click OK in Choose Team pop-up box
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1r.jpg" alt="" /></p>
</li>
<li>The author will now appear in the reference box.
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1s.jpg" alt="" /></p>
</li>
<li>Complete the rest of the free text boxes. Depending on the reference
type there may be other fields which need to be filled from the
</li>
<li>Select Finish.
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1t.jpg" alt="" /></p>
</li>
- <li>Select OK in “Choose a Reference” pop-up box.
+ <li>Select OK in "Choose a Reference" pop-up box.
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1u.jpg" alt="" /></p>
</li>
<li>Click finish in New Classification pop-up
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1v.jpg" alt="" /></p>
</li>
<li>The name of your new Classification will appear in the Taxon
Navigator panel:
- <p><img src="" alt="" /></p>
+ <p><img src="../img/5_1w.jpg" alt="" /></p>
</li>
</ol>
in a lighter colour than the actual taxa names. You can use the arrows
to the left of the taxonomic tree labels and the taxon nodes to show or
hide the child taxon/taxa that are attached to that tree or taxon:</p>
+
+ <p><img src="../img/5_1x.jpg" alt="" /></p>
<p>
Window > Show View > Datasource
</p>
- <p><img src="" alt="" />
- The Datasource panel will open at the bottom of the Taxonomic Editor window.</p>
+ <p><img src="../img/2_10a.jpg" alt="" /></p>
+ <p>The Datasource panel will open at the bottom of the Taxonomic Editor window.</p>
</li>
<li>Press the right-click of the mouse with the cursor pointing within the Datasource panel; a drop-down menu will appear.</li>
<li>Click <strong>New</strong>:
The <strong>"Create New Datasource"</strong> panel will appear.
+<p><img src="../img/2_10b.jpg" alt="" /></p>
</li>
<li>Enter a name for the Datasource in the Datasource Name field:</li>
+ <p><img src="../img/2_10c.jpg" alt="" /></p>
<li>Click the arrow icon to the right of the <strong>Database Type field</strong>; a drop-down menu will appear.</li>
<li>Click the <strong>"H2 Database"</strong> option.
- <p><img src="" alt="" />
+ <p><img src="../img/2_10d.jpg" alt="" /></p>
+ <p>
The drop-down menu will close.
</p>
</li>
<li>
Click Next.
- <p><img src="" alt="" /></p>
+ <p><img src="../img/2_10e.jpg" alt="" /></p>
The <strong>"Enter credentials for embedded H2 database"</strong> pop-up box will open.
</li>
<li>Enter a Database name (for example the name of a user or a taxonomic group).</li>
<li>Select <strong>ICBN</strong> or <strong>ICZN</strong> as appropriate.</li>
<li>Click <strong>Finish</strong>.</li>
+ <p><img src="../img/2_10f.jpg" alt="" /></p>
</ol>
<p><strong>Please Note:</strong> There is no need to input a user name or password. Although you can create a user name and password if you wish, the enforcement of this function is not yet operational, therefore a user will be able to edit any datasource without using the username and password.</p>
-<p>The new Datasource will appear in the Datasource panel:<img src="" alt="" /></p>
+<p>The new Datasource will appear in the Datasource panel: <p><img src="../img/2_10g.jpg" alt="" /></p></p>
<p>The process to create new datasources can be repeated as many times as desired.</p>
\ No newline at end of file
<p>To open a perspective</p>
<ol>
- <li>Click on the “open perspective button”</li>
- <li>Select other. A list of available perspectives will be displayed in the “open perspective” pop-up. Select a perspective and it will open in the editor.</li>
+ <li>Click on the "open perspective button"</li>
+ <li>Select other. A list of available perspectives will be displayed in the "open perspective" pop-up. Select a perspective and it will open in the editor.</li>
</ol>
-<p><img src="" alt="" /></p>
+<p><img src="../img/4_3a.jpg" alt="" /></p>
<p>After a new perspective has been opened the last perspective viewed will remain open but will be hidden and replaced by the new perspective. A new button will be added to the perspectives tab allowing you to quickly switch between perspectives.</p>
<p>After a new button has been added to the perspective tabs you may find that there is insufficient room to display all the buttons in which case the perspective tabs will display a double headed arrow on the right hand side as shown below.</p>
-<p><img src="" alt="" /></p>
+<p><img src="../img/4_3b.jpg" alt="" /></p>
<p>To reveal the hidden buttons you can either click on the double headed arrow, the results of which are shown below</p>
-<p><img src="" alt="" /></p>
+<p><img src="../img/4_3c.jpg" alt="" /></p>
<p>Or you can hover the mouse over the left hand edge of the tab until the cursor changes to a double headed arrow as shown below.</p>
-<p><img src="" alt="" /></p>
+<p><img src="../img/4_3d.jpg" alt="" /></p>
<p>When the cursor changes in this way left click the mouse and drag the edge of the tab to the left to enlarge it. Release the mouse button when you are happy with the size of the tab. The following screen shot shows the editor with the perspective tab enlarge sufficiently to display all three open perspective buttons and with the taxonomic perspective currently active.</p>
-<p><img src="" alt="" /></p>
+<p><img src="../img/4_3e.jpg" alt="" /></p>
<p>The screen shots below show the effect of changing between a taxonomic and bulk editing frame work.</p>
-<p>Default Taxonomic Perspective<img src="" alt="" /></p>
+<p>Default Taxonomic Perspective<img src="../img/4_3e.jpg" alt="" /></p>
-<p>Bulk Editing Perspective<img src="" alt="" /></p>
+<p>Bulk Editing Perspective<img src="../img/4_3f.jpg" alt="" /></p>
<ol>
<li>Left click on the grey area of the top tab of a panel and keep holding the mouse button down, a grey box will appear around the panel.
- <p><img src="" alt="" /></p>
+ <p><img src="../img/4_3g.jpg" alt="" /></p>
</li>
<li>Drag panel to new location. The grey box shows where the panel will be moved to. It is best to experiment with moving panels around the interface in order to get the hang of this behaviour. In the examples below the details panel is moved in front of the descriptive panel, to form a new column alongside the taxon name tabs and beneath the descriptive panel.
<p>Details panel is moved to to create a new alongside the Descriptive panel.
- The file icon (<img src="" alt="" />) shows that the details panel will be stacked behind any panels which are located here already.
- <img src="" alt="" /></p>
+ The file icon (<img src="../img/fileicon.jpg" alt="" />) shows that the details panel will be stacked behind any panels which are located here already.
+ <img src="../img/4_3aa.jpg" alt="" /></p>
<p>
Details panel is moved to form a new column alongside the Taxon Name panel. NB this will now need to be resized to display the text.
-The black arrow icon (<img src="" alt="" />) shows that the details panel will form a new column rather than stacking behind the existing panels in the space.
+The black arrow icon (<img src="../img/blackarrow.jpg" alt="" />)shows that the details panel will form a new column rather than stacking behind the existing panels in the space.
- <img src="" alt="" /></p>
+ <p><img src="../img/4_3bb.jpg" alt="" /></p></p>
<p>
Details panel is moved to form a new column alongside the Taxon Name
- <img src="" alt="" /></p>
+
</li>
</ol>
+<p><img src="../img/4_3cc.jpg" alt="" /></p>
<p>Panels can also be detached from the workspace. This can be done in two ways.</p>
<ol>
<li>Drag the grey outline of the panel out of the workspace the release the button</li>
<li>Right click on the tab at the top of the panel and select detached form the drop down menu.
- <p><img src="" alt="" /></p>
+<p><img src="../img/4_3j.jpg" alt="" /></p>
</li>
</ol>
<p>To reattach the panel again right click in heading tab and unselect detached tick box.</p>
-<p><img src="" alt="" /></p>
+ <p><img src="../img/4_3k.jpg" alt="" /></p>
+<h2>Dealing with Parsing Problems\r
+ </h2>\r
+ <p>\r
+ If you have received a warning sign after entering a new taxon (see <strong>Parsing Status Feedback</strong> above) or would like to check the parsing\r
+ results you will need to check these data fields in the <strong>Details Panel</strong>. This panel is an editable display of the data fields that are\r
+contained within the database. A taxon record is displayed in the <strong>Details Panel</strong> when it has been activated in the<strong>Taxon Name panel</strong>. If the taxon you need to edit is not yet open you can activate it by double-clicking the taxon record in the <strong>Taxon Navigator</strong> panel (see <strong>The Taxon Name Panel </strong> on page 4 for further details).\r
+ </p>\r
+ <p>\r
+Initially you will need to expand the high level menus to reveal the relevant data fields and further menus below them. This will include at least the<strong> Name</strong> menu and <strong>Scientific Name </strong>sub-menu, but you may also need to expand the <strong>Authorship </strong>sub <strong>-</strong>menu depending on the information you are checking/editing.\r
+ </p>\r
+ <p>\r
+ The menus can be expanded or minimised using the arrow icons to the left of the appropriate menu. These arrows are only activated when the mouse arrow\r
+ is located within the <strong>Details</strong> panel.\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/6_2a.jpg"/>\r
+ </p>\r
+ <p>\r
+This version of the manual explains how to address problems with the basic data fields of <strong>Rank</strong>, <strong>Uninomial</strong> and <strong>Specific Epithet</strong>. The <strong>Parsing Status</strong> field at the bottom of the <strong>Details</strong> <strong>panel</strong> will\r
+ inform you of which field to check:\r
+ </p>\r
+ <table cellpadding="0" cellspacing="0">\r
+ <tbody>\r
+ <tr>\r
+ <td height="72" width="225">\r
+ <table cellpadding="0" cellspacing="0" width="100%">\r
+ <tbody>\r
+ <tr>\r
+ <td>\r
+ <div>\r
+ <p>\r
+ <em>\r
+If you see this parsing status you should check the <strong>Uninomial</strong> and <strong>Specific Epithet</strong> fields\r
+ </em>\r
+ </p>\r
+ </div>\r
+ </td>\r
+ </tr>\r
+ </tbody>\r
+ </table>\r
+ </td>\r
+ </tr>\r
+ </tbody>\r
+ </table>\r
+ <img src="../img/6_2b.jpg"/>\r
+ <table cellpadding="0" cellspacing="0">\r
+ <tbody>\r
+ <tr>\r
+ <td height="58" width="225">\r
+ <table cellpadding="0" cellspacing="0" width="100%">\r
+ <tbody>\r
+ <tr>\r
+ <td>\r
+ <div>\r
+ <p>\r
+ <em>If you see this parsing status you should check the <strong>Rank</strong> field</em>\r
+ </p>\r
+ </div>\r
+ </td>\r
+ </tr>\r
+ </tbody>\r
+ </table>\r
+ </td>\r
+ </tr>\r
+ </tbody>\r
+ </table>\r
+ <img src="../img/6_2c.jpg"/>\r
+ <p>\r
+ Remember, if there continues to be a parsing problem after you have checked that the correct data is stored in the correct data field, the record can\r
+ remain as it is; you will not be forced to eliminate the parsing problem before the data can be saved.\r
+ </p>
\ No newline at end of file
+ <h2>Deleting a Synonym\r
+ </h2>\r
+ <p>\r
+1. The accepted name to which the synonym you wish to delete has to be open in the <strong>Taxon Name</strong> panel (see <strong>The Taxon Name Panel </strong> on page 24 to learn how to search for and open a taxon record).\r
+ </p>\r
+ <p>\r
+ 2. When the record is open, point the mouse arrow into the text box of the synonym you want to delete within the <strong>Taxon Name</strong> panel.\r
+ </p>\r
+ <p>\r
+ 3. Click the right mouse button; a drop-down menu will appear.\r
+ </p>\r
+ <p>\r
+ 4. Click the <strong>delete</strong> option.\r
+ </p>\r
+ <p>\r
+ <img src="../img/7_5a.jpg"/></p>\r
+ \r
+ <p>\r
+ 5. Save your changes (see <strong>Saving your Work</strong> on page 77).\r
+ </p>
\ No newline at end of file
+ <h2>Deleting a Taxon\r
+ </h2>\r
+ <p>\r
+ There are two ways of deleting a taxon:\r
+ </p>\r
+ <ol start="1" type="1">\r
+ <li>\r
+ Click on the taxon in the <strong>Taxon Navigator</strong> panel > press <strong>delete</strong> on the keyboard > go to step 3., or:\r
+ </li>\r
+ <li>\r
+ Point the mouse arrow at the taxon name in the <strong>Taxon Navigator</strong> panel and click the right mouse button; a drop-down menu will\r
+ appear > click the <strong>Delete</strong> option.\r
+ </li>\r
+ </ol>\r
+ <p>\r
+ <img src="../img/6_4a.jpg"/>\r
+ </p>\r
+ <p>\r
+ A pop-up box will appear asking you for confirmation to delete the taxon from the taxon navigator.\r
+ </p>\r
+ <ol start="3" type="1">\r
+ <li>\r
+ Click the <strong>OK</strong> button:\r
+ </li>\r
+ </ol>\r
+ <p>\r
+ <img src="../img/6_4b.jpg"/>\r
+ </p>\r
+ <p>\r
+ The taxon will disappear from the Taxon Navigator panel.\r
+ </p>\r
+ <p>\r
+ <strong>Please Note: </strong>\r
+ You can delete a taxon even if it has child taxa attached to it; all the records will be deleted. You cannot undo this action so you should be sure\r
+ that this is what you want to do.\r
+ </p>\r
+
\ No newline at end of file
<p>Alternatively, you can access the download site directly by entering <a href="http://wp5.e-taxonomy.eu/downlaod/taxeditor">http://wp5.e-taxonomy.eu/downlaod/taxeditor</a> into the address bar of your browser.</p>
</li>
<li>Click on the download link and then navigate to the latest version of the Taxonomic Editor
- <p>The following steps will differ slightly depending on whether you are using Mozilla Firefox or Internet Explorer and the operating system you are using. If you are using Mozilla Firefox on Vista, you will be taken straight to the “Save As” details pop-up box; go to Step 5. If you are using Internet Explorer or Mozilla Firefox on an older operating system such as Windows XP, you will see a pop-up box the same as or similar to the ones shown below; go to step 4.</p>
+
+ <p><img src="../img/2_1a.jpg" alt="" /></p>
+ <p><img src="../img/2_1b.jpg" alt="" /></p>
+ <p><img src="../img/2_1c.jpg" alt="" /></p>
+
+ <p>The following steps will differ slightly depending on whether you are using Mozilla Firefox or Internet Explorer and the operating system you are using. If you are using Mozilla Firefox on Vista, you will be taken straight to the “Save As� details pop-up box; go to Step 5. If you are using Internet Explorer or Mozilla Firefox on an older operating system such as Windows XP, you will see a pop-up box the same as or similar to the ones shown below; go to step 4.</p>
</li>
- <li>Click the Save button or choose the Save option. Click the OK button if necessary. The “Save As” details pop-up box will open; go to step 5.
-
- <p><img src="" alt="" /></p>
- Mozilla Firefox and Vista/Windows XP
- <p><img src="" alt="" /></p>
- Internet Explorer and Vista/Windows XP
+ <li>Click the Save button or choose the Save option. Click the OK button if necessary. The “Save As� details pop-up box will open; go to step 5.
+
+ <p><img src="../img/2_1d.jpg" alt="" /></p>
</li>
- <li>Choose a destination for the folder containing the Taxonomic Editor (Tip! You may have to click a Browse Folders button as shown below in order to access your computer’s directory). Make a note of the destination.</li>
+ <li>Choose a destination for the folder containing the Taxonomic Editor (Tip! You may have to click a Browse Folders button as shown below in order to access your computer’s directory). Make a note of the destination.</li>
<li>Enter a file name or use the default file name. Make a note of the file name.</li>
<li>"Save as type" should be Compressed (Zipped) Folder.
- <p><img src="" alt="" /></p>
- <p><img src="" alt="" /></p>
+ <p><img src="../img/2_1e.jpg" /></p>
<p>"Save As" details box: choose a location and name for the folder (choose a new name or keep the default) and Save.</p>
<p><strong>Tip!</strong> If you are using Mozilla Firefox and you do not see a pop-up box as shown above, your internet options may not be set up to ask for confirmation on where to save files that you download. The folder will automatically be saved to your desktop. If you wish to change this setting, see the Troubleshooting instructions at the end of this section.</p>
</li>
<li>Click the <strong>Save</strong> button; a download progress bar will appear. The download may take a few minutes.
- <p><img src="" alt="" /></p>
+<p><img src="../img/2_1f.jpg" alt="" /></p>
<p>You now have to extract the contents of the compressed folder; the exact method will depend on whether you are using Mozilla Firefox or Internet Explorer (see Extracting the Contents of the Compressed Folder (Internet Explorer) or Extracting the Contents of the Compressed Folder (Mozilla Firefox) below).</p>
</li>
<h3>Troubleshooting: Mozilla Firefox Settings</h3>
<p>If your internet settings are set up to not ask you for confirmation as to where to save files and folders that you are downloading, they will automatically be saved to your desktop. If you want to change this setting open the <strong>Mozilla Firefox</strong> start page > click on the <strong>Tools</strong> menu on the toolbar at the top of the screen > click on Options. A new pop-up box will open. Click in the box to the right of the text <strong>"Always ask me where to save files"</strong> and click OK:</p>
-<p><img src="" alt="" /></p>
+<p><img src="../img/2_1g.jpg" alt="" /></p>
\ No newline at end of file
<ol>
<li>Open the <strong>Preferences</strong> pop-up box (<strong>Toolbar > Window</strong> menu > <strong>Preferences</strong> option).</li>
<li>Navigate to the element you wish to change by expanding the <strong>Description</strong> or <strong>Taxonomic</strong> menus found in the Taxonomic Editor menu:
- <p><img src="" alt="" /></p>
+ <p><img src="../img/4_1f.jpg" alt="" /></p>
</li>
<li>Click on the data field you would like to edit so that it is highlighted. The example shown below is editing the <strong>Conservation</strong> feature.
- <p><img src="" alt="" /></p>
+ <p><img src="../img/4_1g.jpg" alt="" /></p>
</li>
<li>Click the <strong>Edit</strong> button:
- <p><img src="" alt="" /></p>
+ <p><img src="../img/4_1h.jpg" alt="" /></p>
<p>The "Edit Feature" pop-up box will open.</p>
</li>
<li>Edit the feature as desired. An example is given below:
- <p>Original Feature details<img src="" alt="" /></p>
- <p>Edited Feature details<img src="" alt="" /></p>
+ <p>Original Feature details<img src="../img/4_1i.jpg" alt="" /></p>
+ <p>Edited Feature details<img src="../img/4_1j.jpg" alt="" /></p>
</li>
<li>Click the <strong>Finish</strong> button:
- <p><img src="" alt="" /></p>
+ <p><img src="../img/4_1k.jpg" alt="" /></p>
</li>
</ol>
<p>If you have edited the name of the Feature this will be immediately visible in the Features list:</p>
-<p><img src="" alt="" /></p>
+<p><img src="../img/4_1l.jpg" alt="" /></p>
\ No newline at end of file
+<h2>Editing Synonyms\r
+ </h2>\r
+ <p>\r
+A synonym name is parsed in exactly the same way as a root or child taxon. However, in the <strong>Details </strong> panel you will see that<strong>Synonym Name</strong> is seen at the top, rather than Accepted Name. The details of a synonym name can be expanded and edited in the <strong>Details</strong> panel in the same was as a child taxon (see <strong>Editing your Taxa</strong> on page 66).\r
+ </p>\r
+ <p><img src="../img/7_4a.jpg"/>\r
+ </p>
\ No newline at end of file
<h2>Enabling Unicode Characters</h2>
-<p>The Taxonomic Editor uses the operating system's default font to display all the fields that store specimen data. On a Macintosh, the system font is Unicode-compliant, so there is no problem displaying specimen data that includes symbols such as ♀ and ♂. On some, mainly older Windows systems, this is unfortunately not the case. To ensure that all data will be visible on your system, you may need to install a Unicode-compliant font on your Window’s system. If you are experiencing this problem it can be resolved quite easily:</p>
+<p>The Taxonomic Editor uses the operating system's default font to display all the fields that store specimen data. On a Macintosh, the system font is Unicode-compliant, so there is no problem displaying specimen data that includes symbols such as ♀ and ♂. On some, mainly older Windows systems, this is unfortunately not the case. To ensure that all data will be visible on your system, you may need to install a Unicode-compliant font on your Windows system. If you are experiencing this problem it can be resolved quite easily:</p>
<ol>
<li>Right-click on your Desktop.</li>
<li>Click Properties in the drop-down menu > Click the Appearance tab > Click the Advanced option. A new pop-up box will open.</li>
- <li>Click the “Item” drop-down menu and select Message Box.</li>
- <li>Click the “Font” drop-down menu and select Arial Unicode MS.
+ <li>Click the Item drop-down menu and select Message Box.</li>
+ <li>Click the Font drop-down menu and select Arial Unicode MS.
<p>The Unicode characters should now appear in the Taxonomic Editor.</p>
- <p><img src="" alt="" /></p>
+ <p><img src="../img/2_8a.jpg" alt="" /></p>
<p>If the Arial Unicode MS font is not shown as an option in the Font drop-down menu, and you are using Microsoft Office 2000 or later, you can obtain the font from your Microsoft Office CD:</p>
</li>
<li>Insert the Office CD, and do a Custom Install.</li>
<ol>
<li>Open the folder by double-clicking it in the pop-up box:
+ <p><img src="../img/2_3a.jpg" alt="" /></p>
<p>Alternatively, locate the folder in the destination in which you chose to save it, and double-click the .zip folder.</p>
</li>
+
<li>Click the <strong>Extract All Files</strong> button:
- <p><img src="" alt="" /></p>
+ <p><img src="../img/2_3b.jpg" alt="" /></p>
<p>A new pop-up box will open for you to choose the destination where the extracted folder will be placed. The default destination will be the location of the compressed folder; if you wish the extracted folder to be in the same place as the compressed folder there is no need to change the destination.</p>
</li>
<li>Select the folder destination using the Browse button or leave the default destination.
</li>
- <li>Ensure “Show extracted files when complete” is selected, and click the <strong>Extract</strong> button.
+ <li>Ensure “Show extracted files when complete� is selected, and click the <strong>Extract</strong> button.
<p>
- <img src="" alt="" />
+ <img src="../img/2_3c.jpg" alt="" />
The contents of the compressed folder will be extracted; this may take a few minutes.
</p>
</li>
<li>Right-click the folder.
</li>
<li>Click the <strong>Extract Files</strong> option.
- <p><img src="" alt="" /></p>
+ <p><img src="../img/2_2a.jpg" alt="" /></p>
<p>A new pop-up box will open for you to choose the destination where the extracted folder will be placed. The default destination will be the location of the compressed folder; if you wish the extracted folder to be in the same place as the compressed folder there is no need to change the destination.</p>
</li>
<li>Select the destination and click the <strong>OK</strong> button. The folder will be extracted; this may take a few minutes.
- <p><img src="" alt="" /></p>
+ <p><img src="../img/2_2b.jpg" alt="" /></p>
</li>
</ol>
<p>Every time you open the Taxonomic Editor a log-in pop-up box will open. It allows changes to be tracked if there will be multiple users of the underlying CDM data store and you need to track changes. There are currently no authorization mechanisms in place and the login is therefore solely for authentication. Each user can log in under their own account.</p>
-<p><img src="" alt="" /></p>
+<p><img src="../img/2_6a.jpg" alt="" /></p>
<p><strong>Tip!</strong> A CDM datasource will have a user named admin with password '00000', so you can login immediately. The default password should the be changed.</p>
-
+
\ No newline at end of file
+<h1>Managing Taxonomic Relationships</h1>\r
+\r
+<p>This sections tells you how to:\r
+ <ol>\r
+ <li>Add heterotypic and homotypic synonyms to taxa.</li>\r
+ <li>Save, delete and edit synonyms.</li>\r
+ <li>Change a synonym to an accepted name.</li>\r
+ <li>Change the position of taxa within a taxonomic tree.</li>\r
+ </ol>\r
+</p>\r
<p>In all sections of the Editor except the toolbar clicking the <strong>right mouse button</strong> will open up a context menu containing a list of possible commands that can be performed on the data element the mouse is pointing at. When no commands are available right-click will have no effect.</p>
-<p>Most of the commands written in the manual are based on the user using the mouse. However, it is also possible to use the keyboard for some functions. Notably, when pop-up boxes require confirmation by selecting ‘OK’ or ‘Finish’, the default setting will be on the OK/Finish button, therefore you can select OK/Finish by pressing Return on the keyboard as well as clicking the button with the mouse.</p>
+<p>Most of the commands written in the manual are based on the user using the mouse. However, it is also possible to use the keyboard for some functions. Notably, when pop-up boxes require confirmation by selecting "OK" or "Finish", the default setting will be on the OK/Finish button, therefore you can select OK/Finish by pressing Return on the keyboard as well as clicking the button with the mouse.</p>
<p>Keyboard arrows can be used to navigate around the Toolbar area to find menus and make selections. You must first click on one of the menus using the mouse, but can then use the arrows on the keyboard to navigate and the Return/Enter key to make your selection.</p>
+ <h2>Moving the Position of Taxa within a Taxonomic Tree\r
+ </h2>\r
+ <p>\r
+If a taxonomic treatment has changed and you need to update your classification to reflect this, this can be done easily via the <strong>Move Taxon (with Child taxa)</strong> function. This function allows you to move a taxon with any associated synonyms and child taxa.\r
+ </p>\r
+ <p>\r
+ 1. Point the mouse arrow at the taxon name which you want to change within the <strong>Taxon Navigator</strong> panel.\r
+ </p>\r
+ <p>\r
+ 2. Click the right mouse button; a drop-down menu will appear.\r
+ </p>\r
+ <p>\r
+ 3. Click the <strong>Move Taxon (with child taxa)</strong> option:\r
+ </p>\r
+ <p>\r
+ <img src="../img/7_8a.jpg"/>\r
+ </p>\r
+ <p>\r
+ 4. The “Choose new parent” pop-up box will open. Select the classification in which you are searching in the drop down menu at the bottom\r
+ of the box.\r
+ </p>\r
+ <p>\r
+ 5. In the text box at the top of the box, enter a term to search for the parent taxon to which you would like to move the child to. As you type the\r
+ Taxonomic Editor will automatically search for matching taxon names. You can also use (*) to search using part of the name, or (?) to see all entries.\r
+ A list will appear with matching taxon names:\r
+ </p>\r
+ <p>\r
+ <img src="../img/7_8b.jpg"/>\r
+ </p>\r
+ <p>\r
+ 6. Click on the name of the desired parent taxon.\r
+ </p>\r
+ <p>\r
+ 7. Click the <strong>OK </strong>button or press <strong>Return </strong>on the keyboard. Alternatively, simply double-click the name of the desired\r
+ parent taxon.\r
+ </p>\r
+ <p>\r
+ 8. The location of the selected child taxon will be moved within the Taxonomic Tree and will be saved automatically:\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/7_8c.jpg"/>\r
+ </p>\r
+ <strong>\r
+ <br clear="all"/>\r
+ </strong>
\ No newline at end of file
<p>It is possible to open multiple taxon records so that there are several documents open in the <strong>Taxon Name</strong> panel. Each taxon will be opened as a new document; each document can be accessed by clicking on the appropriate tab at the top of the free text panel. A double-arrow icon will displayed at the top right of the panel when there are more taxa open than are currently visible; the number refers to the number of open taxon records.</p>
<p>The tabs of 2 taxon records are visible and there are 4 open taxon records that are not currently displayed
- <img src="" alt="" />
+ <p><img src="../img/3_4f.jpg" alt="" /></p>
</p>
<p>In order to view more tabs of taxon records you can expand the width of the <strong>Taxon Name</strong> panel using the arrows that appear at the sides of the panel when you hover the mouse arrow over them (see <a href="">Panel Sizes</a>). Also, clicking on the double-arrow icon will reveal a list of all the open taxon records; those in <strong>bold</strong> are those for which the tabs are not current displayed:</p>
<p>
-<img src="" alt="" />
+ <p><img src="../img/3_4g.jpg" alt="" /></p>
Taxa with currently displayed tabs
Open taxa with tabs not currently displayed
<p>The Taxonomic Editor allows for the input of data in a hierarchical way. Databases within the Taxonomic Editor consist of Taxonomic classifications composed of linked child nodes representing the taxa in the classification:</p>
-<p><img src="" alt="" /></p>
+<p><img src="../img/5_1a.jpg" alt="" /></p>
<p>You can have several classifications within your database, with unlimited numbers of taxa in each one. Synonyms can be attached to taxa at any level in the classification.</p>
<h3>Opening and Closing Panels</h3>
-<p>Each individual panel can be minimised/maximised using the icons at the top right of the panel, or closed using the ‘X’ icon on the tab bearing the name of each panel:</p>
+<p>Each individual panel can be minimised/maximised using the icons at the top right of the panel, or closed using the 'X' icon on the tab bearing the name of each panel:</p>
-<p><img src="" alt="" /></p>
+<p><img src="../img/4_2d_text.jpg" alt="" /></p>
<p>The panels can be reopened using the Show View menu (see <a href="">The Show View Menu</a>).</p>
\ No newline at end of file
+ <h2>Opening the Descriptive Panel for a Taxon\r
+ </h2>\r
+ <p>\r
+The <strong>Descriptive Panel</strong> can be viewed via the windows menu. Windows > Show View > Descriptive. A taxon has to be included in the <strong>Taxon Navigator</strong> panel and has to be activated within the <strong>Taxon Names </strong>panel before descriptive data can be added to\r
+ that taxon.\r
+ </p>
\ No newline at end of file
<p>A security warning may open; this is a standard Windows security warning asking for confirmation that you trust the source of the application.</p>
</li>
- <li>If you have received a Security Warning pop-up, deselect the option “Always ask before opening this file” – this will prevent this pop-up box from appearing every time you run the Taxonomic Editor.</li>
+ <li>If you have received a Security Warning pop-up, deselect the option "Always ask before opening this file" this will prevent this pop-up box from appearing every time you run the Taxonomic Editor.</li>
<li>Click the Run button to continue opening the Taxonomic Editor.</li>
+ <img src="../img/2_5a.jpg" alt="" />
<li>The Taxonomic Editor will load and open; this may take a minute or two the first time you open the Taxonomic Editor.</li>
<li>The first time you run the Taxonomic Editor, you will be asked to choose a nomenclatural code. Select the code you wish to use and click the OK button.
<p>
- <img src="" alt="" />
+ <img src="../img/2_5b.jpg" alt="" />
A pop-up box will open confirming your choice of nomenclatural code.
</p>
</li>
</ol>
-<p>You can change the nomenclatural code at any time in the “Preferences” (see The Preferences Menu).</p>
+<p>You can change the nomenclatural code at any time in the "Preferences" (see The Preferences Menu).</p>
\ No newline at end of file
+<h3>\r
+ Orange warning icon = Parsing completed but checks are recommended\r
+ <br clear="all"/>\r
+ </h3>\r
+ <p>\r
+ <img src="../img/6_1b.jpg"/>\r
+ </p>\r
+ <p>\r
+ The taxon name will be underlined in orange and there will be an orange warning sign\r
+ <img src="../img/orangewarning.jpg" border="0" height="18" width="19"/>\r
+ to the left of the taxon name. This indicates that parsing has been successful, but that there is an element of uncertainty and you may want to check\r
+ that the parser has correctly inserted the separate elements of your text string in the correct data fields. Hovering over the warning sign will give\r
+ you details on which element to check. In the example above the warning says to check that the <strong>Rank</strong> status has been accurately\r
+ determined. You have to check this in the <strong>Details Panel</strong> (see <strong>Dealing with Parsing Problems</strong> below).<strong></strong>\r
+ </p>
\ No newline at end of file
Right hand column: Descriptive Panel (6) and Supplemental Data panel (7)
</p>
-<p><img src="" alt="" /></p>
+<p><img src="../img/3_1a.jpg" alt="" /></p>
<p>The different parts of the Taxonomic Editor are outlined below. To view those which are not shown in the default view see section 4.2 The Show View Menu page 41.</p>
<dt>C/ The Taxon Name panel (3)</dt>
<dd>This panel contains a tab for each open taxon. Information entered here will be parsed directly and displayed in the taxon details panel .</dd>
<dt>D/ Taxon Data Panels</dt>
- <dd>There are four different taxon data panels where data types can be selected and added for Descriptive(4), Supplemental (6), Media (5) and Polytomous keys (not shown – not yet functional). When an item in a pane associated with one of these tabs is selected the data associated with the selection will be displayed and can be edited in the details panel (6).</dd>
+ <dd>There are four different taxon data panels where data types can be selected and added for Descriptive(4), Supplemental (6), Media (5) and Polytomous keys (not shown – not yet functional). When an item in a pane associated with one of these tabs is selected the data associated with the selection will be displayed and can be edited in the details panel (6).</dd>
<dt>E/ The Details Panel (6)</dt>
<dd>The contents displayed in this panel will vary depending upon the selections in the other panels. When a taxon is currently selected this panel displays the parsed taxon details. When an element in a Taxon data panel is selected then the details of the selected item are displayed here. When the bulk editor is activated the edit controls for the bulk editor will also be displayed in this panel</dd>
<dt>F/ Management Panels</dt>
<dd>There are 4 database management panels, none of which open in the default view.<br/>
The Datasource panel shows which datasource, or database, the Taxonomic Editor is currently connected to. You can connect or delete connections to different datasources or create a new datasource.
- <p>The User Manager panel will be used to view, edit, create or delete user accounts in order to track changes to your data, for example “Created By” and “Updated By”; it is not yet operational.</p>
+ <p>The User Manager panel will be used to view, edit, create or delete user accounts in order to track changes to your data, for example "Created By" and "Updated By" it is not yet operational.</p>
<p>Messages - experimental feature, not yet fully functional.<br/>
Reporting - experimental feature, not yet fully functional.</p>
+ <h3>Rank\r
+ </h3>\r
+ <p>\r
+ <strong> </strong>\r
+ </p>\r
+ <p>\r
+ The Parsing Status of the field may ask you to check the <strong>Rank</strong> data field. If the rank is correct, there is no need to take any action.\r
+ If the rank is incorrect, you can change it using the drop-down menu:\r
+ </p>\r
+ <p>\r
+ 1. Expand the <strong>Scientific Name</strong> menu using the arrow to the left of the menu.\r
+ </p>\r
+ <p>\r
+ 2. Click within the <strong>Rank</strong> data field; the field will be activated and a drop-down menu arrow will appear at the right of the field.\r
+ </p>\r
+ <p>\r
+ 3. Click on the drop-down menu arrow; the data options for the Rank field will appear.\r
+ </p>\r
+ <p>\r
+ 4. Navigate to the correct rank value using the bar at the right hand side of the menu to scroll down if necessary.\r
+ </p>\r
+ <p>\r
+ 5. Click the correct rank value; the drop-down menu will close and the selected rank will be shown in the rank data field.\r
+ </p>\r
+ <p>\r
+ 6. Save the record (see <strong>Saving your Work</strong><strong> </strong>on page<strong> </strong>77).\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/6_2d.jpg"/>\r
+ </p>\r
+ <p>\r
+ Note the many options in the <strong>Rank</strong> drop-down menu. This menu can be customised to show only those ranks which you are likely to use.\r
+ See <strong>Show/Hide Options of Drop-Down</strong> Menus on page 30 for further information.\r
+ </p>
\ No newline at end of file
+ <h3>Red warning icon = Parsing has been unsuccessful\r
+ </h3>\r
+ <p>\r
+ <strong> </strong>\r
+ </p>\r
+ <p>\r
+ <strong> </strong>\r
+ </p>\r
+ <p>\r
+ <img src="../img/6_1a.jpg"/>\r
+ </p>\r
+ <p>\r
+ The taxon name will be underlined in red and there will be the red warning sign\r
+ <img src="../img/redwarning.jpg" border="0" height="16" width="14"/>\r
+ to the left of the taxon name. This warning sign indicates that the parser has not been able to separate the text string into its constituent parts.\r
+ </p>\r
+ <p>\r
+You can rectify this by editing the taxon information, if necessary, in the <strong>Details Sheet</strong> (see <strong>Dealing with Parsing Problems</strong><strong> </strong>below).\r
+ </p>
\ No newline at end of file
<h2>Removing the Taxonomic Editor</h2>
<p>To remove the Taxonomic Editor from your system, locate the folder in which the taxonomic editor.exe file is stored on your system and simply delete the folder. If you cannot find the folder and you are on a windows platform and have created a desktop shortcut to the Editor you can determine the path to the folder by looking at the properties of the shortcut. Do this by right clicking on the shortcut and selecting the properties option from the drop down menu. In the Shortcut tab of the properties window look in the 'Target field' this will reveal the location of the taxonomic editor.</p>
-
+
+<p><img src="../img/2_9a.jpg" alt="" /></p>
+
<p>Navigate to the Taxonomic Editor folder and delete it by simply clicking once on the folder and pressing the Delete button on the keyboard. A pop-up box will appear asking "do you really want to delete this folder"; press Return on the keyboard to confirm.</p>
+
+<p><img src="../img/2_9b.jpg" alt="" /></p>
<p>You will also need to delete the <code>.cdmLibrary</code> folder where your local data is stored. The exact location of this folder will depend on your computer system. In order to locate it, run a system search as detailed for different operating systems.</p>
\ No newline at end of file
+ <h2>Saving Synonyms\r
+ </h2>\r
+ <p>\r
+ You can save synonym records by either:\r
+ </p>\r
+ <p>\r
+ 1. Pressing <strong>Control </strong>and<strong> S</strong> together on the keyboard, or by:\r
+ </p>\r
+ <p>\r
+2. Pointing the mouse arrow into the synonym text box and click the right mouse button; a drop-down menu will open > click on the <strong>Save </strong>option:\r
+ </p>\r
+ <p>\r
+<img src="../img/7_3a.jpg"/>\r
+ </p>\r
+\r
+ \r
+<h2>Saving your Work\r
+ </h2>\r
+ <p>\r
+ Any record that has been edited without being saved will be flagged with an asterisk in the <strong>Taxon Name </strong>panel to the left of the taxon\r
+ name in the tab label:\r
+ </p>\r
+ <p>\r
+ <em>An asterisk indicates unsaved changes</em>\r
+ </p>\r
+ <br clear="ALL"/>\r
+ <p>\r
+ <img src="../img/6_6a.jpg"/>\r
+ </p>\r
+ <p>\r
+ You can save your changes using the <strong>Save</strong> icon on the Toolbar and at the top left of the Taxonomic Editor window:\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/6_6b.jpg"/>\r
+ </p>\r
+ <p>\r
+ Alternatively, hold the <strong>Control</strong> and <strong>S</strong> keys on the keyboard at the same time.\r
+ </p>\r
+ <p>\r
+ <strong>Please Note:</strong>\r
+ If you have multiple taxon records with unsaved changes <em>this method will only save changes in the currently activated record</em> i.e. the record\r
+ that is open in the <strong>Taxon Name </strong>panel. To save all unsaved changes in multiple records you need to select the <strong>Save All</strong>\r
+ option found under the<strong> General</strong> menu:\r
+ </p>\r
+ <p>\r
+ Click on the <strong>General </strong>menu in the <strong>Toolbar</strong>; the File drop-down menu will appear > Click on <strong>Save All</strong>\r
+ .\r
+ </p>\r
+ <p>\r
+ <img src="../img/6_6c.jpg"/>\r
+ </p>\r
+ <p>\r
+ If you attempt to try to close an edited taxon record without saving your changes the Taxonomic Editor will give you a warning:\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/6_6cc.jpg"/>\r
+ </p>\r
+ <p>\r
+ Any changes to text in the <strong>Taxon Name</strong> panel will not appear in the <strong>Taxon Navigator</strong> panel until the changes have been\r
+ saved as above. Alternatively, you can refresh the classification by right-clicking anywhere in the <strong>Taxon Navigator</strong> panel and\r
+ selecting <strong>Refresh</strong>:\r
+ </p>\r
+ <p>\r
+ Point the mouse arrow anywhere within the <strong>Taxon Navigator </strong>panel > Click the right mouse button; a drop-down menu will appear >\r
+ Click the <strong>Refresh</strong> option.\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/6_6d.jpg"/>\r
+ </p>\r
+ <strong>\r
+ <br clear="all"/>\r
+ </strong>
\ No newline at end of file
<p>The search results will appear as a new panel as shown below. Taxon records can be double-clicked to open their records in the Taxon Name panel.</p>
-<p><img src="" alt="" /></p>
+ <p><img src="../img/3_4c.jpg" alt="" /></p>
Also in the search results are the types of taxa that you have included in your search. For example, the search above included Taxa, Synonyms, Names (without taxa) and Common Names:
-<p><img src="" alt="" /></p>
+ <p><img src="../img/3_4e.jpg" alt="" /></p>
Should you want to limit the search results to one or a sub-set of these options, you can do so by selecting and/or deselecting your search criteria using the drop-down menu to the right of the Search bar. Simply click the arrow icon to reveal the drop-down menu, and click on the available criteria. If the criterion is included in searches there will be a tick icon to its left.
-<p>All criteria will be included in searches<img src="" alt="" /></p>
+<p>All criteria will be included in searches<p><img src="../img/3_4f.jpg" alt="" /></p></p>
-<p>Only (accepted) Taxa and Synonyms will be included in searches<img src="" alt="" /></p>
+<p>Only (accepted) Taxa and Synonyms will be included in searches<p><img src="../img/3_4g.jpg" alt="" /></p></p>
<p><strong>Tip!</strong> If your search results do not show any taxa but you know there should be matches within your dataset, make sure that the search criteria are selected. If they are ALL deselected you searches will be unsuccessful.</p>
\ No newline at end of file
<h3>Show/Hide Options of Drop-Down Menus</h3>
+
+<p><img src="../img/4_1a.jpg" alt="" /></p>
<p>Some taxonomic and descriptive elements of the Properties Sheet have numerous options, as is the nature of taxonomy, for example there are 19 options to describe the Distribution Status of a taxon. You may find that you only need to use a sub-set of these options.</p>
<li><strong>Description</strong>
<ul>
<li><strong>Distribution Status:</strong> for example "introduced: cultivated", "introduced: naturalised".</li>
- <li><strong>Features:</strong> the features you would like to include in your taxon descriptions, for example “common name”, “distribution” and “ecology”.</li>
+ <li><strong>Features:</strong> the features you would like to include in your taxon descriptions, for example "common name", "distribution" and "ecology".</li>
<li><strong>Named Area Type:</strong> for example "natural area"</li>
<li><strong>Preservation method:</strong> not yet functional.</li>
<li><strong>Stage:</strong> not yet functional.</li>
- <li><strong>Extension types:</strong> the types for the section ‘extensions’ in the supplemental data view for example “abbreviation “, “order”.</li>
+ <li><strong>Extension types:</strong> the types for the section "extensions" in the supplemental data view for example "abbreviation", "order".</li>
<li><strong>Language:</strong> languages available for common name field</li>
- <li><strong>Marker types:</strong> the types for the section ‘extensions’ in the supplemental data view for example “complete”, “to be checked”.</li>
+ <li><strong>Marker types:</strong> the types for the section "extensions" in the supplemental data view for example "complete", "to be checked".</li>
<li><strong>Matching:</strong> Experimental feature, not yet fully functional.</li>
- <li><strong>Taxonomic:</strong> Name Relationships Type: for example “misspelling for”, “basionym for”.</li>
- <li><strong>Name Type Designation Status:</strong> for example “monotypy”, “present designation”</li>
+ <li><strong>Taxonomic:</strong> Name Relationships Type: for example "misspelling for", "basionym for".</li>
+ <li><strong>Name Type Designation Status:</strong> for example "monotypy", "present designation"</li>
<li><strong>Nomenclatural Code:</strong> ICBN or ICZN.</li>
- <li><strong>Nomenclatural Status Type:</strong> for example “invalid”, “conserved”.</li>
+ <li><strong>Nomenclatural Status Type:</strong> for example "invalid", "conserved".</li>
<li><strong>Ranks:</strong> for example "cultivar", "tribe".</li>
<li><strong>Specimen Type Designation Status:</strong> for example "epitype", "holotype".</li>
<li><strong>Taxon Relationship Type:</strong> for example "overlaps", "excludes".</li>
<ol>
<li>The menus given above are located in the Taxonomic Editor option in the menu. They can be accessed by expanding the Taxonomic Editor menu by clicking on the arrow icon:
- <p><img src="" alt="" /></p>
+ <p><img src="../img/4_1b.jpg" alt="" /></p>
</li>
<li>Click on the data field you would like to change from the menu on the left hand side of the pop-up. The existing options associated with the drop-down list for that data field will appear in the main panel of the Preferences pop-up box. By default, all of the options will be selected. Use the scroll bar to the right of the options list to navigate the list.</li>
<li>Ensure that all of the options you wish to appear in the drop-down box for that data field are ticked, and all those you do not wish to appear are un-ticked. You will need to use the mouse to do this. You can use the <strong>Toggle</strong> button on the right-hand side of the box to select or deselect all of the options in the list.</li>
<li>Click the <strong>Apply</strong> button > click the <strong>OK</strong> button to finish. The Preferences pop-up box will close and you will be returned to Taxonomic Editor.
- <p><img src="" alt="" /></p>
+
</li>
</ol>
+
+<p><img src="../img/4_1c.jpg" alt="" /></p>
<h3>General</h3>
+<p><img src="../img/3_2a.jpg" alt="" /></p>
+
<p>The General menu has the following options:</p>
<ul>
<li>Recently opened records are listed at the bottom of the menu. Click on a taxon name in this list to open the taxon in the Freetext panel.</li>
</ul>
-<p><img src="" alt="" /></p>
+<p><img src="../img/3_2b.jpg" alt="" /></p>
<h3>Edit</h3>
<li><strong>Undo; Redo;</strong> these commands are currently operational only when using the Bulk Editor (see below).</li>
<li><strong>Cut; Copy; Paste; Delete;</strong> these commands apply to all panels of the Taxonomic Editor apart from the Taxon Navigator panel where only the Delete function works.</li>
</ul>
-<p><img src="" alt="" /></p>
+<p><img src="../img/3_2c.jpg" alt="" /></p>
<h3>Window</h3>
<p>The Window menu lets you open other editors and views that are not visible yet or have been closed before.</p>
-<p><img src="" alt="" /></p>
+<p><img src="../img/3_2d.jpg" alt="" /></p>
<ul>
<li><strong>Bulk Editor;</strong> The Bulk Editor is used to edit lists of:
<li>Authors and Author Teams</li>
</ul>
- <p><img src="" alt="" /></p>
-
See <a href="">Bulk Editing</a> for further details.
</li>
<li><strong>Show View;</strong>
<li><strong>Messaged</strong></li>
</ul>
- <p><img src="" alt="" /></p>
(see <a href="">Customising the Taxonomic Editor</a>).
</li>
<li><strong>About the EDIT Platform</li>
</ul>
-<p><img src="" alt="" /></p>
+ <p><img src="../img/3_2e.jpg" alt="" /></p>
<p>The five panels of the Taxonomic Editor can be closed independently by clicking on the (x) icon on the right-hand side of the tab of each panel. For example:</p>
-<p><img src="" alt="" /></p>
+<p><img src="../img/4_2a.jpg" alt="" /></p>
<p>Panels can be reopened by clicking the panel name under the <strong>Show View</strong> menu.</p>
<ol>
<li>Click the <strong>Windows</strong> menu in the Toolbar. A drop-down box will appear.</li>
<li>Move the mouse to the <strong>Show View</strong> option in the drop-down box.
- <p><img src="" alt="" /></p>
+ <p><img src="../img/4_2b.jpg" alt="" /></p>
<p><strong>Toolbar > Window > Show View</strong></p>
</li>
<li>Click the panel option that you wish to open.
<p><strong>Tip!</strong> If, when you select a panel in the Show View menu you still cannot see it in the Taxonomic Editor window, it may have been minimised. Check at the bottom right of the window for minimised panels:</p>
-<p><img src="" alt="" /></p>
\ No newline at end of file
+<p><img src="../img/4_2c.jpg" alt="" /></p>
\ No newline at end of file
<p>This section describes how to work within the Taxon Name panel. This is where the nomenclatural information such as accepted name, authority and nomenclatural reference as well as synonym information is displayed and updated.</p>
-<p><img src="" alt="" /></p>
\ No newline at end of file
+ <p><img src="../img/3_4a.jpg" alt="" /></p>
\ No newline at end of file
+<h2>Types of Descriptive Data\r
+ </h2>\r
+ <p>\r
+ The descriptive data panel allows you to attach descriptive data to each taxon within your taxonomic tree. The following types of data can be included:\r
+ </p>\r
+ <div align="center">\r
+ <table border="0" cellpadding="0" cellspacing="0">\r
+ <tbody>\r
+ <tr>\r
+ <td width="189">\r
+ <p>\r
+ Abstract\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ <p>\r
+ Discussion\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ <p>\r
+ Observation\r
+ </p>\r
+ </td>\r
+ </tr>\r
+ <tr>\r
+ <td width="189">\r
+ <p>\r
+ Acknowledgements\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ <p>\r
+ Distribution\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ <p>\r
+ Occurrence\r
+ </p>\r
+ </td>\r
+ </tr>\r
+ <tr>\r
+ <td width="189">\r
+ <p>\r
+ Additional Publication\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ <p>\r
+ Ecology\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ <p>\r
+ Pathogen Agent\r
+ </p>\r
+ </td>\r
+ </tr>\r
+ <tr>\r
+ <td width="189">\r
+ <p>\r
+ Anatomy\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ <p>\r
+ Etymology\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ <p>\r
+ Phenology\r
+ </p>\r
+ </td>\r
+ </tr>\r
+ <tr>\r
+ <td width="189">\r
+ <p>\r
+ Biology and Ecology\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ <p>\r
+ Habitat\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ <p>\r
+ Protologue\r
+ </p>\r
+ </td>\r
+ </tr>\r
+ <tr>\r
+ <td width="189">\r
+ <p>\r
+ Chromosome\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ <p>\r
+ Host Plant\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ <p>\r
+ Specimen\r
+ </p>\r
+ </td>\r
+ </tr>\r
+ <tr>\r
+ <td width="189">\r
+ <p>\r
+ Citation\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ <p>\r
+ Individuals Association\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ <p>\r
+ Synopsis\r
+ </p>\r
+ </td>\r
+ </tr>\r
+ <tr>\r
+ <td width="189">\r
+ <p>\r
+ Common Name\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ <p>\r
+ Introduction\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ <p>\r
+ Unknown Feature Type\r
+ </p>\r
+ </td>\r
+ </tr>\r
+ <tr>\r
+ <td width="189">\r
+ <p>\r
+ Conservation\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ <p>\r
+ Key\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ <p>\r
+ Uses\r
+ </p>\r
+ </td>\r
+ </tr>\r
+ <tr>\r
+ <td width="189">\r
+ <p>\r
+ Cultivation\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ <p>\r
+ Materials Examined\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ </td>\r
+ </tr>\r
+ <tr>\r
+ <td width="189">\r
+ <p>\r
+ Description\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ <p>\r
+ Materials Methods\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ </td>\r
+ </tr>\r
+ <tr>\r
+ <td width="189">\r
+ <p>\r
+ Diagnosis\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ <p>\r
+ Multiple\r
+ </p>\r
+ </td>\r
+ <td width="205">\r
+ </td>\r
+ </tr>\r
+ <tr>\r
+ <td width="189">\r
+ </td>\r
+ <td width="205">\r
+ </td>\r
+ <td width="205">\r
+ </td>\r
+ </tr>\r
+ </tbody>\r
+ </table>\r
+ </div>\r
+ <p>\r
+ The format of the types of descriptive data varies; for some the data is input as freetext but for others data must be chosen from options given in\r
+ drop-down menus.\r
+ </p>\r
+ <p>\r
+ <strong>Please Note:</strong>\r
+The options given to you in the drop-down menus can be customised using the <strong>Preferences </strong>menu (see <strong>Show/Hide Options of Drop-Down</strong> Menus on page 30).\r
+ </p>
\ No newline at end of file
+\r
+ <h2>Types of Supplemental Data\r
+ </h2>\r
+ <p>\r
+ The Supplemental data panel allows you to attach supplemental data to each taxon within your classification. The following types of data can be\r
+ included:\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/9_1a.jpg"/>\r
+ </p>\r
+ <p>\r
+ The format of the types of descriptive data varies; for some the data is input as free text but for others data must be chosen from options given in\r
+ drop-down menus.\r
+ </p>\r
+ <p>\r
+ <strong>Please Note:</strong>\r
+The options given to you in the drop-down menus can be customised using the <strong>Preferences </strong>menu (see <strong>Show/Hide Options of Drop-Down</strong> Menus on page 30).\r
+ </p>
\ No newline at end of file
+<h3>Uninomial and Specific Epithet\r
+ </h3>\r
+ <p>\r
+ In order for these fields to be visible, both the <strong>Accepted Name</strong> and <strong>Name Cache</strong> menus need to be expanded using the\r
+ arrows to the left of the data field name:\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/6_2e.jpg"/>\r
+ </p>\r
+ <p>\r
+ If these fields are incorrect, they can be edited simply:\r
+ </p>\r
+ <p>\r
+ 1. Click in the relevant field; the field will become highlighted:\r
+ </p>\r
+ <p align="center">\r
+ <img src="../img/6_2f.jpg"/>\r
+ </p>\r
+ <p>\r
+ 2. Make the correction.\r
+ </p>\r
+ <p>\r
+ 3. Save the record (see <strong>Saving your Work</strong> on page 77).\r
+ </p>
\ No newline at end of file
<li>Click in the <strong>search bar</strong> at the bottom of the menu.</li>
<li>Enter <code>.cdmLibrary</code>:
- <p><img src="" alt="" />Windows Start button</p>
-
+ <p><img src="../img/2_9c.jpg" alt="" />Windows Start button</p>
+
<br/>
A menu of matching search results will open.
</li>
--- /dev/null
+<h3>Authorship Part</h3>
+
+<p>The authorship part is divided into the original combination authorship and the combination authorship.
+The earlier is put in brackets.</p>
+
+<pre>
+Example (bot.): (L.) Mill.
+Example (zoo.): (XXX, 1830) XXX, 1845
+</pre>
+
+<p>You can use either no authorship (only if not followed by any other part), the original combination
+authorship, the combination authorship or both.</p>
+
+<p>The parser differentiates botanical and zoological authorship. The later has a year following the
+author, separated by a comma. Botanical names only have authors.
+Authorship may include single persons and teams. Team members are separated by <code>&</code> . A placeholder <code>al.</code>
+may be used for further team members. Both authorships may include ex-authors separated by <code>ex</code> or <code>ex.</code>
+Some valid author strings are:</p>
+<pre>
+Example (bot.): (Greuther & L'Hiver & al. ex Müller & Schmidt) Clark ex Ciardelli
+Example (zoo.):
+</pre>
+
+<p>The number of allowed special characters like <code>'</code> or <code>-</code> at the moment is beyond the scope of this
+documentation and will change in the future.</p>
+
--- /dev/null
+<h3>Name Part</h3>
+
+<p>The name part recognizes uninomials, binomials and trinomials. The first epithet must start
+with a capital letter; all other words (except for infrageneric epitheta) can only contain
+lower-case letters. Only latin letters are allowed in names (except for <strong>ï</strong>).
+The name part parser differentiates 6 different syntaxes.</p>
+
+<h4>Uninomials</h4>
+<p>One word starting with a capital letter. As the rank is usually ambiguous for uninomials,
+the rank represents the parser's best guess and a warning is returned to check the rank.</p>
+<pre>Example: Cichorieae</pre>
+
+
+<h4>Infrageneric Names</h4>
+<p>Capital word followed by the infrageneric marker followed by the infrageneric epitheton.
+Valid markers are:
+ <ul>
+ <li><code>subgen.</code></li>
+ <li><code>subg.</code></li>
+ <li><code>sect.</code></li>
+ <li><code>subsect.</code></li>
+ <li><code>ser.</code></li>
+ <li><code>subser.</code></li>
+ <li><code>t.infgen.</code></li>
+ </ul>
+</p>
+<pre>Example: Desmometopa subg. LitoXXX</pre>
+
+
+<h4>Species Aggregates</h4>
+<p>Species aggregates are recognized similarly to species except they are followed by a group
+marker. Valid markers are:
+ <ul>
+ <li><code>aggr.</code></li>
+ <li><code>agg.</code></li>
+ <li><code>group</code></li>
+ </ul>
+</p>
+<pre>Example: XXX</pre>
+
+
+<h4>Species</h4>
+<p>Species names have a genus part (capital letter) and a species part (lower case letter).</p>
+<pre>Examples are: Abies alba</pre>
+
+<h4>Infraspecific names</h4>
+<p>Infraspecific names have four parts: the genus part, the species part, the infraspecific
+marker and the infraspecific part. All but the first may not start with a capital letter.
+Recognized markers are:
+ <ul>
+ <li><code>subsp.</code></li>
+ <li><code>convar.</code></li>
+ <li><code>var.</code></li>
+ <li><code>subvar.</code></li>
+ <li><code>f.</code></li>
+ <li><code>subf.</code></li>
+ <li><code>f.spec.</code></li>
+ <li><code>tax.infrasp.</code></li>
+ <li><code>tax. infrasp.</code></li>
+ </ul>
+
+</p>
+<pre>Example:</pre>
+
+<h4>Infraspecific names (old markers)</h4>
+<p>Some older names (not valid according to the nomenclatural code) use other infraspecific
+markers. The recognition of these older names is not yet implemented.</p>
+
+
--- /dev/null
+<h3>Nomenclatural Status</h3>
+
+<p>The nomeclatural status is separated from the preceding text by a comma. Current valid values for a status:</p>
+
+<ul>
+ <li><code>nom. superfl.</code></li>
+ <li><code>nom. nud.</code></li>
+ <li><code>nom. illeg.</code></li>
+ <li><code>nom. inval.</code></li>
+ <li><code>nom. cons.</code></li>
+ <li><code>nom. alternativ.</code></li>
+ <li><code>nom. subnud.</code></li>
+ <li><code>nom. rej.</code></li>
+ <li><code>nom. rej.</code></li>
+ <li><code>nom. prop.</code></li>
+ <li><code>nom. provis.</code></li>
+ <li><code>orth. var.</code></li>
+</ul>
+
+<p>Multiple values separated by comma are possible.</p>
\ No newline at end of file
--- /dev/null
+<h2>Name Parser Documentation</h2>
+
+
+<p>The taxonomic name parser analyzes a free text taxonomic reference for the following four components:</p>
+
+<ul>
+ <li><a href="name_part.html">Name Part</a></li>
+ <li><a href="authorship_part.html">Authorship Part</a></li>
+ <li><a href="reference_part.html">Reference Part</a></li>
+ <li><a href="nomenclatural_status_part.html">Nomenclatural Status</a></li>
+</ul>
+
+<p>Not all of them are required.</p>
+
+<p>The four parts are separated by the following separators:</p>
+
+<table border="1">
+ <thead>
+ <tr>
+ <td>part</td>
+ <td>separator</td>
+ <td>example</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>authorship</td>
+ <td>any whitespace</td>
+ <td><code>Abies alba_L.</code></td>
+ </tr>
+ <tr>
+ <td>reference</td>
+ <td>commata with following whitespace OR whitespace+'in'+whitespace</td>
+ <td><code>Abies alba L.,_Sp. Pl... or Pinus alba_in_Bull. Soc....</code></td>
+ </tr>
+ <tr>
+ <td>nom. status</td>
+ <td>commata with following whitespace</td>
+ <td><code>in Bull. Bot. 3: 99. 1987., nom illeg.</code></td>
+ </tr>
+ </tbody>
+</table>
+
+<p>Some valid name texts fully recognized by the parser are:</p>
+
+<pre>
+Abies alba (L.) Mill., Sp. Pl.: 105. 1846., nom illeg.
+Abies alba (L.) Mill. in Bull. Bot. 3: 99. 1987., nom illeg.
+</pre>
+
+<p>The name part is required. The authorship part is required only if followed by the reference part. The reference part as well as the status part are not required. In the following sections, the four parts are described in detail:</p>
\ No newline at end of file
--- /dev/null
+<h3>Reference Part</h3>
+
+<p>The reference part follows the syntax: <code>{separator}{authorship{,}}{titleEditionVolume}{:}{detail}{.}{year}</code></p>
+
+<p>Zoological new combinations should not have a reference part, since in zoology, it is not common
+to mention the new combination reference.</p>
+
+<h4>Separator</h4>
+
+<p>The separator between the reference part and the preceding authorship may be a comma , or
+an <pre> in </pre> (surrounded by whitespaces). The comma indicates a book whereas the <code>in</code> stands either
+for a journal article or a book section. If the <code>in</code> is not followed by a comma, the parser
+interprets the reference as an article; otherwise, as a book section. Reference type parsing
+should be improved in future.</p>
+
+<h4>Reference Authorship</h4>
+
+<p>An author is only available for book sections. Articles and book sections are differentiated
+from each other by comparing the first four words that follow the separator. If these words
+include a comma and the words before the comma are likely to represent an author, the reference
+is recognized as a book section. Otherwise, it will be treated as an article. In both cases,
+a warning is thrown that differentiation is not possible.</p>
+
+<h4>TitleEditionVolume</h4>
+
+<p>The TitleEditionVolume part includes the title itself as well as optional edition part
+and volume parts. The title itself allows most character combinations but care must be taken
+if a <code>:</code> is included as this is the separator for the subsequent detail part. Special characters
+like <code>&</code> and <code>-</code> are only allowed if preceded and followed immediately by ordinary characters.
+Ordinary brackets are allowed. Edition and volume are separated by whitespace if only one
+of them exists. If both exist the later is separated by a comma. Both are optional, so all
+four of the following formats are valid:</p>
+
+<pre>
+Sp. Pl.
+Sp. Pl. ed. 3
+Sp. Pl. ed. 3, 4
+Sp. Pl. 4
+</pre>
+
+<p>As can be seen, the edition is recognized by a preceding <code>ed.</code>, whereas the volume is just
+a number (or a number followed by another number in brackets - e.g. <code>4(5)</code> ).</p>
+
+<p>The detail part is separated by a column <code>:</code> from the preceding titleEditonVolume part and
+is separated from the year by <code>.</code> (botanical names only). A number of typical detail information
+is recognized as either pure page numbers (<code>345</code>) or ranges (<code>345-348</code>). Page numbers may be
+preceded by <code>p.</code>(e.g. <code>p. 345</code>) or <code>pp.</code>(e.g. <code>pp. 345-348</code>). Abbreviations indicating special parts of a
+reference such as <code>fig.</code> or <code>tab.</code> are recognized as well. Roman numbers are not detected
+at the moment.</p>
+
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Main Topic</title>
-</head>
-
-<body>
-<h1>Main Topic</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Sub Topic</title>
-</head>
-
-<body>
-<h1>Sub Topic</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Sub Topic 2</title>
-</head>
-
-<body>
-<h1>Sub Topic 2</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Main Topic</title>
-</head>
-
-<body>
-<h1>Main Topic</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Sub Topic</title>
-</head>
-
-<body>
-<h1>Sub Topic</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Sub Topic 2</title>
-</head>
-
-<body>
-<h1>Sub Topic 2</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Main Topic</title>
-</head>
-
-<body>
-<h1>Main Topic</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Sub Topic</title>
-</head>
-
-<body>
-<h1>Sub Topic</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Sub Topic 2</title>
-</head>
-
-<body>
-<h1>Sub Topic 2</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Table of Contents</title>
-</head>
-
-<body>
-<h1>Table of Contents</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
--- /dev/null
+instructions.configure=\
+ addRepository(type:0,location:http${#58}//wp5.e-taxonomy.eu/taxeditor/update);\
+ addRepository(type:1,location:http${#58}//wp5.e-taxonomy.eu/taxeditor/update);
\ No newline at end of file
primary="true">
</toc>
<toc
- file="tocgettingstarted.xml">
+ file="tocgettingstarted.xml"
+ primary="false">
+ </toc>
+ <toc
+ file="tocnameparser.xml"
+ primary="false">
</toc>
</extension>
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>3.0.6-SNAPSHOT</version>
+ <version>3.0.12-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.toc"?>
-<toc label="EDIT Taxonomic Editor" topic="html/toc.html">
+<toc label="EDIT Taxonomic Editor">
<topic label="Getting Started">
<anchor id="gettingstarted"/>
</topic>
+ <topic label="Name Parser">
+ <anchor id="nameparser"/>
+ </topic>
</toc>
--- /dev/null
+<toc label="Name Parser" link_to="toc.xml#nameparser">
+ <topic href="html/nameparser/overview.html" label="Overview">
+ </topic>
+ <topic href="html/nameparser/name_part.html" label="Name Part">
+ </topic>
+ <topic href="html/nameparser/authorship_part.html" label="Authorship Part">
+ </topic>
+ <topic href="html/nameparser/reference_part.html" label="Reference Part">
+ </topic>
+ <topic href="html/nameparser/nomenclatural_status_part.html" label="Nomenclatural Status Part">
+ </topic>
+</toc>
Bundle-ManifestVersion: 2
Bundle-Name: Navigation Bundle
Bundle-SymbolicName: eu.etaxonomy.taxeditor.navigation;singleton:=true
-Bundle-Version: 3.0.6.qualifier
+Bundle-Version: 3.0.12.qualifier
Bundle-Vendor: EDIT
Export-Package: eu.etaxonomy.cdm,
eu.etaxonomy.taxeditor.navigation,
--- /dev/null
+instructions.configure=\
+ addRepository(type:0,location:http${#58}//wp5.e-taxonomy.eu/taxeditor/update);\
+ addRepository(type:1,location:http${#58}//wp5.e-taxonomy.eu/taxeditor/update);
\ No newline at end of file
label="Refresh"
style="push">
</command>
+ <command
+ commandId="eu.etaxonomy.taxeditor.navigation.command.copyTaxonName"
+ label="Copy"
+ style="push">
+ </command>
</menuContribution>
<menuContribution
locationURI="toolbar:org.eclipse.ui.main.toolbar">
id="org.eclipse.ui.file.refresh"
name="Refresh">
</command>
+ <command
+ defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.CopyHandler"
+ id="eu.etaxonomy.taxeditor.navigation.command.copyTaxonName"
+ name="Copy">
+ </command>
</extension>
<extension
point="org.eclipse.ui.commands">
<definition
id="isTaxonNode">
<with
- variable="activeMenuSelection">
+ variable="selection">
<iterate>
<instanceof
value="eu.etaxonomy.cdm.model.taxon.TaxonNode">
<definition
id="isTaxonomicTree">
<with
- variable="activeMenuSelection">
+ variable="selection">
<iterate>
<instanceof
value="eu.etaxonomy.cdm.model.taxon.TaxonomicTree">
<definition
id="isSynonymNode">
<with
- variable="activeMenuSelection">
+ variable="selection">
<iterate>
<instanceof
value="eu.etaxonomy.cdm.model.taxon.Synonym">
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>3.0.6-SNAPSHOT</version>
+ <version>3.0.12-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
*
* @return a {@link java.lang.String} object.
*/
- protected static String getPluginId(){
+ public static String getPluginId(){
return TaxeditorNavigationPlugin.PLUGIN_ID;
}
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
/**
* @author n.hoffmann
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.navigation.navigator.handler;\r
+\r
+import java.util.Iterator;\r
+\r
+import org.eclipse.core.commands.AbstractHandler;\r
+import org.eclipse.core.commands.ExecutionEvent;\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.IHandler;\r
+import org.eclipse.core.commands.common.NotDefinedException;\r
+import org.eclipse.core.runtime.IStatus;\r
+import org.eclipse.jface.viewers.IStructuredSelection;\r
+import org.eclipse.ui.handlers.HandlerUtil;\r
+\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.cdm.model.taxon.Taxon;\r
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;\r
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;\r
+import eu.etaxonomy.taxeditor.navigation.NavigationUtil;\r
+import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;\r
+import eu.etaxonomy.taxeditor.navigation.navigator.operation.CopyOperation;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 23 Jan 2012\r
+ *\r
+ */\r
+public class CopyHandler extends AbstractHandler implements IHandler {\r
+ \r
+ private TaxonNavigator taxonNavigator;\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)\r
+ */\r
+ @Override\r
+ public Object execute(ExecutionEvent event) throws ExecutionException {\r
+ \r
+ taxonNavigator = NavigationUtil.showNavigator();\r
+ \r
+ IStructuredSelection selection = (IStructuredSelection) HandlerUtil\r
+ .getCurrentSelection(event);\r
+\r
+ if(selection.size() == 1) {\r
+ \r
+ Object selectedObject = selection.getFirstElement();\r
+ \r
+ if (selectedObject instanceof TaxonNode) {\r
+ \r
+ try {\r
+ \r
+ AbstractPostOperation operation = new CopyOperation(event.getCommand().getName(), StoreUtil.getUndoContext(),\r
+ (TaxonNode)selectedObject, taxonNavigator);\r
+ \r
+ IStatus status = NavigationUtil.executeOperation(operation);\r
+ \r
+ } catch (NotDefinedException e) {\r
+ NavigationUtil.warn(getClass(), "Command name not set");\r
+ }\r
+ }\r
+ }\r
+ \r
+ \r
+ return null;\r
+ }\r
+\r
+}\r
import eu.etaxonomy.taxeditor.navigation.navigator.operation.MoveTaxonOperation;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonNodeSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
/**
* <p>MoveTaxonHandler class.</p>
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.navigation.navigator.operation;\r
+\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.operations.IUndoContext;\r
+\r
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+\r
+import org.eclipse.core.runtime.IAdaptable;\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.core.runtime.IStatus;\r
+import org.eclipse.swt.dnd.Clipboard;\r
+import org.eclipse.swt.dnd.TextTransfer;\r
+import org.eclipse.swt.dnd.Transfer;\r
+\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 23 Jan 2012\r
+ *\r
+ */\r
+public class CopyOperation extends AbstractPostOperation {\r
+\r
+ /**\r
+ * @param label\r
+ * @param undoContext\r
+ * @param taxon\r
+ * @param postOperationEnabled\r
+ */\r
+ public CopyOperation(String label, IUndoContext undoContext, TaxonNode taxonNode, \r
+ IPostOperationEnabled postOperationEnabled) {\r
+ super(label, undoContext, taxonNode, postOperationEnabled);\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+ */\r
+ @Override\r
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
+ throws ExecutionException {\r
+ \r
+ String name = taxonNode.getTaxon().getName().getTitleCache();\r
+ \r
+ final Clipboard cb = new Clipboard(null);\r
+ TextTransfer textTransfer = TextTransfer.getInstance();\r
+ Transfer[] transfers = new Transfer[]{textTransfer};\r
+ \r
+ cb.setContents(new Object[]{name}, transfers);\r
+ \r
+ return postExecute(taxonNode); \r
+ //return null;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+ */\r
+ @Override\r
+ public IStatus redo(IProgressMonitor monitor, IAdaptable info)\r
+ throws ExecutionException {\r
+ // TODO Auto-generated method stub\r
+ return null;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+ */\r
+ @Override\r
+ public IStatus undo(IProgressMonitor monitor, IAdaptable info)\r
+ throws ExecutionException {\r
+ // TODO Auto-generated method stub\r
+ return null;\r
+ }\r
+\r
+}\r
Bundle-ManifestVersion: 2
Bundle-Name: Printpublisher Bundle
Bundle-SymbolicName: eu.etaxonomy.taxeditor.printpublisher;singleton:=true
-Bundle-Version: 3.0.6.qualifier
+Bundle-Version: 3.0.12.qualifier
Require-Bundle: org.eclipse.osgi,
org.eclipse.ui,
eu.etaxonomy.taxeditor.cdmlib,
source.. = src/main/java/
bin.includes = META-INF/,\
.,\
- plugin.xml
+ plugin.xml,\
+ p2.inf
--- /dev/null
+instructions.configure=\
+ addRepository(type:0,location:http${#58}//wp5.e-taxonomy.eu/taxeditor/update);\
+ addRepository(type:1,location:http${#58}//wp5.e-taxonomy.eu/taxeditor/update);
\ No newline at end of file
<parent>
<artifactId>taxeditor-parent</artifactId>
<groupId>eu.etaxonomy</groupId>
- <version>3.0.6-SNAPSHOT</version>
+ <version>3.0.12-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Bundle-ManifestVersion: 2
Bundle-Name: DataStore Bundle
Bundle-SymbolicName: eu.etaxonomy.taxeditor.store;singleton:=true
-Bundle-Version: 3.0.6.qualifier
+Bundle-Version: 3.0.12.qualifier
Bundle-Activator: eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin
Bundle-Vendor: EDIT
Export-Package: eu.etaxonomy.cdm,
eu.etaxonomy.cdm.database,
eu.etaxonomy.taxeditor.datasource,
eu.etaxonomy.taxeditor.datasource.wizard,
+ eu.etaxonomy.taxeditor.editor,
+ eu.etaxonomy.taxeditor.editor.definedterm,
eu.etaxonomy.taxeditor.featuretree,
eu.etaxonomy.taxeditor.handler,
eu.etaxonomy.taxeditor.io,
eu.etaxonomy.taxeditor.store.internal,
eu.etaxonomy.taxeditor.store.operations,
eu.etaxonomy.taxeditor.ui.bar,
- eu.etaxonomy.taxeditor.ui.dialogs,
- eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection,
- eu.etaxonomy.taxeditor.ui.forms,
+ eu.etaxonomy.taxeditor.ui.combo,
+ eu.etaxonomy.taxeditor.ui.dialog,
+ eu.etaxonomy.taxeditor.ui.dialog.selection,
+ eu.etaxonomy.taxeditor.ui.element,
eu.etaxonomy.taxeditor.ui.section,
eu.etaxonomy.taxeditor.ui.section.agent,
eu.etaxonomy.taxeditor.ui.section.classification,
eu.etaxonomy.taxeditor.ui.section.supplemental,
eu.etaxonomy.taxeditor.ui.section.taxon,
eu.etaxonomy.taxeditor.ui.selection,
- eu.etaxonomy.taxeditor.ui.term,
eu.etaxonomy.taxeditor.view,
eu.etaxonomy.taxeditor.view.datasource,
eu.etaxonomy.taxeditor.view.datasource.handler,
Require-Bundle: org.eclipse.osgi,
org.eclipse.ui,
org.eclipse.jface.text,
- org.eclipse.pde.runtime,
- org.eclipse.ui.forms;bundle-version="3.5.0",
+ org.eclipse.ui.forms,
eu.etaxonomy.taxeditor.cdmlib
Import-Package: org.eclipse.core.commands,
org.eclipse.core.commands.operations,
id="eu.etaxonomy.taxeditor.preferences.mobotOpenUrl"
name="Mobot Open Url">
</page>
+ <page
+ category="eu.etaxonomy.taxeditor.preferences.general"
+ class="eu.etaxonomy.taxeditor.preference.TypeDesignationPreferences"
+ id="eu.etaxonomy.taxeditor.preferences.typeDesignation"
+ name="Type Designations">
+ </page>
</extension>
<extension
point="org.eclipse.ui.views">
name="Details"
restorable="true">
</view>
+ <view
+ class="eu.etaxonomy.taxeditor.view.userecords.UseRecordsViewPart"
+ icon="icons/leaf_detail.png"
+ id="eu.etaxonomy.taxeditor.view.userecords"
+ name="Use Records"
+ restorable="true">
+ </view>
+ </extension>
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor"
+ default="false"
+ id="eu.etaxonomy.taxeditor.editor.definedTerm"
+ name="Defined Term Editor">
+ </editor>
</extension>
<extension
point="org.eclipse.ui.menus">
</visibleWhen>
</command>
</menu>
+ <menu
+ id="eu.etaxonomy.taxeditor.store.definedTermEditorMenu"
+ label="Term Editor">
+ <command
+ commandId="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
+ label="Named Area"
+ style="push">
+ <parameter
+ name="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
+ value="eu.etaxonomy.cdm.model.location.NamedArea">
+ </parameter>
+ </command>
+ <command
+ commandId="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
+ label="Named Area Level"
+ style="push">
+ <parameter
+ name="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
+ value="eu.etaxonomy.cdm.model.location.NamedAreaLevel">
+ </parameter>
+ </command>
+ <separator
+ name="eu.etaxonomy.taxeditor.store.definedTermEditorMenu.separator2"
+ visible="true">
+ </separator>
+ <command
+ commandId="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
+ label="Extension Type"
+ style="push">
+ <parameter
+ name="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
+ value="eu.etaxonomy.cdm.model.common.ExtensionType">
+ </parameter>
+ </command>
+ <command
+ commandId="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
+ label="Marker Type"
+ style="push">
+ <parameter
+ name="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
+ value="eu.etaxonomy.cdm.model.common.MarkerType">
+ </parameter>
+ </command>
+ <command
+ commandId="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
+ label="State"
+ style="push">
+ <parameter
+ name="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
+ value="eu.etaxonomy.cdm.model.description.State">
+ </parameter>
+ </command>
+ <separator
+ name="eu.etaxonomy.taxeditor.store.definedTermEditorMenu.separator3"
+ visible="true">
+ </separator>
+ <command
+ commandId="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
+ label="Feature"
+ style="push">
+ <parameter
+ name="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
+ value="eu.etaxonomy.cdm.model.description.Feature">
+ </parameter>
+ </command>
+ <command
+ commandId="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
+ label="Modifier"
+ style="push">
+ <parameter
+ name="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
+ value="eu.etaxonomy.cdm.model.description.Modifier">
+ </parameter>
+ </command>
+ </menu>
</menuContribution>
<menuContribution
locationURI="menu:org.eclipse.ui.main.menu.file?after=eu.etaxonomy.taxeditor.application.filemenu.io">
</control>
</toolbar>
</menuContribution>
+ <menuContribution
+ locationURI="popup:eu.etaxonomy.taxeditor.editor.definedTerm">
+ <menu
+ label="New">
+ <command
+ commandId="eu.etaxonomy.taxeditor.editor.definedTerms.newTermVocabulary"
+ label="Vocabulary"
+ style="push">
+ </command>
+ <command
+ commandId="eu.etaxonomy.taxeditor.editor.definedTerms.newDefinedTerm"
+ label="Defined Term"
+ style="push">
+ <visibleWhen
+ checkEnabled="true">
+ <reference
+ definitionId="isModifiable">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menu>
+ <command
+ commandId="org.eclipse.ui.edit.delete"
+ label="Delete"
+ style="push">
+ <visibleWhen
+ checkEnabled="true">
+ <reference
+ definitionId="isModifiable">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
</extension>
<extension
name="Window Menu Commands"
point="org.eclipse.ui.commands">
+ <command
+ defaultHandler="eu.etaxonomy.taxeditor.editor.definedterm.handler.OpenDefinedTermEditorHandler"
+ id="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
+ name="Open Defined Term Editor">
+ <commandParameter
+ id="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
+ name="inputType"
+ optional="true">
+ </commandParameter>
+ </command>
+ </extension>
+ <extension
+ name="File Menu Commands"
+ point="org.eclipse.ui.commands">
<command
defaultHandler="eu.etaxonomy.taxeditor.handler.ShowLoginWindowHandler"
id="eu.etaxonomy.taxeditor.store.operations.showLoginWindow"
</with>
</activeWhen>
</handler>
+ <handler
+ class="eu.etaxonomy.taxeditor.editor.definedterm.handler.DeleteTermBaseHandler"
+ commandId="org.eclipse.ui.edit.delete">
+ <activeWhen>
+ <with
+ variable="activePartId">
+ <equals
+ value="eu.etaxonomy.taxeditor.editor.definedTerm">
+ </equals>
+ </with>
+ </activeWhen>
+ </handler>
</extension>
<extension
name="Popup Menu Commands"
name="Update Datasource">
</command>
</extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ defaultHandler="eu.etaxonomy.taxeditor.editor.definedterm.handler.CreateDefinedTermHandler"
+ id="eu.etaxonomy.taxeditor.editor.definedTerms.newDefinedTerm"
+ name="New Defined Term">
+ </command>
+ <command
+ defaultHandler="eu.etaxonomy.taxeditor.editor.definedterm.handler.CreateTermVocabularyHandler"
+ id="eu.etaxonomy.taxeditor.editor.definedTerms.newTermVocabulary"
+ name="New Term Vocabulary">
+ </command>
+ </extension>
<extension
point="org.eclipse.ui.importWizards">
<category
properties="isShowExperimentalFeatures"
type="org.eclipse.jface.viewers.IStructuredSelection">
</propertyTester>
+ <propertyTester
+ class="eu.etaxonomy.taxeditor.editor.definedterm.TermBasePropertyTester"
+ id="eu.etaxonomy.taxeditor.store.termEditor.propertyTester"
+ namespace="eu.etaxonomy.taxeditor.store.termEditor.propertyTester"
+ properties="isModifiable"
+ type="org.eclipse.jface.viewers.IStructuredSelection">
+ </propertyTester>
</extension>
<extension
point="org.eclipse.core.expressions.definitions">
<definition
id="isCompatible">
<with
- variable="activeMenuSelection">
+ variable="selection">
<test
property="eu.etaxonomy.taxeditor.datasource.propertyTester.isCompatible">
</test>
<definition
id="isShowExperimentalFeatures">
<with
- variable="activeMenuSelection">
+ variable="selection">
<test
property="eu.etaxonomy.taxeditor.preferences.propertyTester.isShowExperimentalFeatures">
</test>
</with>
</definition>
+ <definition
+ id="isModifiable">
+ <with
+ variable="selection">
+ <test
+ property="eu.etaxonomy.taxeditor.store.termEditor.propertyTester.isModifiable">
+ </test>
+ </with>
+ </definition>
</extension>
</plugin>
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>3.0.6-SNAPSHOT</version>
+ <version>3.0.12-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
--- /dev/null
+/**\r
+* Copyright (C) 2007 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor;\r
+\r
+import java.util.UUID;\r
+\r
+public class UsageTermCollection {\r
+ public final static UUID uuidMarkersVocabulary = UUID.fromString("19dffff7-e142-429c-a420-5d28e4ebe305");\r
+ \r
+ public final static UUID uuidUseMarkerType = UUID.fromString("2e6e42d9-e92a-41f4-899b-03c0ac64f039");\r
+ public final static String useMakerLabel = "use";\r
+ \r
+ public final static UUID uuidFeatureVocabulary = UUID.fromString("b187d555-f06f-4d65-9e53-da7c93f8eaa8");\r
+ public final static UUID uuidPalmWebFeatureTree = UUID.fromString("72ccce05-7cc8-4dab-8e47-bf3f5fd848a0");\r
+ \r
+ \r
+ public final static UUID uuidUseRecordFeature = UUID.fromString("8125a59d-b4d5-4485-89ea-67306297b599");\r
+ public final static String useRecordFeatureLabel = "Use Record";\r
+ \r
+ public final static UUID uuidUseSummaryFeature = UUID.fromString("6acb0348-c070-4512-a37c-67bcac016279");\r
+ public final static String useSummaryFeatureLabel = "Use";\r
+ \r
+ public final static UUID uuidUseCategoryVocabulary = UUID.fromString("67430d7c-fd43-4e9d-af5e-d0dca3f74931");\r
+ public final static String useCategoryVocabularyLabel = "Use Category";\r
+ public final static String useSubCategoryVocabularyLabel = "Use SubCategory";\r
+ public final static UUID uuidUseCategoryDummy = UUID.fromString("983a7184-6a51-489e-aca1-f21fc4fdbae3");\r
+ public final static UUID uuidUseSubCategoryDummy = UUID.fromString("a8d80223-5c79-4063-8c6b-4dc8681e9c62");\r
+ \r
+ public final static UUID uuidCountryVocabulary = UUID.fromString("116c51f1-e63a-46f7-a258-e1149a42868b");\r
+ public final static String countryLabel = "Country";\r
+ public final static UUID uuidCountryDummy = UUID.fromString("761dddee-bfa2-41f4-82df-3a19c71adee0");\r
+ \r
+ public final static UUID uuidPlantPartVocabulary = UUID.fromString("369914fe-d54b-4063-99ce-abc81d30ad35");\r
+ public final static String plantPartLabel = "Plant Part";\r
+ public final static UUID uuidPlantPartDummy = UUID.fromString("30150a82-a12f-4278-96ad-7ce708efa082");\r
+ \r
+ public final static UUID uuidHumanGroupVocabulary = UUID.fromString("ca46cea5-bdf7-438d-9cd8-e2793d2178dc");\r
+ public final static String humanGroupLabel = "Human Group";\r
+ public final static UUID uuidHumanGroupDummy = UUID.fromString("c4b63327-2548-429d-8d55-81fdba5900a5");\r
+ public final static UUID uuidEthnicGroupDummy = UUID.fromString("3ca851e5-d0d4-41cd-9066-f79e246c36c2");\r
+ \r
+ public final static String ethnicGroupLabel = "Ethnic Group";\r
+ \r
+ public final static String notAvailableLabel = "N/A";\r
+ \r
+ \r
+ \r
+ \r
+ \r
+ \r
+\r
+\r
+ \r
+ \r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.definedterm;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.eclipse.jface.viewers.IStructuredSelection;\r
+import org.eclipse.jface.viewers.Viewer;\r
+import org.eclipse.swt.dnd.DragSourceAdapter;\r
+import org.eclipse.swt.dnd.DragSourceEvent;\r
+\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 10 Jan 2012\r
+ *\r
+ */\r
+public class DefinedTermDragListener extends DragSourceAdapter {\r
+ \r
+ private Viewer viewer;\r
+\r
+ /**\r
+ * \r
+ */\r
+ public DefinedTermDragListener(Viewer viewer) {\r
+ this.viewer = viewer;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.swt.dnd.DragSourceAdapter#dragStart(org.eclipse.swt.dnd.DragSourceEvent)\r
+ */\r
+ @Override\r
+ public void dragStart(DragSourceEvent event) {\r
+ \r
+ event.doit = true;// set to false if needed - default is true\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.swt.dnd.DragSourceAdapter#dragFinished(org.eclipse.swt.dnd.DragSourceEvent)\r
+ */\r
+ @Override\r
+ public void dragFinished(DragSourceEvent event) {\r
+ // TODO Auto-generated method stub\r
+ super.dragFinished(event);\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.swt.dnd.DragSourceAdapter#dragSetData(org.eclipse.swt.dnd.DragSourceEvent)\r
+ */\r
+ @Override\r
+ public void dragSetData(DragSourceEvent event) {\r
+ \r
+ IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();\r
+ List<DefinedTermBase> definedTerms = new ArrayList<DefinedTermBase>();\r
+ \r
+ for (Object object : selection.toList()){\r
+ definedTerms.add((DefinedTermBase)object);\r
+ }\r
+ \r
+ if (TermTransfer.getInstance().isSupportedType(\r
+ event.dataType)) {\r
+ event.data = definedTerms.toArray(new DefinedTermBase[definedTerms.size()]);\r
+ }\r
+ }\r
+ \r
+ \r
+\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.definedterm;\r
+\r
+import java.util.ArrayList;\r
+import java.util.Collection;\r
+\r
+import org.eclipse.jface.viewers.ViewerDropAdapter;\r
+import org.eclipse.swt.dnd.TransferData;\r
+\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.operation.MoveDefinedTermOperation;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 10 Jan 2012\r
+ *\r
+ */\r
+public class DefinedTermDropAdapter extends ViewerDropAdapter {\r
+\r
+ private DefinedTermEditor editor;\r
+ /**\r
+ * @param viewer\r
+ */\r
+ protected DefinedTermDropAdapter(DefinedTermEditor editor) {\r
+ super(editor.getViewer());\r
+ this.editor = editor;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.jface.viewers.ViewerDropAdapter#performDrop(java.lang.Object)\r
+ */\r
+ @Override\r
+ public boolean performDrop(Object data) {\r
+ \r
+ TermBase target = (TermBase) getCurrentTarget();//can be vocab\r
+ //DefinedTermBase[] droppedElements = (DefinedTermBase[]) data;\r
+ Object[] droppedTerms = (Object[]) data;\r
+ Collection<DefinedTermBase> sourceTerms = new ArrayList<DefinedTermBase>(); //Arrays.asList(droppedElements)\r
+ \r
+ for (Object droppedTerm : droppedTerms) {\r
+ \r
+ DefinedTermBase term = (DefinedTermBase) droppedTerm;\r
+ sourceTerms.add(term);\r
+ \r
+ }\r
+ \r
+ AbstractPostOperation operation = new MoveDefinedTermOperation("Move Descriptions", StoreUtil.getUndoContext(), target, sourceTerms, editor);\r
+ //TODO: implement execute\r
+ StoreUtil.executeOperation(operation);\r
+ \r
+ return true;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.jface.viewers.ViewerDropAdapter#validateDrop(java.lang.Object, int, org.eclipse.swt.dnd.TransferData)\r
+ */\r
+ @Override\r
+ public boolean validateDrop(Object target, int operation,\r
+ TransferData transferType) {\r
+ boolean transferDataIsSupported = TermTransfer.getInstance().isSupportedType(transferType);\r
+ System.out.println(target);\r
+ // maybe don't need this - they will be all TermBase anyway\r
+ return target instanceof TermBase && transferDataIsSupported; \r
+ }\r
+\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+ * Copyright (C) 2009 EDIT\r
+ * European Distributed Institute of Taxonomy \r
+ * http://www.e-taxonomy.eu\r
+ * \r
+ * The contents of this file are subject to the Mozilla Public License Version 1.1\r
+ * See LICENSE.TXT at the top of this package for the full license terms.\r
+ */\r
+package eu.etaxonomy.taxeditor.editor.definedterm;\r
+\r
+import java.util.HashSet;\r
+import java.util.List;\r
+import java.util.Set;\r
+\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.jface.action.GroupMarker;\r
+import org.eclipse.jface.action.MenuManager;\r
+import org.eclipse.jface.viewers.ISelection;\r
+import org.eclipse.jface.viewers.StructuredSelection;\r
+import org.eclipse.jface.viewers.TreeViewer;\r
+import org.eclipse.jface.viewers.ViewerSorter;\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.dnd.DND;\r
+import org.eclipse.swt.dnd.Transfer;\r
+import org.eclipse.swt.layout.FillLayout;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Menu;\r
+import org.eclipse.ui.IEditorInput;\r
+import org.eclipse.ui.IEditorSite;\r
+import org.eclipse.ui.ISelectionListener;\r
+import org.eclipse.ui.ISelectionService;\r
+import org.eclipse.ui.IWorkbenchActionConstants;\r
+import org.eclipse.ui.IWorkbenchPart;\r
+import org.eclipse.ui.PartInitException;\r
+import org.eclipse.ui.part.EditorPart;\r
+\r
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
+import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;\r
+import eu.etaxonomy.cdm.api.service.IVocabularyService;\r
+import eu.etaxonomy.cdm.model.common.CdmBase;\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.input.AbstractDefinedTermEditorInput;\r
+import eu.etaxonomy.taxeditor.model.IDirtyMarkableSelectionProvider;\r
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 3 Jan 2012\r
+ *\r
+ */\r
+public class DefinedTermEditor extends EditorPart implements IConversationEnabled, ISelectionListener, IDirtyMarkableSelectionProvider, IPostOperationEnabled {\r
+\r
+ public static final String ID = "eu.etaxonomy.taxeditor.editor.definedTerm";\r
+\r
+ public static final String OPEN_COMMAND_ID = "eu.etaxonomy.taxeditor.store.openDefinedTermEditor";\r
+ \r
+ protected TreeViewer viewer;\r
+ protected ConversationHolder conversation;\r
+ private ISelectionService selectionService;\r
+ private boolean dirty;\r
+ Set<TermVocabulary<? extends DefinedTermBase>> inMemoryVocabularies = new HashSet<TermVocabulary<? extends DefinedTermBase>>();\r
+\r
+ private int dndOperations = DND.DROP_COPY | DND.DROP_MOVE;\r
+ /**\r
+ * \r
+ */\r
+ public DefinedTermEditor() {\r
+ super();\r
+ conversation = CdmStore.createConversation();\r
+ }\r
+\r
+ @Override\r
+ public void createPartControl(Composite parent) {\r
+ \r
+ // parent.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_BLUE));\r
+ \r
+ FillLayout layout = new FillLayout();\r
+ layout.marginHeight = 0;\r
+ layout.marginWidth = 0;\r
+ layout.type = SWT.VERTICAL;\r
+ \r
+ parent.setLayout(layout);\r
+ viewer = new TreeViewer(parent);\r
+ viewer.getControl().setLayoutData(LayoutConstants.FILL());\r
+ viewer.setContentProvider(new TermContentProvider());\r
+ viewer.setLabelProvider(new TermLabelProvider());\r
+ viewer.setSorter(new ViewerSorter());\r
+ \r
+ Transfer[] transfers = new Transfer[] { TermTransfer.getInstance() };\r
+ viewer.addDragSupport(dndOperations, transfers, new DefinedTermDragListener(viewer));\r
+ viewer.addDropSupport(dndOperations, transfers, new DefinedTermDropAdapter(this));\r
+\r
+ \r
+ initialiseVocabularies(); \r
+ viewer.setInput(inMemoryVocabularies);\r
+ \r
+ getSite().setSelectionProvider(viewer);\r
+ \r
+ selectionService = getSite().getWorkbenchWindow().getSelectionService();\r
+ selectionService.addSelectionListener(this);\r
+ \r
+ setPartName(getEditorInput().getName());\r
+ createMenu();\r
+ }\r
+ \r
+ \r
+ protected void initialiseVocabularies() {\r
+ inMemoryVocabularies.clear();\r
+ //List<TermVocabulary> vocabularies = CdmStore.getService(IVocabularyService.class).list(null, null, null, null, null);\r
+\r
+// for (TermVocabulary vocabulary : vocabularies){\r
+// if(vocabulary.getTerms().isEmpty()){\r
+// inMemoryVocabularies.add(vocabulary);\r
+// }\r
+// }\r
+\r
+ \r
+ List<TermVocabulary<? extends DefinedTermBase>> termVocabularies = CdmStore.getService(IVocabularyService.class).listByTermClass(getDefinedTermEditorInput().getTermClass(), true, true, null, null, null, null);\r
+ \r
+ \r
+ inMemoryVocabularies.addAll(termVocabularies);\r
+ }\r
+ \r
+ /**\r
+ * \r
+ */\r
+ public AbstractDefinedTermEditorInput getDefinedTermEditorInput() {\r
+ return (AbstractDefinedTermEditorInput) getEditorInput();\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.operation.IPostOperationEnabled#postOperation(eu.etaxonomy.cdm.model.common.CdmBase)\r
+ */\r
+ @Override\r
+ public boolean postOperation(CdmBase objectAffectedByOperation) {\r
+\r
+ if(objectAffectedByOperation instanceof DefinedTermBase){\r
+ viewer.refresh();\r
+ } else if (objectAffectedByOperation instanceof TermVocabulary){\r
+// if (inMemoryVocabularies.contains(objectAffectedByOperation)){\r
+// inMemoryVocabularies.remove((TermVocabulary) objectAffectedByOperation);\r
+// }else{\r
+// inMemoryVocabularies.add((TermVocabulary) objectAffectedByOperation);\r
+// DetailsViewPart view = (DetailsViewPart) StoreUtil.getView(DetailsViewPart.ID, true);\r
+// view.setFocus();\r
+// }\r
+ \r
+// viewer.setInput(inMemoryVocabularies);\r
+ viewer.refresh();\r
+ \r
+ }\r
+ \r
+ \r
+ \r
+ if(objectAffectedByOperation != null){\r
+ viewer.setSelection(new StructuredSelection(objectAffectedByOperation));\r
+ }\r
+ setDirty(true);\r
+\r
+ return true;\r
+ } \r
+\r
+ private void createMenu() {\r
+ // register context menu\r
+ MenuManager menuManager = new MenuManager();\r
+ menuManager\r
+ .add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));\r
+ getSite().registerContextMenu(ID, menuManager, viewer);\r
+ \r
+ Control control = viewer.getControl();\r
+ Menu menu = menuManager.createContextMenu(control);\r
+ control.setMenu(menu);\r
+ }\r
+ \r
+\r
+ \r
+\r
+ @Override\r
+ public void doSave(IProgressMonitor monitor) {\r
+ getConversationHolder().commit();\r
+ setDirty(false);\r
+ initialiseVocabularies();\r
+ }\r
+ \r
+\r
+ @Override\r
+ public void doSaveAs() {}\r
+\r
+ @Override\r
+ public void init(IEditorSite site, IEditorInput input) throws PartInitException {\r
+ setSite(site);\r
+ setInput(input);\r
+ \r
+ }\r
+\r
+ @Override\r
+ public boolean isDirty() {\r
+ return dirty;\r
+ }\r
+\r
+ @Override\r
+ public boolean isSaveAsAllowed() {\r
+ return false;\r
+ }\r
+\r
+ @Override\r
+ public void setFocus() {\r
+ getConversationHolder().bind();\r
+ }\r
+\r
+ @Override\r
+ public void update(CdmDataChangeMap changeEvents) {\r
+ // TODO Auto-generated method stub\r
+ \r
+ }\r
+\r
+ @Override\r
+ public ConversationHolder getConversationHolder() {\r
+ return conversation;\r
+ }\r
+\r
+ @Override\r
+ public void selectionChanged(IWorkbenchPart part, ISelection selection) {\r
+ // TODO Auto-generated method stub\r
+ \r
+ }\r
+\r
+ @Override\r
+ public void changed(Object element) {\r
+ dirty = true;\r
+ setDirty(true);\r
+ viewer.update(element, null);\r
+ }\r
+\r
+ /**\r
+ * @param dirty the dirty to set\r
+ */\r
+ public void setDirty(boolean dirty) {\r
+ this.dirty = dirty;\r
+ firePropertyChange(PROP_DIRTY);\r
+ }\r
+\r
+ @Override\r
+ public boolean onComplete() {\r
+ // TODO Auto-generated method stub\r
+ return false;\r
+ }\r
+\r
+ /**\r
+ * \r
+ */\r
+ public TreeViewer getViewer() {\r
+ return viewer;\r
+ }\r
+\r
+ /**\r
+ * @return \r
+ * \r
+ */\r
+ public Set<TermVocabulary<? extends DefinedTermBase>> getInMemoryVocabularies() {\r
+ return inMemoryVocabularies;\r
+ }\r
+\r
+}
\ No newline at end of file
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.definedterm;\r
+\r
+import org.eclipse.core.expressions.PropertyTester;\r
+import org.eclipse.jface.viewers.IStructuredSelection;\r
+\r
+import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.Marker;\r
+import eu.etaxonomy.cdm.model.common.MarkerType;\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 9 Jan 2012\r
+ *\r
+ */\r
+public class TermBasePropertyTester extends PropertyTester {\r
+\r
+ private static final String IS_MODIFIABLE = "isModifiable";\r
+ \r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)\r
+ */\r
+ @Override\r
+ public boolean test(Object receiver, String property, Object[] args,\r
+ Object expectedValue) {\r
+ \r
+ IStructuredSelection selection = (IStructuredSelection) receiver;\r
+ Object selectedElement = selection.getFirstElement();\r
+ if (selectedElement != null && HibernateProxyHelper.isInstanceOf(selectedElement, TermBase.class)){\r
+ TermBase term = HibernateProxyHelper.deproxy(selectedElement, TermBase.class);\r
+\r
+ if(IS_MODIFIABLE.equals(property)){\r
+ return isModifiable(term);\r
+ }\r
+ }\r
+ \r
+ return false;\r
+ }\r
+\r
+\r
+ /**\r
+ * Checks whether there is a {@link Marker} with the type {@link MarkerType#MODIFIABLE()} and if there is then return its value.\r
+ * \r
+ * @return The markers value if it exists \r
+ */\r
+ public static boolean isModifiable(TermBase termBase) {\r
+ if (termBase == null){\r
+ return true;\r
+ }\r
+ \r
+ TermVocabulary vocabulary = null;\r
+ \r
+ if(termBase instanceof DefinedTermBase){\r
+ vocabulary = ((DefinedTermBase) termBase).getVocabulary();\r
+ }else if(termBase instanceof TermVocabulary){\r
+ vocabulary = (TermVocabulary) termBase;\r
+ }\r
+ \r
+ if(vocabulary == null){\r
+ return true;\r
+ }\r
+ \r
+ for(Marker vocabularyMarker : vocabulary.getMarkers()){\r
+ if(vocabularyMarker.getMarkerType().equals(MarkerType.MODIFIABLE())){\r
+ return vocabularyMarker.getValue(); \r
+ }\r
+ }\r
+ \r
+ return true;\r
+ }\r
+\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.definedterm;\r
+\r
+import java.util.Collection;\r
+import java.util.HashSet;\r
+import java.util.Set;\r
+import java.util.SortedSet;\r
+\r
+import org.eclipse.jface.viewers.ITreeContentProvider;\r
+import org.eclipse.jface.viewers.Viewer;\r
+\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 8 Dec 2011\r
+ *\r
+ */\r
+public class TermContentProvider implements ITreeContentProvider {\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()\r
+ */\r
+ @Override\r
+ public void dispose() {\r
+ // TODO Auto-generated method stub\r
+\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)\r
+ */\r
+ @Override\r
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {\r
+ // TODO Auto-generated method stub\r
+\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)\r
+ */\r
+ @Override\r
+ public Object[] getElements(Object inputElement) {\r
+ \r
+ Collection<TermVocabulary> inputElements = (Collection<TermVocabulary>) inputElement;\r
+ return inputElements.toArray();\r
+ //return null;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)\r
+ */\r
+ @Override\r
+ public Object[] getChildren(Object parentElement) {\r
+ \r
+ if(parentElement instanceof TermVocabulary){\r
+ return getTopLevelElements((TermVocabulary) parentElement);\r
+ } else if (parentElement instanceof DefinedTermBase) {\r
+ return ((DefinedTermBase) parentElement).getIncludes().toArray();\r
+ }\r
+ return null;\r
+ }\r
+ \r
+ /**\r
+ * \r
+ * @param vocabulary\r
+ * @return An array of DefinedTermBase objects that do not have parents\r
+ * \r
+ * TODO: Needs to be implemented in cdmlib\r
+ */\r
+ private Object[] getTopLevelElements(TermVocabulary vocabulary) {\r
+ \r
+ SortedSet<DefinedTermBase> terms = vocabulary.getTermsOrderedByLabels(CdmStore.getDefaultLanguage());\r
+ Set<DefinedTermBase> topLevelTerms = new HashSet<DefinedTermBase>(); \r
+ \r
+ for (DefinedTermBase term : terms){\r
+ if (term.getPartOf() == null){\r
+ topLevelTerms.add(term);\r
+ }\r
+ \r
+ }\r
+ \r
+ return topLevelTerms.toArray();\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)\r
+ */\r
+ @Override\r
+ public Object getParent(Object element) {\r
+ \r
+ if(element instanceof DefinedTermBase){\r
+ \r
+ DefinedTermBase definedTerm = (DefinedTermBase)element;\r
+ if (definedTerm.getPartOf() == null) {\r
+ return definedTerm.getVocabulary();\r
+ } else {\r
+ return definedTerm.getPartOf();\r
+ }\r
+ } \r
+ return null;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)\r
+ */\r
+ @Override\r
+ public boolean hasChildren(Object element) {\r
+ \r
+ if (getChildren(element) != null){\r
+ \r
+ return getChildren(element).length > 0;\r
+ }\r
+ return false;\r
+ }\r
+\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.definedterm;\r
+\r
+import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider;\r
+import org.eclipse.jface.viewers.LabelProvider;\r
+import org.eclipse.jface.viewers.StyledString;\r
+\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 9 Dec 2011\r
+ *\r
+ */\r
+public class TermLabelProvider extends LabelProvider implements\r
+ IStyledLabelProvider {\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider#getStyledText(java.lang.Object)\r
+ */\r
+ @Override\r
+ public StyledString getStyledText(Object element) {\r
+ \r
+ return new StyledString(getText(element), StyledString.QUALIFIER_STYLER);\r
+ }\r
+ \r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)\r
+ */\r
+ @Override\r
+ public String getText(Object element) {\r
+ \r
+ if (element instanceof TermBase){\r
+ return ((TermBase)element).getLabel();\r
+ } \r
+ return super.getText(element);\r
+ }\r
+\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.definedterm;\r
+\r
+import java.util.UUID;\r
+\r
+import eu.etaxonomy.cdm.api.service.ITermService;\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.taxeditor.model.CdmObjectTransfer;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 10 Jan 2012\r
+ *\r
+ */\r
+public class TermTransfer extends CdmObjectTransfer<DefinedTermBase> {\r
+ \r
+ private static TermTransfer instance = new TermTransfer();\r
+ private static final String TYPE_NAME = "termElement-transfer-format";\r
+ private static final int TYPEID = registerType(TYPE_NAME);\r
+ \r
+ public static synchronized TermTransfer getInstance(){\r
+ return instance;\r
+ }\r
+ \r
+ private TermTransfer() {}\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.model.CdmObjectTransfer#loadElement(java.util.UUID)\r
+ */\r
+ @Override\r
+ public DefinedTermBase loadElement(UUID uuid) {\r
+ return CdmStore.getService(ITermService.class).load(uuid);\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.swt.dnd.Transfer#getTypeIds()\r
+ */\r
+ @Override\r
+ protected int[] getTypeIds() {\r
+ return new int[] { TYPEID };\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.swt.dnd.Transfer#getTypeNames()\r
+ */\r
+ @Override\r
+ protected String[] getTypeNames() {\r
+ return new String[] { TYPE_NAME };\r
+ }\r
+\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+ * Copyright (C) 2009 EDIT\r
+ * European Distributed Institute of Taxonomy \r
+ * http://www.e-taxonomy.eu\r
+ * \r
+ * The contents of this file are subject to the Mozilla Public License Version 1.1\r
+ * See LICENSE.TXT at the top of this package for the full license terms.\r
+ */\r
+package eu.etaxonomy.taxeditor.editor.definedterm.handler;\r
+\r
+import org.eclipse.core.commands.AbstractHandler;\r
+import org.eclipse.core.commands.ExecutionEvent;\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.IHandler;\r
+import org.eclipse.core.commands.common.NotDefinedException;\r
+import org.eclipse.jface.viewers.IStructuredSelection;\r
+import org.eclipse.ui.handlers.HandlerUtil;\r
+\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.operation.CreateDefinedTermOperation;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 21 Dec 2011\r
+ * \r
+ */\r
+public class CreateDefinedTermHandler extends AbstractHandler implements IHandler {\r
+\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.\r
+ * ExecutionEvent)\r
+ */\r
+ @Override\r
+ public Object execute(ExecutionEvent event) throws ExecutionException {\r
+ IPostOperationEnabled editor = (IPostOperationEnabled) HandlerUtil\r
+ .getActiveEditor(event);\r
+\r
+ IStructuredSelection selection = (IStructuredSelection) HandlerUtil\r
+ .getCurrentSelection(event);\r
+\r
+ TermBase selectedElement = (TermBase) selection.getFirstElement();\r
+\r
+ try {\r
+ AbstractPostOperation operation = new CreateDefinedTermOperation(\r
+ event.getCommand().getName(), StoreUtil.getUndoContext(),\r
+ selectedElement, editor);\r
+ StoreUtil.executeOperation(operation);\r
+\r
+ } catch (NotDefinedException e) {\r
+ StoreUtil.error(getClass(), e);\r
+ }\r
+\r
+ return null;\r
+ }\r
+\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.definedterm.handler;\r
+\r
+import org.eclipse.core.commands.AbstractHandler;\r
+import org.eclipse.core.commands.ExecutionEvent;\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.IHandler;\r
+import org.eclipse.core.commands.common.NotDefinedException;\r
+import org.eclipse.jface.viewers.IStructuredSelection;\r
+import org.eclipse.ui.handlers.HandlerUtil;\r
+\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.operation.CreateDefinedTermOperation;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.operation.CreateTermVocabularyOperation;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 21 Dec 2011\r
+ *\r
+ */\r
+public class CreateTermVocabularyHandler extends AbstractHandler implements\r
+ IHandler {\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)\r
+ */\r
+ @Override\r
+ public Object execute(ExecutionEvent event) throws ExecutionException {\r
+ IPostOperationEnabled editor = (IPostOperationEnabled) HandlerUtil\r
+ .getActiveEditor(event);\r
+\r
+ if (! (editor instanceof DefinedTermEditor)){\r
+ return null;\r
+ }\r
+ \r
+ try {\r
+ AbstractPostOperation operation = new CreateTermVocabularyOperation(\r
+ event.getCommand().getName(), StoreUtil.getUndoContext(), (DefinedTermEditor) editor);\r
+ StoreUtil.executeOperation(operation);\r
+\r
+ } catch (NotDefinedException e) {\r
+ StoreUtil.error(getClass(), e);\r
+ }\r
+\r
+ return null;\r
+ }\r
+\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.definedterm.handler;\r
+\r
+import java.util.Iterator;\r
+\r
+import org.eclipse.core.commands.AbstractHandler;\r
+import org.eclipse.core.commands.ExecutionEvent;\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.common.NotDefinedException;\r
+import org.eclipse.jface.viewers.IStructuredSelection;\r
+import org.eclipse.ui.handlers.HandlerUtil;\r
+\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.operation.DeleteTermBaseOperation;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 22 Dec 2011\r
+ *\r
+ */\r
+public class DeleteTermBaseHandler extends AbstractHandler {\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)\r
+ */\r
+ @Override\r
+ public Object execute(ExecutionEvent event) throws ExecutionException {\r
+ DefinedTermEditor editor = (DefinedTermEditor) HandlerUtil\r
+ .getActiveEditor(event);\r
+\r
+ IStructuredSelection selection = (IStructuredSelection) HandlerUtil\r
+ .getCurrentSelection(event);\r
+\r
+ Iterator<TermBase> selectionIterator = selection.iterator();\r
+\r
+ while (selectionIterator.hasNext()){\r
+ \r
+ TermBase term = selectionIterator.next();\r
+ \r
+ try {\r
+ AbstractPostOperation operation = new DeleteTermBaseOperation(\r
+ event.getCommand().getName(), StoreUtil.getUndoContext(),\r
+ term, editor);\r
+ StoreUtil.executeOperation(operation);\r
+ \r
+ } catch (NotDefinedException e) {\r
+ StoreUtil.error(getClass(), e);\r
+ }\r
+ }\r
+\r
+ return null;\r
+ }\r
+\r
+}\r
--- /dev/null
+package eu.etaxonomy.taxeditor.editor.definedterm.handler;\r
+import org.eclipse.core.commands.AbstractHandler;\r
+import org.eclipse.core.commands.ExecutionEvent;\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.IHandler;\r
+import org.eclipse.core.commands.IParameter;\r
+import org.eclipse.core.commands.common.NotDefinedException;\r
+import org.eclipse.ui.IWorkbenchPage;\r
+import org.eclipse.ui.PartInitException;\r
+import org.eclipse.ui.handlers.HandlerUtil;\r
+import org.eclipse.ui.handlers.ShowViewHandler;\r
+\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.location.NamedArea;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.input.DefinedTermEditorInputFactory;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
+\r
+// $Id$\r
+/**\r
+ * Copyright (C) 2009 EDIT\r
+ * European Distributed Institute of Taxonomy \r
+ * http://www.e-taxonomy.eu\r
+ * \r
+ * The contents of this file are subject to the Mozilla Public License Version 1.1\r
+ * See LICENSE.TXT at the top of this package for the full license terms.\r
+ */\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 8 Dec 2011\r
+ *\r
+ */\r
+public class OpenDefinedTermEditorHandler extends AbstractHandler implements\r
+ IHandler {\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)\r
+ */\r
+ @Override\r
+ public Object execute(ExecutionEvent event) throws ExecutionException {\r
+ \r
+ try {\r
+ String parameter = event.getParameter("eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter");\r
+ Class<? extends DefinedTermBase> clazz = (Class<? extends DefinedTermBase>) Class.forName(parameter);\r
+ \r
+ IWorkbenchPage activePage = StoreUtil.getActivePage();\r
+ try {\r
+ activePage.openEditor(DefinedTermEditorInputFactory.NewInstance(clazz), DefinedTermEditor.ID);\r
+ } catch (PartInitException e) {\r
+ StoreUtil.error(getClass(), e);\r
+ }\r
+ } catch (ClassNotFoundException e) {\r
+ StoreUtil.error(getClass(), e);\r
+ }\r
+ return null;\r
+ }\r
+\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.definedterm.handler;\r
+\r
+import java.util.HashMap;\r
+import java.util.Map;\r
+\r
+import org.eclipse.jface.action.IContributionItem;\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.ui.PlatformUI;\r
+import org.eclipse.ui.actions.CompoundContributionItem;\r
+import org.eclipse.ui.menus.CommandContributionItem;\r
+import org.eclipse.ui.menus.CommandContributionItemParameter;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 4 Jan 2012\r
+ *\r
+ */\r
+public class OpenDefinedTermMenu extends CompoundContributionItem {\r
+\r
+ /**\r
+ * \r
+ */\r
+ public OpenDefinedTermMenu() {\r
+ // TODO Auto-generated constructor stub\r
+ }\r
+\r
+ /**\r
+ * @param id\r
+ */\r
+ public OpenDefinedTermMenu(String id) {\r
+ super(id);\r
+ // TODO Auto-generated constructor stub\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()\r
+ */\r
+ @Override\r
+ protected IContributionItem[] getContributionItems() {\r
+ // TODO Auto-generated method stub\r
+ return null;\r
+ }\r
+ \r
+ /**\r
+ * @param key\r
+ * @param object\r
+ * @return\r
+ */\r
+ private IContributionItem createContributionItem(String label,\r
+ String inputType) {\r
+ CommandContributionItemParameter parameter = new CommandContributionItemParameter(\r
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow(), null,\r
+ "eu.etaxonomy.taxeditor.store.definedterm.menu.open", SWT.NONE);\r
+\r
+ parameter.label = label;\r
+\r
+ Map parameters = new HashMap();\r
+ parameters.put("eu.etaxonomy.taxeditor.store.definedterm.menu.open", inputType);\r
+ parameter.parameters = parameters;\r
+\r
+ return new CommandContributionItem(parameter);\r
+ }\r
+\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+ * Copyright (C) 2009 EDIT\r
+ * European Distributed Institute of Taxonomy \r
+ * http://www.e-taxonomy.eu\r
+ * \r
+ * The contents of this file are subject to the Mozilla Public License Version 1.1\r
+ * See LICENSE.TXT at the top of this package for the full license terms.\r
+ */\r
+package eu.etaxonomy.taxeditor.editor.definedterm.input;\r
+\r
+import java.util.List;\r
+\r
+import org.eclipse.jface.resource.ImageDescriptor;\r
+import org.eclipse.ui.IEditorInput;\r
+import org.eclipse.ui.IPersistableElement;\r
+\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 3 Jan 2012\r
+ *\r
+ */\r
+public abstract class AbstractDefinedTermEditorInput<T extends DefinedTermBase> implements IEditorInput {\r
+\r
+ /**\r
+ * \r
+ */\r
+ public AbstractDefinedTermEditorInput() {\r
+ super();\r
+ }\r
+\r
+ @Override\r
+ public Object getAdapter(Class adapter) {\r
+ return null;\r
+ }\r
+\r
+ @Override\r
+ public boolean exists() {\r
+ return false;\r
+ }\r
+\r
+ @Override\r
+ public ImageDescriptor getImageDescriptor() {\r
+ return null;\r
+ }\r
+\r
+ @Override\r
+ public IPersistableElement getPersistable() {\r
+ return null;\r
+ }\r
+\r
+ @Override\r
+ public String getToolTipText() {\r
+ return getName();\r
+ }\r
+\r
+ /**\r
+ * @return\r
+ */\r
+ public abstract List<String> getTermClasses();\r
+ \r
+ public abstract T createTermInstance();\r
+ \r
+ public Class<? extends DefinedTermBase> getTermClass() {\r
+ \r
+ return createTermInstance().getClass();\r
+ }\r
+\r
+}
\ No newline at end of file
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.definedterm.input;\r
+\r
+import org.eclipse.ui.IEditorInput;\r
+\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.ExtensionType;\r
+import eu.etaxonomy.cdm.model.common.MarkerType;\r
+import eu.etaxonomy.cdm.model.description.Feature;\r
+import eu.etaxonomy.cdm.model.description.Modifier;\r
+import eu.etaxonomy.cdm.model.description.State;\r
+import eu.etaxonomy.cdm.model.location.NamedArea;\r
+import eu.etaxonomy.cdm.model.location.NamedAreaLevel;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 3 Jan 2012\r
+ *\r
+ */\r
+public class DefinedTermEditorInputFactory {\r
+\r
+// public static final String NamedArea = "eu.etaxonomy.taxeditor.editor.namedArea";\r
+\r
+ /**\r
+ * @param clazz\r
+ * @return\r
+ */\r
+ public static IEditorInput NewInstance(Class<? extends DefinedTermBase> clazz) {\r
+ if(clazz == NamedArea.class){\r
+ return new NamedAreaEditorInput();\r
+ } \r
+ if (clazz == NamedAreaLevel.class){\r
+ return new NamedAreaLevelEditorInput();\r
+ }\r
+ if (clazz == ExtensionType.class){\r
+ return new ExtensionTypeEditorInput();\r
+ }\r
+ if (clazz == MarkerType.class){\r
+ return new MarkerTypeEditorInput();\r
+ }\r
+ if (clazz == Feature.class){\r
+ return new FeatureEditorInput();\r
+ }\r
+ if (clazz == State.class){\r
+ return new StateEditorInput();\r
+ }\r
+ if (clazz == Modifier.class){\r
+ return new ModifierEditorInput();\r
+ }\r
+ \r
+ return null;\r
+ }\r
+\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.definedterm.input;\r
+\r
+import java.util.Arrays;\r
+import java.util.List;\r
+\r
+import eu.etaxonomy.cdm.model.common.ExtensionType;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 6 Jan 2012\r
+ *\r
+ */\r
+public class ExtensionTypeEditorInput extends AbstractDefinedTermEditorInput<ExtensionType> {\r
+ \r
+ private List<String> termClasses = Arrays.asList(new String[]{\r
+ ExtensionType.class.getName()\r
+ });\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.ui.IEditorInput#getName()\r
+ */\r
+ @Override\r
+ public String getName() {\r
+ return "Extension Type";\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.editor.definedterm.AbstractDefinedTermEditorInput#getTermClasses()\r
+ */\r
+ @Override\r
+ public List<String> getTermClasses() {\r
+ return termClasses;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.editor.definedterm.AbstractDefinedTermEditorInput#createTermInstance()\r
+ */\r
+ @Override\r
+ public ExtensionType createTermInstance() {\r
+ return ExtensionType.NewInstance();\r
+ }\r
+\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.definedterm.input;\r
+\r
+import java.util.Arrays;\r
+import java.util.List;\r
+\r
+import eu.etaxonomy.cdm.model.description.Feature;\r
+/**\r
+ * @author l.morris\r
+ * @date 11 Jan 2012\r
+ *\r
+ */\r
+public class FeatureEditorInput extends AbstractDefinedTermEditorInput<Feature> {\r
+\r
+ private List<String> termClasses = Arrays.asList(new String[]{\r
+ Feature.class.getName()\r
+ });\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.ui.IEditorInput#getName()\r
+ */\r
+ @Override\r
+ public String getName() {\r
+ return "Feature";\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.editor.definedterm.input.AbstractDefinedTermEditorInput#getTermClasses()\r
+ */\r
+ @Override\r
+ public List<String> getTermClasses() {\r
+ return termClasses;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.editor.definedterm.input.AbstractDefinedTermEditorInput#createTermInstance()\r
+ */\r
+ @Override\r
+ public Feature createTermInstance() {\r
+ return Feature.NewInstance();\r
+ }\r
+\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.definedterm.input;\r
+\r
+import java.util.Arrays;\r
+import java.util.List;\r
+\r
+import eu.etaxonomy.cdm.model.common.MarkerType;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 6 Jan 2012\r
+ *\r
+ */\r
+public class MarkerTypeEditorInput extends AbstractDefinedTermEditorInput<MarkerType> {\r
+ \r
+ private List<String> termClasses = Arrays.asList(new String[]{\r
+ MarkerType.class.getName()\r
+ });\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.ui.IEditorInput#getName()\r
+ */\r
+ @Override\r
+ public String getName() {\r
+ return "Marker Type";\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.editor.definedterm.AbstractDefinedTermEditorInput#getTermClasses()\r
+ */\r
+ @Override\r
+ public List<String> getTermClasses() {\r
+ return termClasses;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.editor.definedterm.AbstractDefinedTermEditorInput#createTermInstance()\r
+ */\r
+ @Override\r
+ public MarkerType createTermInstance() {\r
+ return new MarkerType();\r
+ }\r
+ \r
+ \r
+\r
+}\r
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2009 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.editor.definedterm.input;
+
+import java.util.Arrays;
+import java.util.List;
+
+import eu.etaxonomy.cdm.model.description.Modifier;
+
+
+/**
+ * @author n.hoffmann
+ * @date Jan 24, 2012
+ *
+ */
+public class ModifierEditorInput extends AbstractDefinedTermEditorInput<Modifier> {
+
+ private List<String> termClasses = Arrays.asList(new String[]{
+ Modifier.class.getName()
+ });
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IEditorInput#getName()
+ */
+ @Override
+ public String getName() {
+ return "Modifier";
+ }
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.editor.definedterm.input.AbstractDefinedTermEditorInput#getTermClasses()
+ */
+ @Override
+ public List<String> getTermClasses() {
+ return termClasses;
+ }
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.editor.definedterm.input.AbstractDefinedTermEditorInput#createTermInstance()
+ */
+ @Override
+ public Modifier createTermInstance() {
+ return Modifier.NewInstance();
+ }
+
+}
\ No newline at end of file
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.definedterm.input;\r
+\r
+import java.util.Arrays;\r
+import java.util.List;\r
+\r
+import eu.etaxonomy.cdm.model.location.Continent;\r
+import eu.etaxonomy.cdm.model.location.NamedArea;\r
+import eu.etaxonomy.cdm.model.location.TdwgArea;\r
+import eu.etaxonomy.cdm.model.location.WaterbodyOrCountry;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 8 Dec 2011\r
+ *\r
+ */\r
+public class NamedAreaEditorInput extends AbstractDefinedTermEditorInput<NamedArea> {\r
+\r
+ private List<String> termClasses = Arrays.asList(new String[]{\r
+ NamedArea.class.getName(), \r
+ TdwgArea.class.getName(),\r
+ WaterbodyOrCountry.class.getName(),\r
+ Continent.class.getName()\r
+ });\r
+ \r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.ui.IEditorInput#getName()\r
+ */\r
+ @Override\r
+ public String getName() {\r
+ return "Named Area";\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.editor.definedterm.AbstractDefinedTermEditorInput#getTermClasses()\r
+ */\r
+ @Override\r
+ public List<String> getTermClasses() {\r
+ return termClasses;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.editor.definedterm.AbstractDefinedTermEditorInput#createTermInstance()\r
+ */\r
+ @Override\r
+ public NamedArea createTermInstance() {\r
+ return NamedArea.NewInstance();\r
+ }\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.definedterm.input;\r
+\r
+import java.util.Arrays;\r
+import java.util.List;\r
+\r
+import eu.etaxonomy.cdm.model.location.NamedAreaLevel;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 4 Jan 2012\r
+ *\r
+ */\r
+public class NamedAreaLevelEditorInput extends AbstractDefinedTermEditorInput<NamedAreaLevel> {\r
+\r
+ \r
+ private List<String> termClasses = Arrays.asList(new String[]{\r
+ NamedAreaLevel.class.getName()\r
+ });\r
+ \r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.ui.IEditorInput#getName()\r
+ */\r
+ @Override\r
+ public String getName() {\r
+ return "Named Area Level";\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.editor.definedterm.AbstractDefinedTermEditorInput#getTermClasses()\r
+ */\r
+ @Override\r
+ public List<String> getTermClasses() {\r
+ return termClasses;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.editor.definedterm.AbstractDefinedTermEditorInput#createTermInstance()\r
+ */\r
+ @Override\r
+ public NamedAreaLevel createTermInstance() {\r
+ return NamedAreaLevel.NewInstance();\r
+ }\r
+\r
+}\r
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2009 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.editor.definedterm.input;
+
+import java.util.Arrays;
+import java.util.List;
+
+import eu.etaxonomy.cdm.model.description.State;
+
+/**
+ * @author n.hoffmann
+ * @date Jan 24, 2012
+ *
+ */
+public class StateEditorInput extends AbstractDefinedTermEditorInput<State> {
+
+ private List<String> termClasses = Arrays.asList(new String[]{
+ State.class.getName()
+ });
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IEditorInput#getName()
+ */
+ @Override
+ public String getName() {
+ return "State";
+ }
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.editor.definedterm.input.AbstractDefinedTermEditorInput#getTermClasses()
+ */
+ @Override
+ public List<String> getTermClasses() {
+ return termClasses;
+ }
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.editor.definedterm.input.AbstractDefinedTermEditorInput#createTermInstance()
+ */
+ @Override
+ public State createTermInstance() {
+ return State.NewInstance();
+ }
+
+}
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.definedterm.operation;\r
+\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.operations.IUndoContext;\r
+import org.eclipse.core.runtime.IAdaptable;\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.core.runtime.IStatus;\r
+import org.eclipse.ui.IEditorInput;\r
+\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.cdm.model.location.NamedArea;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.input.AbstractDefinedTermEditorInput;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.input.NamedAreaEditorInput;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 21 Dec 2011\r
+ *\r
+ */\r
+public class CreateDefinedTermOperation extends AbstractPostOperation {\r
+\r
+ \r
+\r
+ private TermBase parentTermBase;\r
+ private AbstractDefinedTermEditorInput editorInput; \r
+\r
+ /**\r
+ * @param label\r
+ * @param undoContext\r
+ * @param postOperationEnabled\r
+ */\r
+ public CreateDefinedTermOperation(String label,\r
+ IUndoContext undoContext, TermBase termBase, IPostOperationEnabled postOperationEnabled) {\r
+ super(label, undoContext, postOperationEnabled);\r
+ this.parentTermBase = termBase;\r
+ editorInput = ((DefinedTermEditor)postOperationEnabled).getDefinedTermEditorInput();\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+ */\r
+ @Override\r
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
+ throws ExecutionException {\r
+ \r
+ DefinedTermBase newTerm = editorInput.createTermInstance(); \r
+ \r
+ newTerm.setLabel("Untitled");\r
+ \r
+ if (parentTermBase instanceof TermVocabulary){\r
+ TermVocabulary vocabulary = (TermVocabulary) parentTermBase;\r
+ vocabulary.addTerm(newTerm);\r
+ } else if (parentTermBase instanceof DefinedTermBase) {\r
+ DefinedTermBase parent = (DefinedTermBase) parentTermBase;\r
+ parent.addIncludes(newTerm);\r
+ TermVocabulary vocabulary = parent.getVocabulary();\r
+ vocabulary.addTerm(newTerm);\r
+ }\r
+ \r
+ return postExecute(newTerm);\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+ */\r
+ @Override\r
+ public IStatus redo(IProgressMonitor monitor, IAdaptable info)\r
+ throws ExecutionException {\r
+ // TODO Auto-generated method stub\r
+ return null;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+ */\r
+ @Override\r
+ public IStatus undo(IProgressMonitor monitor, IAdaptable info)\r
+ throws ExecutionException {\r
+ // TODO Auto-generated method stub\r
+ return null;\r
+ }\r
+\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.definedterm.operation;\r
+\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.operations.IUndoContext;\r
+import org.eclipse.core.runtime.IAdaptable;\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.core.runtime.IStatus;\r
+\r
+import eu.etaxonomy.cdm.api.service.IVocabularyService;\r
+import eu.etaxonomy.cdm.model.common.OrderedTermVocabulary;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 21 Dec 2011\r
+ *\r
+ */\r
+public class CreateTermVocabularyOperation extends AbstractPostOperation {\r
+\r
+ private DefinedTermEditor definedTermEditor;\r
+\r
+ /**\r
+ * @param label\r
+ * @param undoContext\r
+ * @param postOperationEnabled\r
+ */\r
+ public CreateTermVocabularyOperation(String label,\r
+ IUndoContext undoContext, DefinedTermEditor definedTermEditor) {\r
+ super(label, undoContext, definedTermEditor);\r
+ this.definedTermEditor = definedTermEditor;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+ */\r
+ @Override\r
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
+ throws ExecutionException {\r
+\r
+ TermVocabulary termVocabulary = OrderedTermVocabulary.NewInstance(null, "Untitled", null, null);\r
+ CdmStore.getService(IVocabularyService.class).save(termVocabulary);\r
+ definedTermEditor.getInMemoryVocabularies().add(termVocabulary);\r
+ \r
+ return postExecute(termVocabulary);\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+ */\r
+ @Override\r
+ public IStatus redo(IProgressMonitor monitor, IAdaptable info)\r
+ throws ExecutionException {\r
+ // TODO Auto-generated method stub\r
+ return null;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+ */\r
+ @Override\r
+ public IStatus undo(IProgressMonitor monitor, IAdaptable info)\r
+ throws ExecutionException {\r
+ // TODO Auto-generated method stub\r
+ return null;\r
+ }\r
+\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.definedterm.operation;\r
+\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.operations.IUndoContext;\r
+import org.eclipse.core.runtime.IAdaptable;\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.core.runtime.IStatus;\r
+import org.eclipse.core.runtime.Status;\r
+\r
+import eu.etaxonomy.cdm.api.service.ITermService;\r
+import eu.etaxonomy.cdm.api.service.IVocabularyService;\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 22 Dec 2011\r
+ *\r
+ */\r
+public class DeleteTermBaseOperation extends AbstractPostOperation {\r
+\r
+ private TermBase termBase;\r
+ private DefinedTermEditor definedTermEditor;\r
+ /**\r
+ * @param label\r
+ * @param undoContext\r
+ * @param postOperationEnabled\r
+ */\r
+ public DeleteTermBaseOperation(String label, IUndoContext undoContext, TermBase termBase,\r
+ DefinedTermEditor definedTermEditor) {\r
+ super(label, undoContext, definedTermEditor);\r
+ this.termBase = termBase;\r
+ this.definedTermEditor = definedTermEditor;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+ */\r
+ @Override\r
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
+ throws ExecutionException {\r
+ \r
+ \r
+ \r
+ if (termBase instanceof TermVocabulary) {\r
+ \r
+ if (!((TermVocabulary)termBase).getTerms().isEmpty()) {\r
+ IStatus status = new Status(IStatus.CANCEL, StoreUtil.getPluginId(), "Delete all terms from this vocaulary before deleting the vocabulary.");\r
+ StoreUtil.warningDialog("Vocabulary not empty", termBase, status);\r
+ return status;\r
+ }\r
+ definedTermEditor.getInMemoryVocabularies().remove(termBase); \r
+ CdmStore.getService(IVocabularyService.class).delete((TermVocabulary)termBase);\r
+ \r
+ } else if (termBase instanceof DefinedTermBase) {\r
+ \r
+ \r
+ DefinedTermBase definedTermBase = (DefinedTermBase) termBase;\r
+ if(!definedTermBase.getIncludes().isEmpty()){\r
+ IStatus status = new Status(IStatus.CANCEL, StoreUtil.getPluginId(), "This term includes other terms. Please delete the included terms before deleting this term."); \r
+ StoreUtil.warningDialog("Term has included terms", termBase, status);\r
+ return status;\r
+ } \r
+ \r
+ DefinedTermBase partOf = definedTermBase.getPartOf();\r
+ if(partOf != null){\r
+ partOf.removeIncludes(definedTermBase);\r
+ }\r
+ \r
+ DefinedTermBase kindOf = definedTermBase.getKindOf();\r
+ if(kindOf != null){\r
+ definedTermBase.removeGeneralization(kindOf);\r
+ }\r
+ \r
+ TermVocabulary vocabulary = definedTermBase.getVocabulary();\r
+ if(vocabulary != null){\r
+ vocabulary.removeTerm(definedTermBase);\r
+ }\r
+ CdmStore.getService(ITermService.class).delete((DefinedTermBase)termBase);\r
+ \r
+ }\r
+ \r
+ return postExecute(termBase);\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+ */\r
+ @Override\r
+ public IStatus redo(IProgressMonitor monitor, IAdaptable info)\r
+ throws ExecutionException {\r
+ // TODO Auto-generated method stub\r
+ return null;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+ */\r
+ @Override\r
+ public IStatus undo(IProgressMonitor monitor, IAdaptable info)\r
+ throws ExecutionException {\r
+ // TODO Auto-generated method stub\r
+ return null;\r
+ }\r
+\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.editor.definedterm.operation;\r
+\r
+import java.util.Collection;\r
+\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.operations.IUndoContext;\r
+import org.eclipse.core.runtime.IAdaptable;\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.core.runtime.IStatus;\r
+import org.eclipse.core.runtime.Status;\r
+\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.cdm.model.description.DescriptionBase;\r
+import eu.etaxonomy.cdm.model.description.DescriptionElementBase;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 10 Jan 2012\r
+ *\r
+ */\r
+public class MoveDefinedTermOperation extends AbstractPostOperation {\r
+ \r
+ private Collection<DefinedTermBase> sourceTerms;// the actual DefinedTermBase(s) we are moving\r
+ private TermBase targetTermOrVocabulary;// the target VOCABULARY or DefinedTerm we are moving these to\r
+\r
+ /**\r
+ * @param label\r
+ * @param undoContext\r
+ * @param postOperationEnabled\r
+ */\r
+ public MoveDefinedTermOperation(String label, IUndoContext undoContext, TermBase target, Collection<DefinedTermBase> sourceTerms,\r
+ IPostOperationEnabled postOperationEnabled) {\r
+ super(label, undoContext, postOperationEnabled);\r
+ \r
+ this.targetTermOrVocabulary = target;\r
+ this.sourceTerms = sourceTerms;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+ */\r
+ @Override\r
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
+ throws ExecutionException {\r
+ \r
+ // need to make the moved DefinedTerm part of another DefinedTerm or Vocabulary (target)\r
+ // and remove it from old associations\r
+ \r
+ //TODO move to ITermService\r
+ \r
+ for (DefinedTermBase term : sourceTerms){\r
+ // do nothing when moving it on itself\r
+ if(targetTermOrVocabulary.equals(term)){\r
+ Status status = new Status(IStatus.CANCEL, StoreUtil.getPluginId(), "Term can not be added to itself");\r
+ StoreUtil.informationDialog("", status);\r
+ return status;\r
+ }\r
+ \r
+ if (targetTermOrVocabulary instanceof TermVocabulary) {\r
+ TermVocabulary termVocabulary = (TermVocabulary)targetTermOrVocabulary;\r
+ \r
+ // do nothing when term is top level and gets added to the same vocabulary\r
+ if(term.getPartOf() == null && termVocabulary.equals(term.getVocabulary())){\r
+ Status status = new Status(IStatus.CANCEL, StoreUtil.getPluginId(), "Term is already in this vocabulary");\r
+ StoreUtil.informationDialog("", status);\r
+ return status;\r
+ }\r
+ \r
+ cleanTerm(term);\r
+ termVocabulary.addTerm(term);\r
+ \r
+ } else if (targetTermOrVocabulary instanceof DefinedTermBase) {\r
+ cleanTerm(term);\r
+ DefinedTermBase targetDefinedTerm = (DefinedTermBase) targetTermOrVocabulary;\r
+ targetDefinedTerm.addIncludes(term);\r
+ targetDefinedTerm.getVocabulary().addTerm(term); \r
+ }\r
+\r
+ }\r
+ //return null;\r
+ return postExecute(targetTermOrVocabulary); \r
+ }\r
+ \r
+ private DefinedTermBase cleanTerm(DefinedTermBase term){\r
+\r
+ DefinedTermBase partOf = term.getPartOf();\r
+ if(partOf != null){\r
+ partOf.removeIncludes(term);\r
+ }\r
+ \r
+ \r
+ TermVocabulary vocabulary = term.getVocabulary();\r
+ if(vocabulary != null){\r
+ vocabulary.removeTerm(term);\r
+ }\r
+ \r
+ return term;\r
+ }\r
+ \r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+ */\r
+ @Override\r
+ public IStatus redo(IProgressMonitor monitor, IAdaptable info)\r
+ throws ExecutionException {\r
+ // TODO Auto-generated method stub\r
+ return null;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+ */\r
+ @Override\r
+ public IStatus undo(IProgressMonitor monitor, IAdaptable info)\r
+ throws ExecutionException {\r
+ // TODO Auto-generated method stub\r
+ return null;\r
+ }\r
+\r
+}\r
*/
private List<Feature> getAvailableFeatures(){
- List<Feature> preferredFeatures = CdmStore.getTermManager().getPreferredFeatures();
+ List<Feature> preferredFeatures = CdmStore.getTermManager().getPreferredTerms(Feature.class);
for(Feature featureAlreadyInTree : featureTree.getDistinctFeatures()){
preferredFeatures.remove(featureAlreadyInTree);
package eu.etaxonomy.taxeditor.handler;
-import org.apache.log4j.Logger;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
import org.eclipse.ui.handlers.HandlerUtil;
-import eu.etaxonomy.taxeditor.ui.dialogs.LoginDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.LoginDialog;
/**
* <p>ShowLoginWindowHandler class.</p>
configurator.setProgressMonitor(CdmProgressMonitorAdapter
.CreateSubMonitor(monitor, 70));
- monitor.worked(10);
+ monitor.worked(5);
CdmDefaultImport<IImportConfigurator> importer = new CdmDefaultImport<IImportConfigurator>();
importer.setCdmAppController(applicationConfiguration);
- monitor.worked(10);
+ monitor.worked(5);
try {
importer.invoke(configurator);
- monitor.worked(60);
+ monitor.worked(80);
} catch (RuntimeException e) {
StoreUtil.errorDialog(
"Error importing data",
+ "Please check error log for details.", e);
}
- monitor.worked(10);
+ monitor.worked(5);
monitor.done();
display.asyncExec(new Runnable() {
package eu.etaxonomy.taxeditor.io.wizard;
import java.io.File;
+import java.net.URI;
+import java.net.URISyntaxException;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IWorkbench;
import eu.etaxonomy.cdm.io.jaxb.JaxbExportConfigurator;
import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
/**
* <p>JaxbExportWizard class.</p>
/** {@inheritDoc} */
@Override
public boolean performFinish() {
+ try {
+ URI urlString = new URI(page.getFolderText() + File.separator + page.getExportFileName());
+ configurator.setDestination(urlString);
+ CdmStore.getExportManager().run(configurator);
+ return true;
+ } catch (URISyntaxException e) {
+ StoreUtil.error(getClass(), "Could not run JAXB export", e);
+ }
- String urlString = page.getFolderText() + File.separator + page.getExportFileName();
+ return false;
- configurator.setDestination(urlString);
-
- CdmStore.getExportManager().run(configurator);
-
- return true;
}
/* (non-Javadoc)
/** {@inheritDoc} */
public String getNameRelationTypeLabel(NameRelationshipType type) {
List<NameRelationshipType> vocab =
- TermStore.getNameRelationshipTypes();
+ TermStore.getTerms(NameRelationshipType.class);
for (NameRelationshipType type1 : vocab) {
if (type1.equals(type)) {
public String getNameRelationTypeInverseLabel(NameRelationshipType type) {
List<NameRelationshipType> vocab =
- TermStore.getNameRelationshipTypes();
+ TermStore.getTerms(NameRelationshipType.class);
for (NameRelationshipType type1 : vocab) {
if (type1.equals(type)) {
import org.eclipse.ui.themes.ITheme;
import org.eclipse.ui.themes.IThemeManager;
+import eu.etaxonomy.cdm.model.common.TermBase;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
});
}
+ public static void informationDialog(final String title,
+ final IStatus status) {
+ informationDialog(title, status.getMessage());
+ }
+
/**
* <p>
* warningDialog
}
});
}
+
+ /**
+ * @param title
+ * @param termBase
+ * @param status
+ */
+ public static void warningDialog(String title, Object source,
+ IStatus status) {
+ warningDialog(title, source, status.getMessage());
+ }
/**
* <p>
}
});
}
+
+ public static void errorDialog(final String title, final Object source,
+ final String message){
+ errorDialog(title, source, message, null);
+ }
/**
* <p>
log(status);
}
+ public static void warn(Class source, IStatus status) {
+ getLog4JLogger(source).warn(status.getMessage(), status.getException());
+ log(status);
+ }
+
public static void warn(Class source, Throwable t) {
IStatus status = new Status(IStatus.WARNING, getPluginId(), t.getMessage(), t);
getLog4JLogger(source).warn(t);
*
* @return a {@link java.lang.String} object.
*/
- protected static String getPluginId() {
+ public static String getPluginId() {
return "eu.taxeditor";
}
.reflow();
}
}
-}
+
+ }
* @created Sep 17, 2010
* @version 1.0
*/
-public class CdmProgressMonitorAdapter implements eu.etaxonomy.cdm.common.IProgressMonitor {
+public class CdmProgressMonitorAdapter implements eu.etaxonomy.cdm.common.monitor.IProgressMonitor {
private IProgressMonitor progressMonitor;
public void warning(String message, Throwable throwable) {
StoreUtil.error(this.getClass(), message, throwable);
}
+
+ @Override
+ public void internalWorked(double arg0) {
+ progressMonitor.internalWorked(arg0);
+ }
}
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2009 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.model;
+
+import java.util.Comparator;
+
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * Implements a {@link Comparator} for {@link DefinedTermBase} objects based on the term's label.
+ * The compare algorithm compares a term's label. Example: If used on an unsorted list of terms, the
+ * list will be alphabetically sorted by label afterwards.
+ *
+ * @author n.hoffmann
+ * @date Jan 18, 2012
+ *
+ */
+public class DefaultTermComparator<T extends DefinedTermBase> implements Comparator<T> {
+ @Override
+ public int compare(T o1, T o2) {
+ String label1 = o1.getLabel(CdmStore.getDefaultLanguage()) != null ? o1.getLabel(CdmStore.getDefaultLanguage()) : o1.getTitleCache();
+ String label2 = o2.getLabel(CdmStore.getDefaultLanguage()) != null ? o2.getLabel(CdmStore.getDefaultLanguage()) : o2.getTitleCache();
+ return label1.compareTo(label2);
+ }
+};
if (text == null || text.length() == 0) {
text = "No label provided";
}
+
return "Description: " + text;
}
--- /dev/null
+/**
+ *
+ */
+package eu.etaxonomy.taxeditor.model;
+
+import org.apache.commons.lang.NotImplementedException;
+
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;
+import eu.etaxonomy.cdm.model.common.Language;
+import eu.etaxonomy.cdm.model.common.Representation;
+import eu.etaxonomy.cdm.model.common.TermVocabulary;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author n.hoffmann
+ * @created Nov 30, 2011
+ * @version 1.0
+ *
+ */
+public class TaxonRelationshipTypeInverseContainer extends DefinedTermBase<DefinedTermBase> {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 7225140304186547675L;
+ private boolean inverse;
+ private TaxonRelationshipType type;
+
+ /**
+ *
+ * @param sourceTaxon
+ * @param relationship
+ * @return
+ */
+ public static TaxonRelationshipTypeInverseContainer CreateFromSource(Taxon sourceTaxon, TaxonRelationship relationship){
+ return new TaxonRelationshipTypeInverseContainer(relationship.getType(), isRelationshipInverse(sourceTaxon, relationship));
+ }
+
+ /**
+ *
+ * @param sourceTaxon
+ * @param relationship
+ * @return
+ */
+ public static Taxon RelatedTaxon(Taxon sourceTaxon, TaxonRelationship relationship){
+ return isRelationshipInverse(sourceTaxon, relationship) ? relationship.getFromTaxon() : relationship.getToTaxon();
+ }
+
+ /**
+ *
+ * @param sourceTaxon
+ * @param relationship
+ * @return
+ */
+ private static boolean isRelationshipInverse(Taxon sourceTaxon, TaxonRelationship relationship){
+ return relationship.getFromTaxon().equals(sourceTaxon) ? false : true;
+ }
+
+ /**
+ *
+ * @param type
+ * @param inverse
+ */
+ public TaxonRelationshipTypeInverseContainer(TaxonRelationshipType type, boolean inverse){
+ this.inverse = inverse;
+ this.setType(type);
+ }
+
+ public boolean isInverse() {
+ return inverse;
+ }
+
+ public Representation getRepresentation(Language language){
+ return inverse ? type.getInverseRepresentation(language) : type.getRepresentation(language);
+ }
+
+ public String getLabel(Language language){
+ return getRepresentation(language).getLabel();
+ }
+
+ public String getDescription(Language language){
+ return getRepresentation(language).getDescription();
+ }
+
+ public String getAbbreviatedLabel(){
+ return getRepresentation(Language.ENGLISH()).getAbbreviatedLabel();
+ }
+
+ public void setInverse(boolean inverse) {
+ this.inverse = inverse;
+ }
+
+ public TaxonRelationshipType getType() {
+ return type;
+ }
+
+ public void setType(TaxonRelationshipType type) {
+ this.type = type;
+ }
+
+ @Override
+ public String getTitleCache() {
+ return String.format("%s (%s)", getLabel(CdmStore.getDefaultLanguage()), getAbbreviatedLabel());
+ }
+
+ @Override
+ public void resetTerms() {
+ throw new NotImplementedException();
+ }
+
+ @Override
+ protected void setDefaultTerms(
+ TermVocabulary<DefinedTermBase> termVocabulary) {
+ throw new NotImplementedException();
+ }
+
+}
return textValue;
}
+
+ public static String deproxyClassName(Class clazz){
+ String name = clazz.getSimpleName();
+ if (name.indexOf("_$$")>-1){
+ return name.substring(0, name.indexOf("_$$"));
+ }else{
+ return name;
+ }
+ }
}
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
/**
* <p>Abstract AbstractNewEntityWizard class.</p>
* @param <T> a T object.
*/
public AbstractNewEntityWizard(){
- setWindowTitle("New Entity");
+ setWindowTitle(String.format("New %s", getEntityName()));
}
+ /**
+ * FIXME there might be a smarter way to do this,
+ *
+ * @return
+ */
+ protected abstract String getEntityName();
+
/* (non-Javadoc)
* @see org.eclipse.jface.wizard.Wizard#performFinish()
*/
import eu.etaxonomy.cdm.ext.ipni.IpniService;
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
/**
* <p>ExternalReferenceServiceWizardPage class.</p>
/**
* <p>Constructor for ExternalReferenceServiceWizardPage.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
* @param entity a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
*/
public void createControl(Composite parent) {
control = formFactory.createComposite(parent);
- control.setLayout(CdmFormFactory.LAYOUT(2, false));
+ control.setLayout(LayoutConstants.LAYOUT(2, false));
text_query = new Text(control, SWT.SINGLE | SWT.BORDER);
- text_query.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+ text_query.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
button_search = new Button(control, SWT.PUSH);
- button_search.setLayoutData(CdmFormFactory.RIGHT());
+ button_search.setLayoutData(LayoutConstants.RIGHT());
button_search.setText("Search");
button_search.addSelectionListener(this);
viewer = new ListViewer(control);
- viewer.getControl().setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2,1));
+ viewer.getControl().setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2,1));
viewer.setContentProvider(new IStructuredContentProvider(){
*/
@Override
public void setEntity(Classification entity) {
- setWindowTitle("Edit Classification");
+ setWindowTitle(String.format("Edit %s", getEntityName()));
entity = CdmStore.getService(IClassificationService.class).load(entity.getUuid());
super.setEntity(entity);
}
protected Classification createNewEntity() {
return Classification.NewInstance(null);
}
+
+ @Override
+ protected String getEntityName() {
+ return "Classification";
+ }
}
protected Collection createNewEntity() {
return Collection.NewInstance();
}
+
+ @Override
+ protected String getEntityName() {
+ return "Collection";
+ }
}
protected void saveEntity() {
CdmStore.getService(IOccurrenceService.class).saveOrUpdate(getEntity());
}
+
+ @Override
+ protected String getEntityName() {
+ return "Specimen";
+ }
+
+
}
protected void saveEntity() {
CdmStore.getService(IOccurrenceService.class).saveOrUpdate(getEntity());
}
+
+ @Override
+ protected String getEntityName() {
+ return "Field Observation";
+ }
}
return Group.NewInstance();
}
+ @Override
+ protected String getEntityName() {
+ return "Group";
+ }
+
}
return Institution.NewInstance();
}
+ @Override
+ protected String getEntityName() {
+ return "Institution";
+ }
+
}
protected void saveEntity() {
CdmStore.getService(INameService.class).saveOrUpdate(getEntity());
}
+
+ @Override
+ protected String getEntityName() {
+ return "Scientific Name";
+ }
}
protected void saveEntity() {
CdmStore.getService(IAgentService.class).saveOrUpdate(getEntity());
}
+
+ @Override
+ protected String getEntityName() {
+ return "Person";
+ }
}
return PolytomousKey.NewInstance();
}
+ @Override
+ protected String getEntityName() {
+ return "Polytomous Key";
+ }
+
}
super.setEntity(entity);
referencePage.getDetailElement().setEntity(entity);
}
+
+ @Override
+ protected String getEntityName() {
+ return "Reference";
+ }
}
public ITreeNode getParentTreeNode(){
return taxonNodePage.getParentTreeNode();
}
+
+ @Override
+ protected String getEntityName() {
+ return "Taxon";
+ }
}
\ No newline at end of file
protected void saveEntity() {
CdmStore.getService(IAgentService.class).saveOrUpdate(getEntity());
}
+
+ @Override
+ protected String getEntityName() {
+ return "Team";
+ }
}
return User.NewInstance(null, null);
}
+ @Override
+ protected String getEntityName() {
+ return "Institution";
+ }
+
}
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.description.PolytomousKey;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyDetailElement;
* might not be what you want.
*/
public boolean postOperation(CdmBase objectAffectedByOperation);
-
+
/**
* This method will get called after the execution took place and occasional
* cleanups were performed. This is typically the last thing to happen.
* @return a boolean.
*/
public boolean onComplete();
+
}
public static final String BULK_EDITOR_OCCURRENCE_SHOW_FIELD_OBSERVATIONS = "eu.etaxonomy.taxeditor.bulkeditor.occurrence.showFieldObservations";
public static final String SEARCH_OPEN_RESULTS_IN_SEPARATE_WINDOWS = "eu.etaxonomy.taxeditor.navigation.search.openResultInSeparateWindows";
+
+ public static final String ADD_TYPES_TO_ALL_NAMES = "eu.etaxonomy.taxeditor.store.addTypeToAllNames";
}
final Combo combo_globalLanguage = new Combo(composite, SWT.NONE);
- List<Language> preferredLanguages = CdmStore.getTermManager().getPreferredLanguages();
+ List<Language> preferredLanguages = CdmStore.getTermManager().getPreferredTerms(Language.class);
for(int i = 0; i < preferredLanguages.size(); i++){
Language language = preferredLanguages.get(i);
*/
public static Map<MarkerType, Boolean> getEditMarkerTypePreferences() {
List<MarkerType> markerTypes = CdmStore.getTermManager()
- .getPreferredMarkerTypes();
+ .getPreferredTerms(MarkerType.class);
Map<MarkerType, Boolean> result = new HashMap<MarkerType, Boolean>();
getFieldEditorParent()));
addField(new BooleanFieldEditor(
IPreferenceKeys.SHOULD_EXPAND_SECTION_WHEN_DATA_AVAILABLE,
- "Should expand sections when data is available (Details View)",
+ "Should expand sections when data is available (Details View). This might make the Editor slow.",
getFieldEditorParent()));
addField(new StringFieldEditor(
IPreferenceKeys.EDIT_MAP_SERVICE_ACCES_POINT,
--- /dev/null
+/// $Id$
+/**
+ * Copyright (C) 2007 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
+package eu.etaxonomy.taxeditor.preference;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+/**
+ * @author n.hoffmann
+ *
+ * @created Oct 12, 2011
+ * @version 1.0
+ */
+public class TypeDesignationPreferences extends FieldEditorPreferencePage
+ implements IWorkbenchPreferencePage {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ @Override
+ public void init(IWorkbench workbench) {
+ setPreferenceStore(PreferencesUtil.getPreferenceStore());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+ */
+ @Override
+ protected void createFieldEditors() {
+ addField(new BooleanFieldEditor(IPreferenceKeys.ADD_TYPES_TO_ALL_NAMES,
+ "Add type designations to all names in a homotypical group.",
+ getFieldEditorParent()));
+ }
+
+}
import java.util.Iterator;
import java.util.List;
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.IParameter;
+import org.eclipse.core.commands.Parameterization;
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.core.commands.common.NotDefinedException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.viewers.CheckStateChangedEvent;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.ICheckStateListener;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.internal.commands.Parameter;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
import eu.etaxonomy.cdm.api.service.ITermService;
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
+import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.preference.wizard.VocabularyTermWizard;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.store.StoreUtil;
+import eu.etaxonomy.taxeditor.store.TermStore;
/**
* <p>Abstract AbstractMenuPreferences class.</p>
setDescription(description);
}
- protected abstract List<T> getTerms();
+ protected List<T> getTerms(){
+ return TermStore.getTerms(getTermClass());
+ }
/**
* {@inheritDoc}
* @param buttonContainer a {@link org.eclipse.swt.widgets.Composite} object.
*/
protected void createEditButtons(Composite buttonContainer) {
- newButton = new Button(buttonContainer, SWT.PUSH);
- newButton.setText("New");
- newButton.setLayoutData(new GridData(SWT.FILL));
-
editButton = new Button(buttonContainer, SWT.PUSH);
- editButton.setText("Edit");
+ editButton.setText("Open Term Editor");
editButton.setLayoutData(new GridData(SWT.FILL));
-
- removeButton = new Button(buttonContainer, SWT.PUSH);
- removeButton.setText("Remove");
- removeButton.setLayoutData(new GridData(SWT.FILL));
-
-
- addNewButtonListeners();
addEditButtonListeners();
- addDeleteButtonListeners();
}
/**
* @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
*/
@Override
- public void widgetSelected(SelectionEvent e) {
- T selection = (T) ((StructuredSelection) tableViewer.getSelection()).getFirstElement();
+ public void widgetSelected(SelectionEvent event) {
- if(selection == null){
- StoreUtil.informationDialog("Nothing selected", "Please select a term to edit.");
- return;
- }
+ ICommandService commandService = (ICommandService) StoreUtil.getService(ICommandService.class);
+
+ Command command = commandService.getCommand(DefinedTermEditor.OPEN_COMMAND_ID);
- VocabularyTermWizard<T> wizard = new VocabularyTermWizard<T>(getTermClass(), selection, getConversationHolder());
+ IParameter parameter;
+ try {
+ parameter = command.getParameter("eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter");
- WizardDialog dialog = new WizardDialog(StoreUtil.getShell(), wizard);
-
- if(dialog.open() == IStatus.OK){
- tableViewer.setInput(getTerms());
- tableViewer.reveal(selection);
- }
- }
- });
- }
-
- /**
- * Implement this method in MenuPreference Pages where the vocabulary should be editable, editable flag
- * is set.
- */
- protected void addDeleteButtonListeners() {
- removeButton.addSelectionListener(new SelectionAdapter(){
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
- @Override
- public void widgetSelected(SelectionEvent e) {
- boolean confirmation = StoreUtil.confirmDialog("Confirm deletion", "Do you really want to delete the selected terms?");
-
- if(confirmation){
- IStructuredSelection selection = (IStructuredSelection) tableViewer.getSelection();
+ Parameterization[] parameterizations = new Parameterization[]{
+ new Parameterization(parameter, getTermClass().getName())
+ };
- Iterator<T> selectionIterator = selection.iterator();
+ ParameterizedCommand pCommand = new ParameterizedCommand(command, parameterizations);
- while(selectionIterator.hasNext()){
- T term = selectionIterator.next();
-
- tableViewer.remove(term);
-
- if(getConversationHolder().getSessionHolder().getSession().contains(term)){
- ITermService service = CdmStore.getService(ITermService.class);
- DefinedTermBase theTerm = service.load(term.getUuid());
-
- service.delete(theTerm);
+ if (command.isEnabled()) {
+ IHandlerService handlerService = (IHandlerService) StoreUtil.getService(IHandlerService.class);
+ try {
+ handlerService.executeCommand(pCommand, null);
+ } catch (NotDefinedException e) {
+ throw new RuntimeException("Could not find open command: "
+ + DefinedTermEditor.OPEN_COMMAND_ID);
+ } catch (Exception e) {
+ StoreUtil
+ .error(getClass(),
+ "An exception occured while trying to open a selection",
+ e);
}
}
-
-// tableViewer.refresh();
+ } catch (NotDefinedException e) {
+ StoreUtil
+ .error(getClass(),
+ "An exception occured while trying to open the Term Editor",
+ e);
}
+
}
});
}
package eu.etaxonomy.taxeditor.preference.menu;
-import java.util.List;
-
import eu.etaxonomy.cdm.model.common.ExtensionType;
-import eu.etaxonomy.taxeditor.store.TermStore;
/**
* <p>ExtensionTypeMenuPreferences class.</p>
public ExtensionTypeMenuPreferences() {
super("Extension Type Preferences" ,
"Choose which extension types to display",
- true);
+ false);
}
/* (non-Javadoc)
protected Class<ExtensionType> getTermClass() {
return ExtensionType.class;
}
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
- */
- @Override
- protected List<ExtensionType> getTerms() {
- return TermStore.getExtensionTypes();
- }
}
*/
package eu.etaxonomy.taxeditor.preference.menu;
-import java.util.List;
-
import eu.etaxonomy.cdm.model.description.Feature;
-import eu.etaxonomy.taxeditor.store.TermStore;
/**
* <p>FeatureMenuPreferences class.</p>
public FeatureMenuPreferences() {
super("Feature Preferences",
"Choose which features you would like to use for descriptive elements.",
- true);
+ false);
}
/* (non-Javadoc)
protected Class<Feature> getTermClass() {
return Feature.class;
}
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
- */
- @Override
- protected List<Feature> getTerms() {
- return TermStore.getFeatures();
- }
}
package eu.etaxonomy.taxeditor.preference.menu;
-import java.util.List;
-
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.swt.widgets.Control;
import eu.etaxonomy.cdm.model.common.Language;
-import eu.etaxonomy.taxeditor.store.TermStore;
/**
* <p>LanguageMenuPreferences class.</p>
protected Class<Language> getTermClass() {
return Language.class;
}
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
- */
- @Override
- protected List<Language> getTerms() {
- return TermStore.getLanguages();
- }
}
package eu.etaxonomy.taxeditor.preference.menu;
-import java.util.List;
-
import eu.etaxonomy.cdm.model.common.MarkerType;
-import eu.etaxonomy.taxeditor.store.TermStore;
/**
* <p>MarkerTypeMenuPreferences class.</p>
protected Class<MarkerType> getTermClass() {
return MarkerType.class;
}
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
- */
- @Override
- protected List<MarkerType> getTerms() {
- return TermStore.getNonTechnicalMarkerTypes();
- }
}
*/
package eu.etaxonomy.taxeditor.preference.menu;
-import java.util.List;
-
import eu.etaxonomy.cdm.model.description.MeasurementUnit;
-import eu.etaxonomy.taxeditor.store.TermStore;
/**
* <p>MeasurementUnitMenuPreferences class.</p>
return MeasurementUnit.class;
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
- */
- @Override
- protected List<MeasurementUnit> getTerms() {
- return TermStore.getMeasurementUnits();
- }
-
}
package eu.etaxonomy.taxeditor.preference.menu;
-import java.util.List;
-
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import eu.etaxonomy.taxeditor.labels.ILabelImageStrategy;
import eu.etaxonomy.taxeditor.labels.LabelImageProvider;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-import eu.etaxonomy.taxeditor.store.TermStore;
/**
* <p>NameRelationshipTypeMenuPreferences class.</p>
protected Class<NameRelationshipType> getTermClass() {
return NameRelationshipType.class;
}
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
- */
- @Override
- protected List<NameRelationshipType> getTerms() {
- return TermStore.getNameRelationshipTypes();
- }
}
package eu.etaxonomy.taxeditor.preference.menu;
-import java.util.List;
-
import eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus;
-import eu.etaxonomy.taxeditor.store.TermStore;
/**
* <p>NameTypeDesignationStatusMenuPreferences class.</p>
return NameTypeDesignationStatus.class;
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
- */
- @Override
- protected List<NameTypeDesignationStatus> getTerms() {
- return TermStore.getNameTypeDesignationStatus();
- }
-
}
package eu.etaxonomy.taxeditor.preference.menu;
-import java.util.List;
-
import eu.etaxonomy.cdm.model.location.NamedAreaType;
-import eu.etaxonomy.taxeditor.store.TermStore;
/**
* <p>NamedAreaTypeMenuPreferences class.</p>
public NamedAreaTypeMenuPreferences() {
super("Named Area Types",
"Edit displayed named area types",
- true);
+ false);
}
/* (non-Javadoc)
protected Class<NamedAreaType> getTermClass() {
return NamedAreaType.class;
}
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
- */
- @Override
- protected List<NamedAreaType> getTerms() {
- return TermStore.getNamedAreaTypes();
- }
}
package eu.etaxonomy.taxeditor.preference.menu;
-import java.util.List;
-
import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
-import eu.etaxonomy.taxeditor.store.TermStore;
/**
* <p>NomenclaturalStatusTypeMenuPreferences class.</p>
protected Class<NomenclaturalStatusType> getTermClass() {
return NomenclaturalStatusType.class;
}
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
- */
- @Override
- protected List<NomenclaturalStatusType> getTerms() {
- return TermStore.getNomenclaturalStatusTypes();
- }
}
package eu.etaxonomy.taxeditor.preference.menu;
-import java.util.List;
-
import org.eclipse.ui.IWorkbenchPreferencePage;
import eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase;
-import eu.etaxonomy.taxeditor.store.TermStore;
/**
* <p>PresenceAbsenceMenuPreferences class.</p>
protected Class<PresenceAbsenceTermBase> getTermClass() {
return PresenceAbsenceTermBase.class;
}
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
- */
- @Override
- protected List<PresenceAbsenceTermBase> getTerms() {
- return TermStore.getPresenceAbsenceTerms();
- }
}
package eu.etaxonomy.taxeditor.preference.menu;
-import java.util.List;
-
import eu.etaxonomy.cdm.model.occurrence.PreservationMethod;
-import eu.etaxonomy.taxeditor.store.TermStore;
/**
* <p>PreservationMethodMenuPreferences class.</p>
protected Class<PreservationMethod> getTermClass() {
return PreservationMethod.class;
}
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
- */
- @Override
- protected List<PreservationMethod> getTerms() {
- return TermStore.getPreservationMethods();
- }
}
*/
package eu.etaxonomy.taxeditor.preference.menu;
-import java.util.List;
-
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import eu.etaxonomy.cdm.model.name.Rank;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-import eu.etaxonomy.taxeditor.store.TermStore;
/**
* Allows the user to choose which <code>Rank</code>s to display in the
@Override
protected void createAdditionalContent(Composite container) {
- // TODO create option to sort ranks either alphabetically or hierarchically (asc- or descending)
-
final Button checkbox = new Button(container, SWT.CHECK);
checkbox.setText("Sort ranks hierarchically (default is alphabetically)");
@Override
public void widgetSelected(SelectionEvent e) {
PreferencesUtil.setSortRanksHierarchichally(checkbox.getSelection());
- refresh(TermStore.getRanks());
+ refresh(getTerms());
}
});
return Rank.class;
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
- */
- @Override
- protected List<Rank> getTerms() {
- return TermStore.getRanks();
- }
-
}
package eu.etaxonomy.taxeditor.preference.menu;
-import java.util.List;
-
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
-import eu.etaxonomy.taxeditor.store.TermStore;
/**
* <p>SpecimenTypeDesignationStatusMenuPreferences class.</p>
return SpecimenTypeDesignationStatus.class;
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
- */
- @Override
- protected List<SpecimenTypeDesignationStatus> getTerms() {
- return TermStore.getSpecimenTypeDesignationStatus();
- }
-
}
package eu.etaxonomy.taxeditor.preference.menu;
-import java.util.List;
-
import eu.etaxonomy.cdm.model.description.Stage;
-import eu.etaxonomy.taxeditor.store.TermStore;
/**
* <p>StageMenuPreferences class.</p>
return Stage.class;
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
- */
- @Override
- protected List<Stage> getTerms() {
- return TermStore.getStages();
- }
}
package eu.etaxonomy.taxeditor.preference.menu;
-import java.util.List;
-
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
-import eu.etaxonomy.taxeditor.store.TermStore;
/**
* <p>TaxonRelationshipTypeMenuPreferences class.</p>
protected Class<TaxonRelationshipType> getTermClass() {
return TaxonRelationshipType.class;
}
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
- */
- @Override
- protected List<TaxonRelationshipType> getTerms() {
- return TermStore.getTaxonRelationshipTypes();
- }
}
public static ConversationHolder createConversation() {
ConversationHolder conversation = getCurrentApplicationConfiguration()
.NewConversation();
-
- conversation.startTransaction();
+ try{
+ conversation.startTransaction();
+ }catch(Exception e){
+ StoreUtil.errorDialog("No database connection", CdmStore.class, "No database connection available", e);
+ }
return conversation;
}
package eu.etaxonomy.taxeditor.store;
import java.sql.SQLException;
+import java.util.concurrent.CancellationException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import eu.etaxonomy.cdm.model.common.CdmMetaData;
import eu.etaxonomy.cdm.model.common.CdmMetaData.MetaDataPropertyName;
import eu.etaxonomy.taxeditor.model.CdmProgressMonitorAdapter;
-import eu.etaxonomy.taxeditor.ui.dialogs.LoginDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.LoginDialog;
import eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart;
/**
if (!monitor.isCanceled()) {
CdmProgressMonitorAdapter subprogressMonitor = CdmProgressMonitorAdapter
- .CreateSubMonitor(monitor, IProgressMonitor.UNKNOWN);
+ .CreateSubMonitor(monitor, 7);
// This is where we instantiate the application controller
try {
applicationController = CdmApplicationController.NewInstance(
applicationContextBean, dataSource, dbSchemaValidation,
false, subprogressMonitor);
} catch (Exception e) {
+ if(! causeIsCancelationExceptionRecursive(e)){
+ return new Status(IStatus.ERROR, "Could not connect to CDM Store", "An error occurred while trying to connect to datasource: " + dataSource.getName(), e);
+ }
+ } finally {
monitor.done();
- return new Status(IStatus.ERROR, "Could not connect to CDM Store", "An error occurred while trying to connect to datasource: " + dataSource.getName(), e);
}
}
-
- monitor.done();
+
+
if (!monitor.isCanceled()) {
CdmStore.setInstance(applicationController, dataSource);
}
}
+ private boolean causeIsCancelationExceptionRecursive(Throwable throwable){
+ if(throwable == null){
+ return false;
+ }else if(throwable instanceof CancellationException){
+ return true;
+ }else{
+ return causeIsCancelationExceptionRecursive(throwable.getCause());
+ }
+ }
+
private void checkDatabaseReachable(IProgressMonitor monitor) {
try {
monitor.subTask("Checking if datasource is reachable.");
import org.eclipse.core.commands.operations.IOperationHistory;
import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import eu.etaxonomy.cdm.model.common.TermBase;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
*
* @return a {@link java.lang.String} object.
*/
- protected static String getPluginId(){
+ public static String getPluginId(){
return TaxeditorStorePlugin.PLUGIN_ID;
}
+
+ /**
+ *
+ * @return
+ */
+ public static IEditorInput getActiveEditorInput() {
+ IEditorPart activeEditor = getActiveEditor();
+ if (activeEditor != null){
+ return activeEditor.getEditorInput();
+ }
+ return null;
+ }
}
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.ui.IMemento;
-import eu.etaxonomy.cdm.model.common.AnnotationType;
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
-import eu.etaxonomy.cdm.model.common.ExtensionType;
-import eu.etaxonomy.cdm.model.common.Language;
-import eu.etaxonomy.cdm.model.common.MarkerType;
import eu.etaxonomy.cdm.model.common.TermBase;
-import eu.etaxonomy.cdm.model.description.Feature;
-import eu.etaxonomy.cdm.model.description.MeasurementUnit;
-import eu.etaxonomy.cdm.model.description.Modifier;
-import eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase;
-import eu.etaxonomy.cdm.model.description.Scope;
-import eu.etaxonomy.cdm.model.description.Stage;
-import eu.etaxonomy.cdm.model.description.State;
-import eu.etaxonomy.cdm.model.description.StatisticalMeasure;
-import eu.etaxonomy.cdm.model.location.NamedAreaType;
-import eu.etaxonomy.cdm.model.media.RightsTerm;
-import eu.etaxonomy.cdm.model.name.NameRelationshipType;
-import eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus;
-import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
-import eu.etaxonomy.cdm.model.name.Rank;
-import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
-import eu.etaxonomy.cdm.model.occurrence.DeterminationModifier;
-import eu.etaxonomy.cdm.model.occurrence.PreservationMethod;
-import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
import eu.etaxonomy.taxeditor.model.ContextListenerAdapter;
/**
CdmStore.getContextManager().addContextListener(this);
}
+ /**
+ *
+ * @param clazz
+ * @return
+ */
+ public <T extends DefinedTermBase> List<T> getPreferredTerms(Class<T> clazz){
+ return getFilteredTerms(TermStore.getTerms(clazz));
+ }
+
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.model.ContextListenerAdapter#contextStart(org.eclipse.ui.IMemento, org.eclipse.core.runtime.IProgressMonitor)
*/
return initialTerms.iterator().next().getClass().getName();
}
- /**
- * <p>getPreferredSpecimenTypeDesignationStatus</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<SpecimenTypeDesignationStatus> getPreferredSpecimenTypeDesignationStatus() { return getFilteredTerms(TermStore.getSpecimenTypeDesignationStatus());}
-
- /**
- * <p>getPreferredNameTypeDesignationStatus</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<NameTypeDesignationStatus> getPreferredNameTypeDesignationStatus() { return getFilteredTerms(TermStore.getNameTypeDesignationStatus()); }
-
- /**
- * <p>getPreferredTaxonRelationshipTypes</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<TaxonRelationshipType> getPreferredTaxonRelationshipTypes() { return getFilteredTerms(TermStore.getTaxonRelationshipTypes());}
-
- /**
- * <p>getPreferredFeatures</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<Feature> getPreferredFeatures() { return getFilteredTerms(TermStore.getFeatures());}
-
- /**
- * <p>getPreferredRanks</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<Rank> getPreferredRanks() { return getFilteredTerms(TermStore.getRanks());}
-
- /**
- * <p>getPreferredPresenceAbsenceTerms</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<PresenceAbsenceTermBase> getPreferredPresenceAbsenceTerms(){ return getFilteredTerms(TermStore.getPresenceAbsenceTerms());}
-
- /**
- * <p>getPreferredNomenclaturalStatusTypes</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<NomenclaturalStatusType> getPreferredNomenclaturalStatusTypes(){ return getFilteredTerms(TermStore.getNomenclaturalStatusTypes());}
-
- /**
- * <p>getPreferredNameRelationshipTypes</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<NameRelationshipType> getPreferredNameRelationshipTypes(){ return getFilteredTerms(TermStore.getNameRelationshipTypes());}
-
- /**
- * <p>getPreferredLanguages</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<Language> getPreferredLanguages() { return getFilteredTerms(TermStore.getLanguages()); }
-
- /**
- * <p>getPreferredMarkerTypes</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<MarkerType> getPreferredMarkerTypes() { return getFilteredTerms(TermStore.getNonTechnicalMarkerTypes()); }
-
- /**
- * <p>getPreferredExtensionTypes</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<ExtensionType> getPreferredExtensionTypes() { return getFilteredTerms(TermStore.getExtensionTypes()); }
-
- /**
- * <p>getPreferredRightsTypes</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<RightsTerm> getPreferredRightsTypes() { return getFilteredTerms(TermStore.getRightsTypes());}
-
- /**
- * <p>getPreferredNamedAreaTypes</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<NamedAreaType> getPreferredNamedAreaTypes() { return getFilteredTerms(TermStore.getNamedAreaTypes()); }
+// /**
+// * <p>getPreferredSpecimenTypeDesignationStatus</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<SpecimenTypeDesignationStatus> getPreferredSpecimenTypeDesignationStatus() { return getFilteredTerms(TermStore.getSpecimenTypeDesignationStatus());}
+//
+// /**
+// * <p>getPreferredNameTypeDesignationStatus</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<NameTypeDesignationStatus> getPreferredNameTypeDesignationStatus() { return getFilteredTerms(TermStore.getNameTypeDesignationStatus()); }
+//
+// /**
+// * <p>getPreferredTaxonRelationshipTypes</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<TaxonRelationshipType> getPreferredTaxonRelationshipTypes() { return getFilteredTerms(TermStore.getTaxonRelationshipTypes());}
+//
+// private static List<TaxonRelationshipType> excludeTaxonRelationshipTypes = Arrays.asList(new TaxonRelationshipType[]{
+// TaxonRelationshipType.TAXONOMICALLY_INCLUDED_IN(),
+// TaxonRelationshipType.MISAPPLIED_NAME_FOR(),
+// TaxonRelationshipType.ALL_RELATIONSHIPS()
+// });
+//
+// /**
+// * Please note that the {@link TaxonRelationshipType}s TAXONOMICALLY_INCLUDED_IN, MISAPPLIED_NAME_FOR and ALL_RELATIONSHIPS
+// * are filtered out as they are most likely not needed. If you do need them please refactor this method to your needs.
+// *
+// * @return a list of {@link TaxonRelationshipTypeInverseContainer} elements
+// */
+// public List<TaxonRelationshipTypeInverseContainer> getPreferredRelationshipTypesWithInverses(){
+// List<TaxonRelationshipTypeInverseContainer> relationshipTypeInverseContainers = new ArrayList<TaxonRelationshipTypeInverseContainer>();
+//
+// List<TaxonRelationshipType> relationshipTypes = getPreferredTaxonRelationshipTypes();
+//
+// relationshipTypes.removeAll(excludeTaxonRelationshipTypes);
+//
+// for (TaxonRelationshipType relationshipType : relationshipTypes){
+// if(!relationshipType.isSymmetric()){
+// TaxonRelationshipTypeInverseContainer inverseContainer = new TaxonRelationshipTypeInverseContainer(relationshipType, true);
+// relationshipTypeInverseContainers.add(inverseContainer);
+// }
+// TaxonRelationshipTypeInverseContainer container = new TaxonRelationshipTypeInverseContainer(relationshipType, false);
+// relationshipTypeInverseContainers.add(container);
+// }
+//
+// return relationshipTypeInverseContainers;
+// }
- /**
- * <p>getPreferredAnnotationTypes</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<AnnotationType> getPreferredAnnotationTypes() { return getFilteredTerms(TermStore.getAnnotationTypes()); }
- /**
- * <p>getPreferredStages</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<Stage> getPreferredStages() { return getFilteredTerms(TermStore.getStages()); }
- /**
- * <p>getPreferredPreservationMethods</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<PreservationMethod> getPreferredPreservationMethods() { return getFilteredTerms(TermStore.getPreservationMethods()); }
-
- /**
- * <p>getPreferredMeasurementUnits</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<MeasurementUnit> getPreferredMeasurementUnits() { return getFilteredTerms(TermStore.getMeasurementUnits()); }
-
- /**
- * <p>getPreferredStates</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<State> getPreferredStates() { return getFilteredTerms(TermStore.getStates()); }
-
- /**
- * <p>getPreferredModifiers</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<Modifier> getPreferredModifiers() { return getFilteredTerms(TermStore.getModifiers()); }
-
- /**
- * <p>getPreferredStatisticalMeasures</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<StatisticalMeasure> getPreferredStatisticalMeasures() { return getFilteredTerms(TermStore.getStatisticalMeasures()); }
-
- /**
- * <p>getPreferredScopes</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<Scope> getPreferredScopes() { return getFilteredTerms(TermStore.getScopes()); }
-
- /**
- * <p>getPreferredDeterminationModifiers</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<DeterminationModifier> getPreferredDeterminationModifiers() { return getFilteredTerms(TermStore.getDeterminationModifiers()); }
+//
+// /**
+// * <p>getPreferredFeatures</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<Feature> getPreferredFeatures() { return getFilteredTerms(TermStore.getFeatures());}
+//
+// /**
+// * <p>getPreferredRanks</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<Rank> getPreferredRanks() { return getFilteredTerms(TermStore.getRanks());}
+//
+// /**
+// * <p>getPreferredPresenceAbsenceTerms</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<PresenceAbsenceTermBase> getPreferredPresenceAbsenceTerms(){ return getFilteredTerms(TermStore.getPresenceAbsenceTerms());}
+//
+// /**
+// * <p>getPreferredNomenclaturalStatusTypes</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<NomenclaturalStatusType> getPreferredNomenclaturalStatusTypes(){ return getFilteredTerms(TermStore.getNomenclaturalStatusTypes());}
+//
+// /**
+// * <p>getPreferredNameRelationshipTypes</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<NameRelationshipType> getPreferredNameRelationshipTypes(){ return getFilteredTerms(TermStore.getNameRelationshipTypes());}
+//
+// /**
+// * <p>getPreferredLanguages</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<Language> getPreferredLanguages() { return getFilteredTerms(TermStore.getLanguages()); }
+//
+// /**
+// * <p>getPreferredMarkerTypes</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<MarkerType> getPreferredMarkerTypes() { return getFilteredTerms(TermStore.getNonTechnicalMarkerTypes()); }
+//
+// /**
+// * <p>getPreferredExtensionTypes</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<ExtensionType> getPreferredExtensionTypes() { return getFilteredTerms(TermStore.getExtensionTypes()); }
+//
+// /**
+// * <p>getPreferredRightsTypes</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<RightsTerm> getPreferredRightsTypes() { return getFilteredTerms(TermStore.getRightsTypes());}
+//
+// /**
+// * <p>getPreferredNamedAreaTypes</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<NamedAreaType> getPreferredNamedAreaTypes() { return getFilteredTerms(TermStore.getNamedAreaTypes()); }
+//
+// /**
+// * <p>getPreferredNamedAreaTypes</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<NamedAreaLevel> getPreferredNamedAreaLevels() { return getFilteredTerms(TermStore.getNamedAreaLevels()); }
+//
+// /**
+// * <p>getPreferredAnnotationTypes</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<AnnotationType> getPreferredAnnotationTypes() { return getFilteredTerms(TermStore.getAnnotationTypes()); }
+//
+// /**
+// * <p>getPreferredStages</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<Stage> getPreferredStages() { return getFilteredTerms(TermStore.getStages()); }
+//
+// /**
+// * <p>getPreferredPreservationMethods</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<PreservationMethod> getPreferredPreservationMethods() { return getFilteredTerms(TermStore.getPreservationMethods()); }
+//
+// /**
+// * <p>getPreferredMeasurementUnits</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<MeasurementUnit> getPreferredMeasurementUnits() { return getFilteredTerms(TermStore.getMeasurementUnits()); }
+//
+// /**
+// * <p>getPreferredStates</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<State> getPreferredStates() { return getFilteredTerms(TermStore.getStates()); }
+//
+// /**
+// * <p>getPreferredModifiers</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<Modifier> getPreferredModifiers() { return getFilteredTerms(TermStore.getModifiers()); }
+//
+// /**
+// * <p>getPreferredStatisticalMeasures</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<StatisticalMeasure> getPreferredStatisticalMeasures() { return getFilteredTerms(TermStore.getStatisticalMeasures()); }
+//
+// /**
+// * <p>getPreferredScopes</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<Scope> getPreferredScopes() { return getFilteredTerms(TermStore.getScopes()); }
+//
+// /**
+// * <p>getPreferredDeterminationModifiers</p>
+// *
+// * @return a {@link java.util.List} object.
+// */
+// public List<DeterminationModifier> getPreferredDeterminationModifiers() { return getFilteredTerms(TermStore.getDeterminationModifiers()); }
+//
/**
* Generic method to set term preferences
*
hiddenTermsMap.put(typeName, undesiredTermUuids);
}
-
- /**
- * <p>addTermToPreferredTerms</p>
- *
- * @param term a T object.
- * @param <T> a T object.
- */
- public <T extends TermBase> void addTermToPreferredTerms(T term){
-
-// VocabularyEnum vocabulary = VocabularyEnum.getVocabularyEnum(term.getClass());
-//
-// getPreferenceStore().setValue(getPreferenceKey(term), VocabularyStore.getTermVocabulary(vocabulary).getTerms().contains(term));
-//
-// firePreferencesChanged(term.getClass());
- }
}
package eu.etaxonomy.taxeditor.store;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import eu.etaxonomy.cdm.api.service.ITermService;
-import eu.etaxonomy.cdm.api.service.IVocabularyService;
-import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
-import eu.etaxonomy.cdm.model.common.AnnotationType;
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
-import eu.etaxonomy.cdm.model.common.ExtensionType;
-import eu.etaxonomy.cdm.model.common.Language;
import eu.etaxonomy.cdm.model.common.MarkerType;
-import eu.etaxonomy.cdm.model.common.OrderedTermBase;
-import eu.etaxonomy.cdm.model.common.OrderedTermVocabulary;
-import eu.etaxonomy.cdm.model.common.TermVocabulary;
-import eu.etaxonomy.cdm.model.common.VocabularyEnum;
import eu.etaxonomy.cdm.model.description.AbsenceTerm;
import eu.etaxonomy.cdm.model.description.Feature;
-import eu.etaxonomy.cdm.model.description.MeasurementUnit;
-import eu.etaxonomy.cdm.model.description.Modifier;
import eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase;
import eu.etaxonomy.cdm.model.description.PresenceTerm;
-import eu.etaxonomy.cdm.model.description.Scope;
-import eu.etaxonomy.cdm.model.description.Stage;
-import eu.etaxonomy.cdm.model.description.State;
-import eu.etaxonomy.cdm.model.description.StatisticalMeasure;
-import eu.etaxonomy.cdm.model.location.NamedAreaType;
-import eu.etaxonomy.cdm.model.location.ReferenceSystem;
-import eu.etaxonomy.cdm.model.media.RightsTerm;
-import eu.etaxonomy.cdm.model.name.NameRelationshipType;
-import eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus;
-import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
import eu.etaxonomy.cdm.model.name.Rank;
-import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
-import eu.etaxonomy.cdm.model.occurrence.DeterminationModifier;
-import eu.etaxonomy.cdm.model.occurrence.PreservationMethod;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
+import eu.etaxonomy.taxeditor.model.DefaultTermComparator;
+import eu.etaxonomy.taxeditor.model.TaxonRelationshipTypeInverseContainer;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
/**
public class TermStore {
/**
- * <p>getSpecimenTypeDesignationStatus</p>
- *
- * @return a {@link java.util.List} object.
+ * Returns an alphabetically sorted list of terms (anything that extends {@link DefinedTermBase}) of the given type currently available in the system.
+ *
+ * @param clazz a class that inherits from {@link DefinedTermBase}
+ * @return an alphabetically sorted list of terms
*/
- public static List<SpecimenTypeDesignationStatus> getSpecimenTypeDesignationStatus() {
- return getTerms(SpecimenTypeDesignationStatus.class);
+ public static <TERM extends DefinedTermBase> List<TERM> getTerms(Class<TERM> clazz){
+ return getTerms(clazz, null, true);
}
-
/**
- * <p>getNameTypeDesignationStatus</p>
- *
- * @return a {@link java.util.List} object.
+ * Returns a list of terms of the given type currently available in the system.
+ * If <code>filtered</code> is set to <code>true</code>, all terms for certain types will be
+ * gathered from edge cases.
+ *
+ * @param clazz a class that inherits from {@link DefinedTermBase}
+ * @param comparator a {@link Comparator} that defines the sorting algorithm. If set to null, {@link DefaultTermComparator} will be used
+ * @param filtered if set to true, some terms are filtered from the result (according to definition in {@link ITermStoreEdgeCase}s)
+ * @return a sorted list of terms
*/
- public static List<NameTypeDesignationStatus> getNameTypeDesignationStatus() {
- return getTerms(NameTypeDesignationStatus.class);
+ public static <TERM extends DefinedTermBase> List<TERM> getTerms(Class<TERM> clazz, Comparator<TERM> comparator, boolean filtered){
+ List<TERM> terms = new ArrayList<TERM>();
+
+ ITermStoreEdgeCase<TERM> edgeCase = getEdgeCase(clazz);
+ if(filtered && edgeCase != null){
+ terms = edgeCase.getTerms();
+ }else{
+ terms = getTermsFromService(clazz, comparator);
+ }
+
+ return terms;
+
}
/**
- * <p>getNamedAreaTypes</p>
- *
- * @return a {@link java.util.List} object.
+ *
+ * @param termClass
+ * @param comparator
+ * @return
*/
- public static List<NamedAreaType> getNamedAreaTypes(){
- return getTerms(NamedAreaType.class);
+ private static <T extends DefinedTermBase> List<T> getTermsFromService(Class<T> termClass, Comparator<T> comparator){
+ if (comparator == null){
+ comparator = new DefaultTermComparator<T>();
+ }
+
+ List<T> terms = CdmStore.getService(ITermService.class).listByTermClass(termClass, null, null, null, null);
+ Collections.sort(terms, comparator);
+ return terms;
}
/**
- * <p>getAnnotationTypes</p>
- *
- * @return a {@link java.util.List} object.
+ * @param term a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase} object.
*/
- public static List<AnnotationType> getAnnotationTypes(){
- return getTerms(AnnotationType.class);
+ public static void saveTerm(DefinedTermBase term){
+ CdmStore.getService(ITermService.class).saveOrUpdate(term);
}
/**
- * <p>getTaxonRelationshipTypes</p>
+ * <p>delete</p>
*
- * @return a {@link java.util.List} object.
+ * @param selected a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase} object.
*/
- public static List<TaxonRelationshipType> getTaxonRelationshipTypes(){
- return getTerms(TaxonRelationshipType.class);
+ public static void delete(DefinedTermBase selected) {
+ CdmStore.getService(ITermService.class).delete(selected);
}
-
/**
- * <p>getLanguages</p>
+ * Save a vacabulary to data store
*
- * @return a {@link java.util.List} object.
+ * @param term a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase} object.
*/
- public static List<Language> getLanguages(){
- return getTerms(Language.class);
+ public static void updateVocabulary(DefinedTermBase term) {
+ CdmStore.getService(ITermService.class).saveOrUpdate(term);
}
-
- /**
- * <p>getFeatures</p>
- *
- * @return a {@link java.util.List} object.
- */
- public static List<Feature> getFeatures() {
- List<Feature> features = getTerms(Feature.class);
- features.remove(Feature.IMAGE());
- return features;
- }
-
/**
- * <p>getNameRelationshipTypes</p>
- *
- * @return a {@link java.util.List} object.
+ * Handingling of special cases
*/
- public static List<NameRelationshipType> getNameRelationshipTypes() {
- return getTerms(NameRelationshipType.class);
- }
- /**
- * <p>getNomenclaturalStatusTypes</p>
- *
- * @return a {@link java.util.List} object.
- */
- public static List<NomenclaturalStatusType> getNomenclaturalStatusTypes(){
- return getTerms(NomenclaturalStatusType.class);
- }
+ private static Set<ITermStoreEdgeCase<? extends DefinedTermBase>> termStoreEdgeCases = new HashSet<ITermStoreEdgeCase<? extends DefinedTermBase>>();
+ static {
+ termStoreEdgeCases.add(new ITermStoreEdgeCase<Feature>() {
- /**
- * <p>getNonTechnicalMarkerTypes</p>
- *
- * @return a {@link java.util.List} object.
- */
- public static List<MarkerType> getNonTechnicalMarkerTypes() {
- List<MarkerType> nonTechnicalMarkerTypes = new ArrayList<MarkerType>();
- List<MarkerType> markerTypes = getTerms(MarkerType.class);
-
- for (Object type : markerTypes) {
- if (((MarkerType) type).isTechnical() == false) {
- nonTechnicalMarkerTypes.add((MarkerType) type);
+ @Override
+ public Class<Feature> getTermClass() {
+ return Feature.class;
}
- }
-
- return nonTechnicalMarkerTypes;
- }
-
- /**
- * <p>getExtensionTypes</p>
- *
- * @return a {@link java.util.List} object.
- */
- public static List<ExtensionType> getExtensionTypes() {
- return getTerms(ExtensionType.class);
- }
-
- /**
- * <p>getRightsTypes</p>
- *
- * @return a {@link java.util.List} object.
- */
- public static List<RightsTerm> getRightsTypes() {
- return getTerms(RightsTerm.class);
- }
-
-
- /**
- * Retrieve all ranks from data store.
- *
- * @return a {@link java.util.List} object.
- */
- public static List<Rank> getRanks(){
- if(PreferencesUtil.getSortRanksHierarchichally()){
- return getTerms(Rank.class, new Comparator<Rank>(){
-
- @Override
- public int compare(Rank o1, Rank o2) {
- return o1.compareTo(o2);
+ @Override
+ public List<Feature> getTerms() {
+ List<Feature> features = TermStore.getTermsFromService(Feature.class, null);
+ features.remove(Feature.IMAGE());
+ return features;
+ }
+ });
+ termStoreEdgeCases.add(new ITermStoreEdgeCase<MarkerType>(){
+
+ @Override
+ public Class<MarkerType> getTermClass() {
+ return MarkerType.class;
+ }
+
+ @Override
+ public List<MarkerType> getTerms() {
+ // filter out non technical markers
+ List<MarkerType> nonTechnicalMarkerTypes = new ArrayList<MarkerType>();
+ List<MarkerType> markerTypes = TermStore.getTermsFromService(MarkerType.class, null);
+
+ for (Object type : markerTypes) {
+ if (((MarkerType) type).isTechnical() == false) {
+ nonTechnicalMarkerTypes.add((MarkerType) type);
+ }
}
- });
- }else{
- return getTerms(Rank.class);
- }
- }
-
-
- /**
- * Retrieve all presence and absence terms from data store.
- *
- * @return a {@link java.util.List} object.
- */
- public static List<PresenceAbsenceTermBase> getPresenceAbsenceTerms() {
- List presenceAbsenceTerms = getTerms(PresenceTerm.class);
- presenceAbsenceTerms.addAll(getTerms(AbsenceTerm.class));
+ return nonTechnicalMarkerTypes;
+ }
+
+ });
+ termStoreEdgeCases.add(new ITermStoreEdgeCase<Rank>() {
- return presenceAbsenceTerms;
- }
+ @Override
+ public Class<Rank> getTermClass() {
+ return Rank.class;
+ }
- /**
- * Retrieve all stages from data store.
- *
- * @return a {@link java.util.List} object.
- */
- public static List<Stage> getStages(){
- return getTerms(Stage.class);
- }
-
- /**
- * Retrieve all states from data store.
- *
- * @return a {@link java.util.List} object.
- */
- public static List<State> getStates() {
- return getTerms(State.class);
- }
-
- /**
- * Retrieve all preservation methods from data store.
- *
- * @return a {@link java.util.List} object.
- */
- public static List<PreservationMethod> getPreservationMethods(){
- return getTerms(PreservationMethod.class);
- }
-
-
+ @Override
+ public List<Rank> getTerms() {
+ if(PreferencesUtil.getSortRanksHierarchichally()){
+ return TermStore.getTermsFromService(Rank.class, new Comparator<Rank>(){
+
+ @Override
+ public int compare(Rank o1, Rank o2) {
+ return o1.compareTo(o2);
+ }
+
+ });
+ }else{
+ return TermStore.getTermsFromService(Rank.class, null);
+ }
+ }
+
+ });
+ termStoreEdgeCases.add(new ITermStoreEdgeCase<PresenceAbsenceTermBase>() {
- /**
- * <p>getMeasurementUnits</p>
- *
- * @return a {@link java.util.List} object.
- */
- public static List<MeasurementUnit> getMeasurementUnits() {
- return getTerms(MeasurementUnit.class);
- }
-
+ @Override
+ public Class<PresenceAbsenceTermBase> getTermClass() {
+ return PresenceAbsenceTermBase.class;
+ }
- /**
- * <p>getModifiers</p>
- *
- * @return a {@link java.util.List} object.
- */
- public static List<Modifier> getModifiers() {
- return getTerms(Modifier.class);
- }
+ @Override
+ public List<PresenceAbsenceTermBase> getTerms() {
+ List presenceAbsenceTerms = TermStore.getTermsFromService(PresenceTerm.class, null);
+ presenceAbsenceTerms.addAll(TermStore.getTermsFromService(AbsenceTerm.class, null));
+ return presenceAbsenceTerms;
+ }
+ });
+ termStoreEdgeCases.add(new ITermStoreEdgeCase<TaxonRelationshipTypeInverseContainer>() {
- /**
- * <p>getStatisticalMeasures</p>
- *
- * @return a {@link java.util.List} object.
- */
- public static List<StatisticalMeasure> getStatisticalMeasures() {
- return getTerms(StatisticalMeasure.class);
- }
-
- /**
- * <p>getScopes</p>
- *
- * @return a {@link java.util.List} object.
- */
- public static List<Scope> getScopes() {
- return getTerms(Scope.class);
- }
-
- /**
- * <p>getDeterminationModifiers</p>
- *
- * @return a {@link java.util.List} object.
- */
- public static List<DeterminationModifier> getDeterminationModifiers() {
- return getTerms(DeterminationModifier.class);
- }
-
- /**
- * <p>getReferenceSystems</p>
- *
- * @return a {@link java.util.List} object.
- */
- public static List<ReferenceSystem> getReferenceSystems() {
- return getTerms(ReferenceSystem.class);
- }
-
- /**
- ************* save methods *****************************
- *
- * @param term a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase} object.
- */
- public static void saveTerm(DefinedTermBase term){
- getTermService().saveOrUpdate(term);
- }
-
- /**
- * <p>delete</p>
- *
- * @param selected a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase} object.
- */
- public static void delete(DefinedTermBase selected) {
- getTermService().delete(selected);
- }
-
- /**
- * Save a vacabulary to data store
- *
- * @param term a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase} object.
- */
- public static void updateVocabulary(DefinedTermBase term) {
- getTermService().saveOrUpdate(term);
- }
-
-
-
- /*************** internal methods **************************/
-
- private static Language getDefaultLanguage(){
- return CdmStore.getDefaultLanguage();
- }
-
- private static OrderedTermVocabulary<? extends OrderedTermBase> getOrderedTermVocabulary(VocabularyEnum vocabularyType){
- TermVocabulary<DefinedTermBase> vocabulary = getTermVocabulary(vocabularyType);
- return HibernateProxyHelper.deproxy(vocabulary, OrderedTermVocabulary.class);
+ @Override
+ public Class<TaxonRelationshipTypeInverseContainer> getTermClass() {
+ return TaxonRelationshipTypeInverseContainer.class;
+ }
+
+ @Override
+ public List<TaxonRelationshipTypeInverseContainer> getTerms() {
+ List<TaxonRelationshipType> excludeTaxonRelationshipTypes = Arrays.asList(new TaxonRelationshipType[]{
+ TaxonRelationshipType.TAXONOMICALLY_INCLUDED_IN(),
+ TaxonRelationshipType.MISAPPLIED_NAME_FOR(),
+ TaxonRelationshipType.ALL_RELATIONSHIPS()
+ });
+
+ List<TaxonRelationshipTypeInverseContainer> relationshipTypeInverseContainers = new ArrayList<TaxonRelationshipTypeInverseContainer>();
+
+ List<TaxonRelationshipType> relationshipTypes = TermStore.getTerms(TaxonRelationshipType.class);
+
+ relationshipTypes.removeAll(excludeTaxonRelationshipTypes);
+
+ for (TaxonRelationshipType relationshipType : relationshipTypes){
+ if(!relationshipType.isSymmetric()){
+ TaxonRelationshipTypeInverseContainer inverseContainer = new TaxonRelationshipTypeInverseContainer(relationshipType, true);
+ relationshipTypeInverseContainers.add(inverseContainer);
+ }
+ TaxonRelationshipTypeInverseContainer container = new TaxonRelationshipTypeInverseContainer(relationshipType, false);
+ relationshipTypeInverseContainers.add(container);
+ }
+
+ return relationshipTypeInverseContainers;
+ }
+ });
}
- /**
- * <p>getTermVocabulary</p>
- *
- * @param vocabularyType a {@link eu.etaxonomy.cdm.model.common.VocabularyEnum} object.
- * @return a {@link eu.etaxonomy.cdm.model.common.TermVocabulary} object.
- */
- public static TermVocabulary<DefinedTermBase> getTermVocabulary(VocabularyEnum vocabularyType){
+ private static <T extends DefinedTermBase> ITermStoreEdgeCase<T> getEdgeCase(Class<T> termClass) {
- return CdmStore.getService(IVocabularyService.class).getVocabulary(vocabularyType);
- }
-
- private static <TERM extends DefinedTermBase> List<TERM> getTerms(Class<TERM> clazz){
- Comparator<TERM> comparator = new Comparator<TERM>() {
- @Override
- public int compare(TERM o1, TERM o2) {
- String label1 = o1.getLabel(getDefaultLanguage()) != null ? o1.getLabel(getDefaultLanguage()) : o1.getTitleCache();
- String label2 = o2.getLabel(getDefaultLanguage()) != null ? o2.getLabel(getDefaultLanguage()) : o2.getTitleCache();
- return label1.compareTo(label2);
+ for (ITermStoreEdgeCase termStoreEdgeCase : termStoreEdgeCases){
+ if (termStoreEdgeCase.getTermClass().equals(termClass)){
+ return termStoreEdgeCase;
}
- };
+ }
- return getTerms(clazz, comparator);
+ return null;
}
-
- private static <TERM extends DefinedTermBase> List<TERM> getTerms(Class<TERM> clazz, Comparator<TERM> comparator){
+ private interface ITermStoreEdgeCase<TERM> {
+ public abstract Class<TERM> getTermClass();
- List<TERM> terms = new ArrayList<TERM>();
- if(getTermService() != null){
- terms = getTermService().listByTermClass(clazz, null, null, null, null);
+ public abstract List<TERM> getTerms();
- Collections.sort(terms, comparator);
- }
-
- return terms;
-
- }
-
- private static ITermService getTermService(){
- return CdmStore.getService(ITermService.class);
}
}
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.term;
+package eu.etaxonomy.taxeditor.ui.combo;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Label;
+import eu.etaxonomy.cdm.model.common.IDefinedTerm;
+import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
+import eu.etaxonomy.cdm.model.reference.ReferenceType;
import eu.etaxonomy.taxeditor.preference.Resources;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEnableableFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectable;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement;
+import eu.etaxonomy.taxeditor.ui.element.ISelectable;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
/**
* <p>
* @created Mar 16, 2010
* @version 1.0
*/
-public abstract class AbstractEnumComboElement<T extends Enum> extends
+public class EnumComboElement<T extends IDefinedTerm> extends
AbstractCdmFormElement implements SelectionListener,
IEnableableFormElement, ISelectable {
- private static final int VISIBLE_ITEMS = 10;
+ private static CdmEnumDataHolder[] cdmEnumDataHolders = {
+ new CdmEnumDataHolder<NomenclaturalCode>(){
+
+ @Override
+ public String getName() {
+ return "Nomenclatural Code";
+ }
+
+ @Override
+ public Collection<NomenclaturalCode> getElements() {
+ return Arrays.asList(NomenclaturalCode.values());
+ }
+
+ @Override
+ public Class<NomenclaturalCode> getClazz() {
+ return NomenclaturalCode.class;
+ }
+
+ },
+ new CdmEnumDataHolder<ReferenceType>(){
+
+ @Override
+ public String getName() {
+ return "Reference Type";
+ }
+
+ @Override
+ public Collection<ReferenceType> getElements() {
+ return Arrays.asList(ReferenceType.values());
+ }
+
+ @Override
+ public Class<ReferenceType> getClazz() {
+ return ReferenceType.class;
+ }
+
+ }
+ };
+
+ private static final int DEFAULT_VISIBLE_ITEMS = 10;
protected T selection;
private Label label;
protected Combo combo;
+ private Class<T> enumType;
+
/**
* <p>
* Constructor for AbstractEnumComboElement.
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param labelString
* a {@link java.lang.String} object.
* @param <T>
* a T object.
*/
- public AbstractEnumComboElement(CdmFormFactory formFactory,
- ICdmFormElement parentElement, String labelString) {
+ public EnumComboElement(CdmFormFactory formFactory,
+ ICdmFormElement parentElement, Class<T> enumType, int style) {
super(formFactory, parentElement);
- label = formFactory.createLabel(getLayoutComposite(), labelString);
+ this.enumType = enumType;
+ label = formFactory.createLabel(getLayoutComposite(), getDefaultLabelString());
addControl(label);
// create combo
combo = new Combo(getLayoutComposite(), SWT.BORDER | SWT.READ_ONLY);
addControl(combo);
- combo.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
- combo.setVisibleItemCount(VISIBLE_ITEMS);
+ combo.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
+ setVisibleItemCount(DEFAULT_VISIBLE_ITEMS);
populateTypes();
combo.addSelectionListener(this);
}
+ private String getDefaultLabelString() {
+ if(enumType.equals(ReferenceType.class)){
+ return "Reference Type";
+ }else if (enumType.equals(NomenclaturalCode.class)){
+ return "Nomenclatural Code";
+ }
+ return "No Label";
+ }
+
/**
* <p>
* populateTypes
* </p>
*/
- protected abstract void populateTypes();
+ private void populateTypes(){
+ for(T enumElement : getElementsForClass(enumType)){
+ elementTypeList.add(enumElement);
+ combo.add(((Enum) enumElement).name());
+ }
+ }
/**
* <p>
/** {@inheritDoc} */
public void widgetDefaultSelected(SelectionEvent e) {
}
+
+ public void setVisibleItemCount(int visibleItems){
+ combo.setVisibleItemCount(visibleItems);
+ }
+
+ private Collection<T> getElementsForClass(Class<T> clazz){
+ CdmEnumDataHolder<T> dataHolder = getCdmEnumDataHolderForClass(clazz);
+ if (dataHolder != null) {
+ return dataHolder.getElements();
+ }
+ return null;
+ }
+
+ private CdmEnumDataHolder<T> getCdmEnumDataHolderForClass(Class<T> clazz){
+ for (CdmEnumDataHolder dataHolder : cdmEnumDataHolders) {
+ if (dataHolder.getClazz().equals(clazz)){
+ return dataHolder;
+ }
+ }
+ return null;
+ }
+
+ private interface CdmEnumDataHolder<T> {
+ Class<T> getClazz();
+ String getName();
+ Collection<T> getElements();
+ }
}
/**
*
*/
-package eu.etaxonomy.taxeditor.ui.term;
+package eu.etaxonomy.taxeditor.ui.combo;
import java.util.ArrayList;
import java.util.Collections;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.store.TermManager;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEnableableFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectable;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement;
+import eu.etaxonomy.taxeditor.ui.element.ISelectable;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
/**
* <p>
* @version 1.0
* @param <T>
*/
-public abstract class AbstractTermComboElement<T extends DefinedTermBase>
+public class TermComboElement<T extends DefinedTermBase>
extends AbstractCdmFormElement implements SelectionListener,
DisposeListener, IEnableableFormElement, ISelectable {
- T selection;
+ private static final int DEFAULT_VISIBLE_ITEMS = 10;
+
+ private T selection;
+ private T emptyElement;
private static String EMPTY_ELEMENT_LABEL = "";
- T emptyElement;
protected Label label;
private Combo combo;
private Comparator<T> termComparator;
- private Composite msgComposite;
+ private Class<T> termClass;
+
+ private List<T> customPreferredTerms;
+
/**
* <p>
* </p>
*
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param style
* a int.
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param labelString
* a {@link java.lang.String} object.
* @param <T>
* a T object.
*/
- public AbstractTermComboElement(CdmFormFactory formFactory,
- ICdmFormElement parentElement, String labelString, T selection,
- int visibleItems, int style) {
+ public TermComboElement(CdmFormFactory formFactory,
+ ICdmFormElement parentElement, Class<T> termClass, String labelString, T selection,
+ int style) {
super(formFactory, parentElement);
-
+
+ this.termClass = termClass;
+
if (labelString != null) {
label = formFactory.createLabel(getLayoutComposite(), labelString);
addControl(label);
// create combo
combo = new Combo(getLayoutComposite(), SWT.BORDER | SWT.READ_ONLY);
addControl(combo);
- combo.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
- combo.setVisibleItemCount(visibleItems);
+ combo.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
+ combo.setVisibleItemCount(DEFAULT_VISIBLE_ITEMS);
- populateTerms(preferredTerms());
+ populateTerms(getPreferredTerms());
combo.addSelectionListener(this);
combo.addDisposeListener(this);
}
/**
- * <p>
- * Setter for the field <code>selection</code>.
- * </p>
+ * <p>Sets the selection of the combo to the given T object.</p>
+ * <p>Passing <code>null</code> to this method will set the selection to
+ * the empty element and effectively clear the selection</p>
*
* @param selection
- * a T object.
+ * a T object or <code>null</code> to clear the selection
*/
- public void setSelection(T selection) {
+ public void setSelection(T selection) {
+ this.selection = selection;
+
+ this.selection = selection;
+
Listener[] listeners = combo.getListeners(SWT.Selection);
for (Listener listener : listeners) {
combo.removeListener(SWT.Selection, listener);
}
-
- int index = terms.indexOf(selection);
- if (index == -1) {
- createTermNotInPreferredTerms(selection);
- index = terms.indexOf(selection);
+ int selectedIndex;
+ if(selection == null){
+ // set selection to the emptyElement
+ selectedIndex = 0;
+ }else{
+ selectedIndex = terms.indexOf(selection);
+ if (selectedIndex == -1) {
+ createTermNotInPreferredTerms(selection);
+ selectedIndex = terms.indexOf(selection);
+ }
}
- combo.select(index);
+ combo.select(selectedIndex);
for (Listener listener : listeners) {
combo.addListener(SWT.Selection, listener);
}
}
+ /**
+ * Fills the combo with elements and sets up the convenience functions
+ * for selection index
+ *
+ * @param preferredTerms
+ */
private void populateTerms(List<T> preferredTerms) {
combo.removeAll();
int i = 1;
int index = 0;
- // Add an empty element for when nothing was selected already
+ // Add an empty element for when nothing was selected yet
combo.add(EMPTY_ELEMENT_LABEL);
terms.add(emptyElement);
if (label == null) {
if (term.getTitleCache() != null) {
label = term.getTitleCache();
- StoreUtil.error(getClass(),
+ StoreUtil.warn(getClass(),
"Term does not have a representation: " + term
- + ", " + term.getUuid(), null);
+ + ", " + term.getUuid());
} else {
label = "Unknown";
- StoreUtil.error(getClass(),
+ StoreUtil.warn(getClass(),
"Representation Label and TitleCache empty for term: "
- + term + ", " + term.getUuid(), null);
+ + term + ", " + term.getUuid());
}
}
*
* @return a {@link java.util.List} object.
*/
- protected abstract List<T> preferredTerms();
+ protected List<T> getPreferredTerms(){
+ if (customPreferredTerms != null){
+ return customPreferredTerms;
+ }
+ return getTermManager().getPreferredTerms(termClass);
+ }
/**
* May be overridden by derived classes if the desired label string does not
return term.getLabel(CdmStore.getDefaultLanguage());
}
+ /**
+ *
+ *
+ * @param term
+ */
private void createTermNotInPreferredTerms(T term) {
- List<T> preferredTerms = preferredTerms();
+ List<T> preferredTerms = getPreferredTerms();
preferredTerms.add(term);
if (event != null
&& PreferencesUtil.PREFERRED_TERMS_CHANGE.equals(event
.getProperty())) {
- populateTerms(preferredTerms());
+ populateTerms(getPreferredTerms());
}
}
protected TermManager getTermManager() {
return CdmStore.getTermManager();
}
+
+ /**
+ *
+ * @return
+ */
+ public int getVisibleItemCount(){
+ return combo.getVisibleItemCount();
+ }
+
+ /**
+ *
+ * @param count
+ */
+ public void setVisibleItemCount(int count){
+ combo.setVisibleItemCount(count);
+ }
+
+ /**
+ * <p>A {@link List} of term objects may be passed to this combo box. In this case, the default behaviour
+ * of displaying the preferred terms for the T type will be overridden and the combo will only display the
+ * given terms. Also, any previous selection will be reseted.</p>
+ *
+ * <p>To return to the default of displaying the preferred terms, simply pass <code>null</code>.</p>
+ *
+ * @param terms a {@link List} of T objects or <code>null</code> for default preferred terms
+ */
+ public void setTerms(List<T> terms) {
+ setSelection(null);
+ customPreferredTerms = terms;
+ populateTerms(customPreferredTerms);
+ }
}
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialogs;
+package eu.etaxonomy.taxeditor.ui.dialog;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.MessageDialog;
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialogs;
+package eu.etaxonomy.taxeditor.ui.dialog;
import java.net.URI;
import java.net.URISyntaxException;
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
import java.lang.reflect.Field;
import java.text.Collator;
private Set<T> transientCdmObjects = new HashSet<T>();
private String settings;
+ protected T cdmBaseToBeFiltered;
+
/**
* <p>Constructor for AbstractFilteredCdmResourceSelectionDialog.</p>
*
/**
* <p>getSelectionFromDialog</p>
*
- * @param dialog a {@link eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog} object.
+ * @param dialog a {@link eu.etaxonomy.taxeditor.ui.dialog.selection.AbstractFilteredCdmResourceSelectionDialog} object.
* @param <TYPE> a TYPE object.
* @return a TYPE object.
*/
@Override
public void refresh() {
initModel();
+ filterExcludedObjects();
super.refresh();
}
/** {@inheritDoc} */
public void update(CdmDataChangeMap changeEvents) {}
+
+ /**
+ * Don't want to add a taxon or synonym to itself so filter the list to remove the taxon in question
+ * so it is not available to add as a concept relation
+ */
+ private void filterExcludedObjects() {
+ if (model != null && cdmBaseToBeFiltered != null) {
+
+ UuidAndTitleCache uuidAndTitleCacheToRemove = null;
+
+ for (UuidAndTitleCache uuidAndTitleCache : model){
+ if ((cdmBaseToBeFiltered.getUuid()).equals(uuidAndTitleCache.getUuid())) {
+ uuidAndTitleCacheToRemove = uuidAndTitleCache;
+ }
+ }
+ model.remove(uuidAndTitleCacheToRemove);
+ }
+ }
}
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
import java.util.UUID;
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
import java.util.UUID;
* @param conversation
* a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
* object.
+ * @param curentSelection
* @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonomicTree} object.
*/
public static Classification select(Shell shell,
- ConversationHolder conversation) {
+ ConversationHolder conversation, Classification curentSelection) {
ClassificationSelectionDialog dialog = new ClassificationSelectionDialog(
shell, conversation, "Choose a Classification", false, "", null);
return getSelectionFromDialog(dialog);
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
import java.util.UUID;
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
import java.util.UUID;
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
import java.util.ArrayList;
import java.util.List;
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
import java.util.ArrayList;
import java.util.List;
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
import java.util.UUID;
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
import java.util.ArrayList;
import java.util.List;
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
import java.util.UUID;
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
import java.util.UUID;
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
import java.util.ArrayList;
import java.util.Collection;
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
import java.util.UUID;
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
import java.util.UUID;
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
import java.util.UUID;
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
import java.util.UUID;
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2009 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
+
+import org.eclipse.swt.widgets.Shell;
+
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.model.agent.AgentBase;
+import eu.etaxonomy.cdm.model.agent.Institution;
+import eu.etaxonomy.cdm.model.agent.Person;
+import eu.etaxonomy.cdm.model.agent.Team;
+import eu.etaxonomy.cdm.model.common.Group;
+import eu.etaxonomy.cdm.model.common.ICdmBase;
+import eu.etaxonomy.cdm.model.common.User;
+import eu.etaxonomy.cdm.model.description.Feature;
+import eu.etaxonomy.cdm.model.description.FeatureTree;
+import eu.etaxonomy.cdm.model.description.PolytomousKey;
+import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
+import eu.etaxonomy.cdm.model.location.NamedArea;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.occurrence.Collection;
+import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
+import eu.etaxonomy.cdm.model.occurrence.FieldObservation;
+import eu.etaxonomy.cdm.model.reference.Reference;
+import eu.etaxonomy.cdm.model.taxon.Classification;
+import eu.etaxonomy.cdm.model.taxon.Synonym;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
+
+/**
+ * @author n.hoffmann
+ * @date Jan 25, 2012
+ *
+ */
+public class SelectionDialogFactory {
+
+ public static <T extends ICdmBase> T getSelectionFromDialog(Class<T> clazz, Shell shell, ConversationHolder conversation, T curentSelection){
+
+ if(clazz.equals(Taxon.class)){
+ return (T) TaxonBaseSelectionDialog.selectTaxon(shell, conversation, (Taxon) curentSelection);
+ }
+ if(clazz.equals(Synonym.class)){
+ return (T) TaxonBaseSelectionDialog.selectSynonym(shell, conversation);
+ }
+ if(clazz.equals(TaxonBase.class)){
+ return (T) TaxonBaseSelectionDialog.selectTaxonBase(shell, conversation);
+ }
+ if(clazz.equals(Classification.class)){
+ return (T) ClassificationSelectionDialog.select(shell, conversation, (Classification) curentSelection);
+ }
+ if(clazz.equals(TaxonNode.class)){
+ return (T) TaxonNodeSelectionDialog.select(shell, conversation, null, null, (TaxonNode) curentSelection, null);
+ }
+ if(clazz.equals(Reference.class)){
+ return (T) ReferenceSelectionDialog.select(shell, conversation, (Reference) curentSelection);
+ }
+ if(clazz.equals(TaxonNameBase.class)){
+ return (T) NameSelectionDialog.select(shell, conversation, (TaxonNameBase) curentSelection);
+ }
+ if(clazz.equals(Team.class)){
+ return (T) TeamSelectionDialog.select(shell, conversation, (Team) curentSelection);
+ }
+ if(clazz.equals(AgentBase.class)){
+ return (T) AgentSelectionDialog.select(shell, conversation, (AgentBase) curentSelection);
+ }
+ if(clazz.equals(Feature.class)){
+ return (T) FeatureSelectionDialog.select(shell, conversation, (Feature) curentSelection);
+ }
+ if(clazz.equals(FeatureTree.class)){
+ return (T) FeatureTreeSelectionDialog.select(shell, conversation, (FeatureTree) curentSelection);
+ }
+ if(clazz.equals(PolytomousKey.class)){
+ return (T) PolytomousKeySelectionDialog.select(shell, conversation, (PolytomousKey) curentSelection);
+ }
+ if(clazz.equals(PolytomousKeyNode.class)){
+ StoreUtil.warningDialog("Not implemented yet", SelectionDialogFactory.class,
+ "This functionality is not implemented yet.");
+ return null;
+ }
+ if(clazz.equals(DerivedUnitBase.class)){
+ return (T) DerivedUnitSelectionDialog.select(shell, conversation, (DerivedUnitBase) curentSelection);
+ }
+ if(clazz.equals(FieldObservation.class)){
+ return (T) FieldObservationSelectionDialog.select(shell, conversation, (FieldObservation) curentSelection);
+ }
+ if(clazz.equals(NamedArea.class)){
+ return (T) NamedAreaSelectionDialog.select(shell, conversation, (NamedArea) curentSelection);
+ }
+ if(clazz.equals(Collection.class)){
+ return (T) CollectionSelectionDialog.select(shell, conversation, (Collection) curentSelection);
+ }
+ if(clazz.equals(User.class)){
+ return (T) UserSelectionDialog.select(shell, conversation, (User) curentSelection);
+ }
+ if (clazz.equals(Person.class)){
+ return (T) PersonSelectionDialog.select(shell, conversation, (Person) curentSelection);
+ }
+ if(clazz.equals(Group.class)){
+ return (T) GroupSelectionDialog.select(shell, conversation, (Group) curentSelection);
+ }
+ if(clazz.equals(Institution.class)){
+ return (T) InstitutionSelectionDialog.select(shell, conversation, (Institution) curentSelection);
+ }
+
+ return null;
+ }
+
+}
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
-
-import java.util.UUID;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.api.service.ITaxonService;
-import eu.etaxonomy.cdm.model.taxon.Synonym;
-import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-
-/**
- * <p>FilteredTaxonBaseSelectionDialog class.</p>
- *
- * @author n.hoffmann
- * @created Sep 21, 2009
- * @version 1.0
- */
-public class TaxonBaseSelectionDialog extends
- AbstractFilteredCdmResourceSelectionDialog<TaxonBase> {
-
- /**
- * <p>select</p>
- *
- * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
- * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.
- */
- public static TaxonBase selectTaxonBase(Shell shell, ConversationHolder conversation) {
- TaxonBaseSelectionDialog dialog = new TaxonBaseSelectionDialog(TaxonBase.class, shell, conversation,
- "Choose a taxon", false, null);
- return getSelectionFromDialog(dialog);
- }
-
- /**
- * <p>select</p>
- *
- * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
- * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.
- */
- public static Taxon selectTaxon(Shell shell, ConversationHolder conversation) {
- TaxonBaseSelectionDialog dialog = new TaxonBaseSelectionDialog(Taxon.class, shell, conversation,
- "Choose a taxon", false, null);
- return (Taxon) getSelectionFromDialog(dialog);
- }
-
- /**
- * <p>select</p>
- *
- * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
- * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.
- */
- public static Synonym selectSynonym(Shell shell, ConversationHolder conversation) {
- TaxonBaseSelectionDialog dialog = new TaxonBaseSelectionDialog(Synonym.class, shell, conversation,
- "Choose a taxon", false, null);
- return (Synonym) getSelectionFromDialog(dialog);
- }
-
- private final Class<? extends TaxonBase> clazz;
-
- /**
- * <p>Constructor for FilteredTaxonBaseSelectionDialog.</p>
- *
- * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
- * @param title a {@link java.lang.String} object.
- * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param multi a boolean.
- * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.
- */
- protected TaxonBaseSelectionDialog(Class<? extends TaxonBase> clazz, Shell shell, ConversationHolder conversation, String title, boolean multi, TaxonBase taxon) {
- super(shell, conversation, title, multi, ReferenceSelectionDialog.class.getCanonicalName(), taxon);
- this.clazz = clazz;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea(org.eclipse.swt.widgets.Composite)
- */
- /** {@inheritDoc} */
- @Override
- protected Control createExtendedContentArea(Composite parent) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
- */
- /** {@inheritDoc} */
- @Override
- protected TaxonBase getPersistentObject(UUID uuid) {
- return CdmStore.getService(ITaxonService.class).load(uuid);
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#initModel()
- */
- /** {@inheritDoc} */
- @Override
- protected void initModel() {
- if(clazz == TaxonBase.class){
- model = CdmStore.getService(ITaxonService.class).getUuidAndTitleCache();
- }
- else if(clazz == Taxon.class){
- model = CdmStore.getService(ITaxonService.class).getUuidAndTitleCacheTaxon();
- }
- else if(clazz == Synonym.class){
- model = CdmStore.getService(ITaxonService.class).getUuidAndTitleCacheSynonym();
- }
- }
-
- /** {@inheritDoc} */
- @Override
- protected AbstractNewEntityWizard getNewEntityWizard(String parameter) {
- return null;
- }
-
- /** {@inheritDoc} */
- @Override
- protected String getNewWizardLinkText() {
- return null;
- }
-}
+// $Id$\r
+/**\r
+* Copyright (C) 2007 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+\r
+package eu.etaxonomy.taxeditor.ui.dialog.selection;\r
+\r
+import java.util.UUID;\r
+\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Shell;\r
+\r
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
+import eu.etaxonomy.cdm.api.service.ITaxonService;\r
+import eu.etaxonomy.cdm.model.taxon.Synonym;\r
+import eu.etaxonomy.cdm.model.taxon.Taxon;\r
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;\r
+import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+\r
+/**\r
+ * <p>FilteredTaxonBaseSelectionDialog class.</p>\r
+ *\r
+ * @author n.hoffmann\r
+ * @created Sep 21, 2009\r
+ * @version 1.0\r
+ */\r
+public class TaxonBaseSelectionDialog extends\r
+ AbstractFilteredCdmResourceSelectionDialog<TaxonBase> {\r
+ \r
+ \r
+ /**\r
+ * <p>select</p>\r
+ *\r
+ * @param shell a {@link org.eclipse.swt.widgets.Shell} object.\r
+ * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.\r
+ * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.\r
+ */\r
+ public static TaxonBase selectTaxonBase(Shell shell, ConversationHolder conversation) {\r
+ AbstractFilteredCdmResourceSelectionDialog<TaxonBase> dialog = new TaxonBaseSelectionDialog(TaxonBase.class, shell, conversation,\r
+ "Choose a taxon", false, null, null);\r
+ return getSelectionFromDialog(dialog);\r
+ }\r
+ \r
+ /**\r
+ * <p>select</p>\r
+ *\r
+ * @param shell a {@link org.eclipse.swt.widgets.Shell} object.\r
+ * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.\r
+ * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.\r
+ */\r
+ public static Taxon selectTaxon(Shell shell, ConversationHolder conversation, Taxon taxonToBeFiltered) {\r
+ \r
+\r
+ AbstractFilteredCdmResourceSelectionDialog<TaxonBase> dialog = new TaxonBaseSelectionDialog(Taxon.class, shell, conversation,\r
+ "Choose a taxon", false, null, taxonToBeFiltered);\r
+ return (Taxon) getSelectionFromDialog(dialog);\r
+ }\r
+ \r
+ /**\r
+ * <p>select</p>\r
+ *\r
+ * @param shell a {@link org.eclipse.swt.widgets.Shell} object.\r
+ * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.\r
+ * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.\r
+ */\r
+ public static Synonym selectSynonym(Shell shell, ConversationHolder conversation) {\r
+ AbstractFilteredCdmResourceSelectionDialog<TaxonBase> dialog = new TaxonBaseSelectionDialog(Synonym.class, shell, conversation,\r
+ "Choose a taxon", false, null, null);\r
+ return (Synonym) getSelectionFromDialog(dialog);\r
+ }\r
+\r
+ private final Class<? extends TaxonBase> clazz;\r
+ \r
+ /**\r
+ * <p>Constructor for FilteredTaxonBaseSelectionDialog.</p>\r
+ *\r
+ * @param shell a {@link org.eclipse.swt.widgets.Shell} object.\r
+ * @param title a {@link java.lang.String} object.\r
+ * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.\r
+ * @param multi a boolean.\r
+ * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.\r
+ */\r
+ protected TaxonBaseSelectionDialog(Class<? extends TaxonBase> clazz, Shell shell, ConversationHolder conversation, String title, boolean multi, TaxonBase taxon, TaxonBase taxonToBeFiltered) {\r
+ super(shell, conversation, title, multi, ReferenceSelectionDialog.class.getCanonicalName(), taxon);\r
+ this.cdmBaseToBeFiltered = taxonToBeFiltered;\r
+\r
+ \r
+ \r
+ this.clazz = clazz;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea(org.eclipse.swt.widgets.Composite)\r
+ */\r
+ /** {@inheritDoc} */\r
+ @Override\r
+ protected Control createExtendedContentArea(Composite parent) {\r
+ return null;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)\r
+ */\r
+ /** {@inheritDoc} */\r
+ @Override\r
+ protected TaxonBase getPersistentObject(UUID uuid) {\r
+ return CdmStore.getService(ITaxonService.class).load(uuid);\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#initModel()\r
+ */\r
+ /** {@inheritDoc} */\r
+ @Override\r
+ protected void initModel() {\r
+ if(clazz == TaxonBase.class){\r
+ model = CdmStore.getService(ITaxonService.class).getUuidAndTitleCache();\r
+ }\r
+ else if(clazz == Taxon.class){\r
+ \r
+ model = CdmStore.getService(ITaxonService.class).getUuidAndTitleCacheTaxon();\r
+ \r
+ }\r
+ else if(clazz == Synonym.class){\r
+ model = CdmStore.getService(ITaxonService.class).getUuidAndTitleCacheSynonym();\r
+ }\r
+ }\r
+\r
+ /** {@inheritDoc} */\r
+ @Override\r
+ protected AbstractNewEntityWizard getNewEntityWizard(String parameter) {\r
+ return null;\r
+ }\r
+\r
+ /** {@inheritDoc} */\r
+ @Override\r
+ protected String getNewWizardLinkText() {\r
+ return null;\r
+ }\r
+}\r
/**
*
*/
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
import java.util.List;
import java.util.UUID;
private List<Classification> classifications;
- private Classification selectedClassification;
-
- private final Classification defaultClassification;
-
+ private Classification selectedClassification;
/**
* <p>Constructor for FilteredTaxonNodeSelectionDialog.</p>
if(classification != null){
selectedClassification = classification;
}
- defaultClassification = classification;
}
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
import java.util.UUID;
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
import java.util.ArrayList;
import java.util.List;
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import org.apache.commons.lang.StringUtils;
import org.eclipse.jface.util.IPropertyChangeListener;
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param conversation
* a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
@Override
public void createControl(Composite parent) {
ScrolledForm scrolledForm = formFactory.createScrolledForm(parent);
- scrolledForm.getBody().setLayout(CdmFormFactory.LAYOUT());
+ scrolledForm.getBody().setLayout(LayoutConstants.LAYOUT());
Composite control = formFactory.createComposite(scrolledForm.getBody());
- control.setLayoutData(CdmFormFactory.FILL());
+ control.setLayoutData(LayoutConstants.FILL());
- control.setLayout(CdmFormFactory.LAYOUT(2, false));
+ control.setLayout(LayoutConstants.LAYOUT(2, false));
WizardPageRootElement rootElement = new WizardPageRootElement(
formFactory, control, getConversationHolder());
* Creates the detail element for this wizard page
*
* @param rootElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @return a
* {@link eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement}
/**
*
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import java.util.ConcurrentModificationException;
import java.util.HashSet;
/**
* <p>Constructor for AbstractCdmFormElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param layoutComposite a {@link org.eclipse.swt.widgets.Composite} object.
*/
protected AbstractCdmFormElement(CdmFormFactory formFactory, Composite layoutComposite){
/**
* <p>Constructor for AbstractCdmFormElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
*/
public AbstractCdmFormElement(CdmFormFactory formFactory, ICdmFormElement formElement) {
this(formFactory, formElement.getLayoutComposite());
/**
* <p>Getter for the field <code>formFactory</code>.</p>
*
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
*/
public CdmFormFactory getFormFactory() {
return formFactory;
/**
* <p>Getter for the field <code>parentElement</code>.</p>
*
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
*/
public ICdmFormElement getParentElement(){
return parentElement;
/**
* <p>removeElement</p>
*
- * @param element a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param element a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
*/
protected void removeElement(ICdmFormElement element){
elements.remove(element);
*
* It is good advice to check whether the PropertyChangeEvent is destined for the implementing composite.
* Implementations should also check for null PropertyChangeEvents and return immediately in that case.
- * @see eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
+ * @see eu.etaxonomy.taxeditor.ui.element.ICdmFormElement#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
*/
public void propertyChange(PropertyChangeEvent event) {
// implement in subclasses
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import java.util.ArrayList;
import java.util.List;
+
/**
* <p>Abstract AbstractCdmFormElementWithErrors class.</p>
*
/**
* <p>Constructor for AbstractCdmFormElementWithErrors.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
*/
public AbstractCdmFormElementWithErrors(CdmFormFactory formFactory,
ICdmFormElement formElement) {
/**
*
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import java.util.ConcurrentModificationException;
import java.util.HashSet;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.TypedListener;
import org.eclipse.swt.widgets.Widget;
+import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.forms.widgets.Section;
import org.eclipse.ui.forms.widgets.TableWrapLayout;
import org.eclipse.ui.forms.widgets.ToggleHyperlink;
private ICdmFormElement parentElement;
- private ConversationHolder conversation;
-
- private boolean handlingPropertyChange;
-
private Color persistentBackgroundColor;
/**
* @param style
* a int.
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param <ENTITY>
* a ENTITY object.
*/
- protected AbstractFormSection(CdmFormFactory formFactory,
- ConversationHolder conversation, ICdmFormElement parentElement,
+ protected AbstractFormSection(CdmFormFactory formFactory, ICdmFormElement parentElement,
int style) {
super(parentElement.getLayoutComposite(), style);
this.formFactory = formFactory;
- this.conversation = conversation;
-
- this.setLayoutData(CdmFormFactory.FILL());
+ this.setLayoutData(LayoutConstants.FILL());
Composite client = formFactory.createComposite(this, SWT.WRAP);
client.setBackgroundMode(SWT.INHERIT_DEFAULT);
- TableWrapLayout layout = CdmFormFactory.LAYOUT();
+ TableWrapLayout layout = LayoutConstants.LAYOUT();
layout.bottomMargin = 10;
layout.rightMargin = 5;
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param conversation
* a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
* object.
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param selectionProvider
* a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
* a int.
*/
protected AbstractFormSection(CdmFormFactory formFactory,
- ConversationHolder conversation, ICdmFormElement parentElement,
+ ICdmFormElement parentElement,
ISelectionProvider selectionProvider, int style) {
- this(formFactory, conversation, parentElement, style);
+ this(formFactory, parentElement, style);
this.selectionProvider = selectionProvider;
}
* getSection
* </p>
*
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
*/
public AbstractFormSection<ENTITY> getSection() {
* </p>
*
* @param element
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
*/
protected void removeElement(ICdmFormElement element) {
* Getter for the field <code>parentElement</code>.
* </p>
*
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
*/
public ICdmFormElement getParentElement() {
return parentElement;
* Getter for the field <code>formFactory</code>.
* </p>
*
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
*/
public CdmFormFactory getFormFactory() {
return formFactory;
* object.
*/
public ConversationHolder getConversationHolder() {
- return conversation;
+ if(getParentElement() instanceof RootElement || getParentElement() == null){
+
+ IEditorPart activeEditor = StoreUtil.getActiveEditor();
+ if(activeEditor instanceof IConversationEnabled){
+ ConversationHolder conversation = ((IConversationEnabled) StoreUtil.getActiveEditor()).getConversationHolder();
+ return conversation;
+ }
+ }else if(getParentElement() instanceof IConversationEnabled){
+ return ((IConversationEnabled) getParentElement()).getConversationHolder();
+ }
+ StoreUtil.errorDialog("Could not get conversation for AbstractFormSection",
+ getClass(), "There is an error in the implementation. There should have been an active editor but it wasn't",
+ new IllegalArgumentException());
+ return null;
+
}
/** {@inheritDoc} */
public void update(CdmDataChangeMap changeEvents) {
}
+
+
}
/**
*
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import java.net.URI;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.ui.forms.widgets.TableWrapData;
+
/**
* <p>BrowserElement class.</p>
*
* <p>Constructor for BrowserElement.</p>
*
* @param style a int.
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param imageUri a {@link java.net.URI} object.
*/
protected BrowserElement(CdmFormFactory formFactory, ICdmFormElement parentElement, URI imageUri, int style) {
browser = new Browser(getLayoutComposite(), SWT.NONE);
addControl(browser);
- getLayoutComposite().setLayoutData(CdmFormFactory.FILL());
+ getLayoutComposite().setLayoutData(LayoutConstants.FILL());
layoutBrowser();
*
*/
private void layoutBrowser() {
- TableWrapData layoutData = CdmFormFactory.FILL();
+ TableWrapData layoutData = LayoutConstants.FILL();
layoutData.heightHint = 1000;
browser.setLayoutData(layoutData);
/**
*
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import java.net.URI;
import java.util.ArrayList;
import org.eclipse.ui.forms.IFormColors;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.ui.forms.widgets.TableWrapData;
-import org.eclipse.ui.forms.widgets.TableWrapLayout;
import org.eclipse.ui.internal.forms.widgets.FormFonts;
import org.joda.time.Partial;
import org.springframework.security.core.GrantedAuthority;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
-import eu.etaxonomy.cdm.model.agent.Institution;
import eu.etaxonomy.cdm.model.agent.Person;
import eu.etaxonomy.cdm.model.agent.Team;
-import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
import eu.etaxonomy.cdm.model.common.Annotation;
-import eu.etaxonomy.cdm.model.common.AnnotationType;
+import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.common.Credit;
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
import eu.etaxonomy.cdm.model.common.DescriptionElementSource;
import eu.etaxonomy.cdm.model.common.Extension;
-import eu.etaxonomy.cdm.model.common.ExtensionType;
import eu.etaxonomy.cdm.model.common.Group;
-import eu.etaxonomy.cdm.model.common.IAnnotatableEntity;
import eu.etaxonomy.cdm.model.common.ICdmBase;
+import eu.etaxonomy.cdm.model.common.IDefinedTerm;
import eu.etaxonomy.cdm.model.common.IdentifiableSource;
import eu.etaxonomy.cdm.model.common.Language;
import eu.etaxonomy.cdm.model.common.LanguageString;
import eu.etaxonomy.cdm.model.common.Marker;
-import eu.etaxonomy.cdm.model.common.MarkerType;
import eu.etaxonomy.cdm.model.common.TimePeriod;
import eu.etaxonomy.cdm.model.common.User;
import eu.etaxonomy.cdm.model.common.VersionableEntity;
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
import eu.etaxonomy.cdm.model.description.Distribution;
import eu.etaxonomy.cdm.model.description.Feature;
-import eu.etaxonomy.cdm.model.description.FeatureTree;
import eu.etaxonomy.cdm.model.description.IndividualsAssociation;
import eu.etaxonomy.cdm.model.description.KeyStatement;
-import eu.etaxonomy.cdm.model.description.MeasurementUnit;
import eu.etaxonomy.cdm.model.description.Modifier;
-import eu.etaxonomy.cdm.model.description.PolytomousKey;
-import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
-import eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase;
import eu.etaxonomy.cdm.model.description.QuantitativeData;
import eu.etaxonomy.cdm.model.description.Scope;
-import eu.etaxonomy.cdm.model.description.Sex;
-import eu.etaxonomy.cdm.model.description.Stage;
-import eu.etaxonomy.cdm.model.description.State;
import eu.etaxonomy.cdm.model.description.StateData;
-import eu.etaxonomy.cdm.model.description.StatisticalMeasure;
import eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue;
import eu.etaxonomy.cdm.model.description.TaxonInteraction;
import eu.etaxonomy.cdm.model.description.TextData;
import eu.etaxonomy.cdm.model.location.NamedArea;
-import eu.etaxonomy.cdm.model.location.NamedAreaType;
+import eu.etaxonomy.cdm.model.location.NamedAreaLevel;
import eu.etaxonomy.cdm.model.location.Point;
-import eu.etaxonomy.cdm.model.location.ReferenceSystem;
import eu.etaxonomy.cdm.model.media.ImageFile;
import eu.etaxonomy.cdm.model.media.Media;
import eu.etaxonomy.cdm.model.media.MediaRepresentation;
import eu.etaxonomy.cdm.model.media.MediaRepresentationPart;
import eu.etaxonomy.cdm.model.media.Rights;
-import eu.etaxonomy.cdm.model.media.RightsTerm;
import eu.etaxonomy.cdm.model.name.NameRelationship;
-import eu.etaxonomy.cdm.model.name.NameRelationshipType;
import eu.etaxonomy.cdm.model.name.NameTypeDesignation;
-import eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus;
import eu.etaxonomy.cdm.model.name.NomenclaturalStatus;
-import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
-import eu.etaxonomy.cdm.model.name.Rank;
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
-import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
-import eu.etaxonomy.cdm.model.name.TaxonNameBase;
-import eu.etaxonomy.cdm.model.occurrence.Collection;
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
-import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
import eu.etaxonomy.cdm.model.occurrence.DeterminationEvent;
-import eu.etaxonomy.cdm.model.occurrence.DeterminationModifier;
-import eu.etaxonomy.cdm.model.occurrence.FieldObservation;
-import eu.etaxonomy.cdm.model.occurrence.PreservationMethod;
import eu.etaxonomy.cdm.model.occurrence.Specimen;
import eu.etaxonomy.cdm.model.reference.Reference;
-import eu.etaxonomy.cdm.model.taxon.Classification;
-import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.cdm.model.taxon.TaxonBase;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.password.EditPasswordElement;
+import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
import eu.etaxonomy.taxeditor.ui.openurl.IOpenUrlEnabled;
import eu.etaxonomy.taxeditor.ui.openurl.OpenUrlSelectorElement;
+import eu.etaxonomy.taxeditor.ui.password.EditPasswordElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
import eu.etaxonomy.taxeditor.ui.section.EmptyElement;
import eu.etaxonomy.taxeditor.ui.section.agent.InstitutionDetailElement;
import eu.etaxonomy.taxeditor.ui.section.classification.ClassificationDetailSection;
import eu.etaxonomy.taxeditor.ui.section.classification.TaxonNodeDetailElement;
import eu.etaxonomy.taxeditor.ui.section.classification.TaxonNodeDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.common.ReferencedEntityDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.common.RefereneEntityDetailElement;
import eu.etaxonomy.taxeditor.ui.section.description.DerivedUnitElement;
import eu.etaxonomy.taxeditor.ui.section.description.DescribedSpecimenSection;
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionDetailElement;
import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailSection;
import eu.etaxonomy.taxeditor.ui.section.supplemental.AnnotationElement;
import eu.etaxonomy.taxeditor.ui.section.supplemental.AnnotationSection;
+import eu.etaxonomy.taxeditor.ui.section.supplemental.CdmBaseElement;
+import eu.etaxonomy.taxeditor.ui.section.supplemental.CdmBaseSection;
import eu.etaxonomy.taxeditor.ui.section.supplemental.CreditElement;
import eu.etaxonomy.taxeditor.ui.section.supplemental.CreditSection;
import eu.etaxonomy.taxeditor.ui.section.supplemental.ExtensionElement;
import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonBaseDetailElement;
import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonBaseDetailSection;
import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonRelationshipDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonRelationshipDetailSection;
import eu.etaxonomy.taxeditor.ui.section.user.GroupsByUserDetailElement;
import eu.etaxonomy.taxeditor.ui.section.user.GroupsByUserDetailSection;
import eu.etaxonomy.taxeditor.ui.section.user.UserDetailElement;
import eu.etaxonomy.taxeditor.ui.section.user.UserDetailSection;
-import eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.AgentSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.ClassificationSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.CollectionSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.DerivedUnitBaseSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.FeatureSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.FeatureTreeSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.FieldObservationSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.GroupSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.InstitutionSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.NameSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.NamedAreaSelectionElement;
+import eu.etaxonomy.taxeditor.ui.section.userecords.UseRecordDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.userecords.UseRecordDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.DefinedTermDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.DefinedTermDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailSection;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
import eu.etaxonomy.taxeditor.ui.selection.NomenclaturalAuthorTeamSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.PersonSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.PolytomousKeyNodeSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.PolytomousKeySelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.SynonymSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.TaxonBaseSelectionElement;
import eu.etaxonomy.taxeditor.ui.selection.TaxonNodeSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.TaxonSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.TeamSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.UserSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement;
-import eu.etaxonomy.taxeditor.ui.term.AbstractTermComboElement;
-import eu.etaxonomy.taxeditor.ui.term.AnnotationTypeComboElement;
-import eu.etaxonomy.taxeditor.ui.term.DeterminationModifierComboElement;
-import eu.etaxonomy.taxeditor.ui.term.EmptyComboElement;
-import eu.etaxonomy.taxeditor.ui.term.ExtensionTypeComboElement;
-import eu.etaxonomy.taxeditor.ui.term.LanguageComboElement;
-import eu.etaxonomy.taxeditor.ui.term.MarkerTypeComboElement;
-import eu.etaxonomy.taxeditor.ui.term.MeasurementUnitComboElement;
-import eu.etaxonomy.taxeditor.ui.term.ModifierComboElement;
-import eu.etaxonomy.taxeditor.ui.term.NameRelationshipTypeComboElement;
-import eu.etaxonomy.taxeditor.ui.term.NameTypeDesignationStatusComboElement;
-import eu.etaxonomy.taxeditor.ui.term.NamedAreaTypeComboElement;
-import eu.etaxonomy.taxeditor.ui.term.NomenclaturalCodeComboElement;
-import eu.etaxonomy.taxeditor.ui.term.NomenclaturalStatusTypeComboElement;
-import eu.etaxonomy.taxeditor.ui.term.PresenceAbsenceTermComboElement;
-import eu.etaxonomy.taxeditor.ui.term.PreservationMethodComboElement;
-import eu.etaxonomy.taxeditor.ui.term.RankComboElement;
-import eu.etaxonomy.taxeditor.ui.term.ReferenceSystemComboElement;
-import eu.etaxonomy.taxeditor.ui.term.ReferenceTypeComboElement;
-import eu.etaxonomy.taxeditor.ui.term.RightsTypeComboElement;
-import eu.etaxonomy.taxeditor.ui.term.ScopeComboElement;
-import eu.etaxonomy.taxeditor.ui.term.SexComboElement;
-import eu.etaxonomy.taxeditor.ui.term.SpecimenTypeDesignationStatusComboElement;
-import eu.etaxonomy.taxeditor.ui.term.StageComboElement;
-import eu.etaxonomy.taxeditor.ui.term.StateComboElement;
-import eu.etaxonomy.taxeditor.ui.term.StatisticalMeasureComboElement;
/**
* <p>
private final int orientation = Window.getDefaultOrientation();
private ISelectionProvider selectionProvider;
- /**
- * <p>
- * LAYOUT
- * </p>
- *
- * @return a {@link org.eclipse.ui.forms.widgets.TableWrapLayout} object.
- */
- public static final TableWrapLayout LAYOUT() {
- return LAYOUT(1, false);
- }
-
- /**
- * <p>
- * LAYOUT
- * </p>
- *
- * @param columns
- * a int.
- * @param equalWidth
- * a boolean.
- * @return a {@link org.eclipse.ui.forms.widgets.TableWrapLayout} object.
- */
- public static final TableWrapLayout LAYOUT(int columns, boolean equalWidth) {
- TableWrapLayout layout = new TableWrapLayout();
- layout.topMargin = 0;
- layout.rightMargin = 0;
- layout.bottomMargin = 0;
- layout.leftMargin = 0;
- layout.numColumns = columns;
- layout.makeColumnsEqualWidth = equalWidth;
- layout.verticalSpacing = 0;
- layout.horizontalSpacing = 0;
- return layout;
- }
-
- /**
- * <p>
- * FILL
- * </p>
- *
- * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
- */
- public static final TableWrapData FILL() {
- return FILL(1, 1);
- }
-
- /**
- * <p>
- * FILL
- * </p>
- *
- * @param horizontalSpan
- * a int.
- * @param verticalSpan
- * a int.
- * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
- */
- public static final TableWrapData FILL(int horizontalSpan, int verticalSpan) {
- TableWrapData layoutData = new TableWrapData(TableWrapData.FILL_GRAB,
- TableWrapData.FILL_GRAB);
- layoutData.colspan = horizontalSpan;
- layoutData.rowspan = verticalSpan;
- return layoutData;
- }
-
- /**
- * <p>
- * LEFT
- * </p>
- *
- * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
- */
- public static final TableWrapData LEFT() {
- return new TableWrapData(TableWrapData.LEFT, TableWrapData.TOP);
- }
-
- /**
- * <p>
- * RIGHT
- * </p>
- *
- * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
- */
- public static final TableWrapData RIGHT() {
- return new TableWrapData(TableWrapData.RIGHT, TableWrapData.TOP);
- }
-
- /**
- * <p>
- * FILL_HORIZONTALLY
- * </p>
- *
- * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
- */
- public static final TableWrapData FILL_HORIZONTALLY() {
- return FILL_HORIZONTALLY(1, 1);
- }
-
- /**
- * <p>
- * FILL_HORIZONTALLY
- * </p>
- *
- * @param horizontalSpan
- * a int.
- * @param verticalSpan
- * a int.
- * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
- */
- public static final TableWrapData FILL_HORIZONTALLY(int horizontalSpan,
- int verticalSpan) {
- TableWrapData layoutData = new TableWrapData(TableWrapData.FILL_GRAB,
- TableWrapData.TOP);
- layoutData.colspan = horizontalSpan;
- layoutData.rowspan = verticalSpan;
- return layoutData;
- }
-
/** Constant <code>EMPTY_SELECTION</code> */
public static ISelection EMPTY_SELECTION = new ISelection() {
@Override
}
};
+ /**
+ *
+ * @author n.hoffmann
+ * @date Jan 25, 2010
+ *
+ */
private class SelectionMouseHandler extends MouseAdapter {
@Override
public void mouseDown(MouseEvent e) {
}
}
+ /**
+ *
+ * @author n.hoffmann
+ * @date Jan 25, 2010
+ *
+ */
private class SelectionFocusHandler extends FocusAdapter {
@Override
public void focusGained(FocusEvent e) {
* destroySelectionArbitrator(..)
*
* @param entityElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.IEntityElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
* object.
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator}
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
* object.
*/
public SelectionArbitrator createSelectionArbitrator(
* </p>
*
* @param selectionArbitrator
- * a {@link eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
* object.
*/
public void destroySelectionArbitrator(
*
* @param formElement
* a
- * {@link eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement}
+ * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
* object.
*/
public void adapt(AbstractCdmFormElement formElement) {
* </p>
*
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
*/
public void destroyElement(ICdmFormElement formElement) {
* @param style
* a int.
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement}
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
* object.
*/
public TextWithLabelElement createMultilineTextWithLabel(
* </p>
*
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param labelString
* a {@link java.lang.String} object.
* @param style
* a int.
* @return a
- * {@link eu.etaxonomy.taxeditor.ui.forms.MultilanguageTextElement}
+ * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
* object.
*/
public MultilanguageTextElement createMultiLanguageTextElement(
* @param style
* a int.
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement}
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
* object.
*/
public TextWithLabelElement createTextWithLabelElement(
* </p>
*
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param labelString
* a {@link java.lang.String} object.
* a {@link java.lang.Integer} object.
* @param style
* a int.
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.NumberWithLabelElement}
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
* object.
*/
public NumberWithLabelElement createIntegerTextWithLabelElement(
* </p>
*
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param labelString
* a {@link java.lang.String} object.
* a float.
* @param style
* a int.
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.NumberWithLabelElement}
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
* object.
*/
public NumberWithLabelElement createFloatTextWithLabelElement(
* </p>
*
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param labelString
* a {@link java.lang.String} object.
* @param style
* a int.
* @return a
- * {@link eu.etaxonomy.taxeditor.ui.forms.LanguageStringWithLabelElement}
+ * {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
* object.
*/
public LanguageStringWithLabelElement createLanguageStringWithLabelElement(
* </p>
*
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param labelString
* a {@link java.lang.String} object.
* @param style
* a int.
* @return a
- * {@link eu.etaxonomy.taxeditor.ui.forms.LanguageStringWithLabelElement}
+ * {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
* object.
*/
public LanguageStringWithLabelElement createLanguageStringWithLabelElement(
* </p>
*
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param initialText
* a {@link java.lang.String} object.
* @param style
* a int.
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement}
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
* object.
*/
public TextWithLabelElement createTextElement(
* </p>
*
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param keyHeading
* a {@link java.lang.String} object.
* a {@link java.lang.String} object.
* @param map
* a {@link java.util.Map} object.
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.KeyValueViewerElement}
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
* object.
*/
public KeyValueViewerElement createKeyValueViewerElement(
return element;
}
- public static enum TermComboType {
- EXTENSIONTYPE, LANGUAGE, MARKERTYPE, NOMENCLATURALSTATUSTYPE, RANK, RIGHTSTYPE, NAMERELATIONSHIP, NAMEDAREATYPE, PRESENCEABSENCESTATUS, ANNOTATIONTYPE, NAMETYPEDESIGNATIONSTATUS, SPECIMENTYPEDESIGNATIONSTATUS, SEX, STAGE, PRESERVATION_METHOD, MEASUREMENT_UNIT, STATE, MODIFIER, STATISTICAL_MEASURE, SCOPE, EMPTY, DETERMINATION_MODIFIER, REFERENCE_SYSTEM
- }
-
/**
* <p>
* createTermComboElement
*
* @param termComboType
* a
- * {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType}
+ * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
* object.
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param labelString
* a {@link java.lang.String} object.
* object.
* @param style
* a int.
- * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractTermComboElement}
+ * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
* object.
*/
- public AbstractTermComboElement createTermComboElement(
- TermComboType termComboType, ICdmFormElement parentElement,
- String labelString, DefinedTermBase selection, int style) {
- AbstractTermComboElement element = null;
-
- switch (termComboType) {
- case EMPTY:
- element = new EmptyComboElement<DefinedTermBase>(this,
- parentElement, labelString, style);
- break;
- case EXTENSIONTYPE:
- element = new ExtensionTypeComboElement(this, parentElement,
- labelString, (ExtensionType) selection, style);
- break;
- case LANGUAGE:
- element = new LanguageComboElement(this, parentElement,
- labelString, (Language) selection, style);
- break;
- case MARKERTYPE:
- element = new MarkerTypeComboElement(this, parentElement,
- labelString, (MarkerType) selection, style);
- break;
- case NOMENCLATURALSTATUSTYPE:
- element = new NomenclaturalStatusTypeComboElement(this,
- parentElement, labelString,
- (NomenclaturalStatusType) selection, style);
- break;
- case RANK:
- element = new RankComboElement(this, parentElement, labelString,
- (Rank) selection, style);
- break;
- case RIGHTSTYPE:
- element = new RightsTypeComboElement(this, parentElement,
- labelString, (RightsTerm) selection, style);
- break;
- case NAMERELATIONSHIP:
- element = new NameRelationshipTypeComboElement(this, parentElement,
- labelString, (NameRelationshipType) selection, style);
- break;
- case NAMEDAREATYPE:
- element = new NamedAreaTypeComboElement(this, parentElement,
- labelString, (NamedAreaType) selection, style);
- break;
- case ANNOTATIONTYPE:
- element = new AnnotationTypeComboElement(this, parentElement,
- labelString, (AnnotationType) selection, style);
- break;
- case PRESENCEABSENCESTATUS:
- element = new PresenceAbsenceTermComboElement(this, parentElement,
- labelString, (PresenceAbsenceTermBase) selection, style);
- break;
- case NAMETYPEDESIGNATIONSTATUS:
- element = new NameTypeDesignationStatusComboElement(this,
- parentElement, labelString,
- (NameTypeDesignationStatus) selection, style);
- break;
- case SPECIMENTYPEDESIGNATIONSTATUS:
- element = new SpecimenTypeDesignationStatusComboElement(this,
- parentElement, labelString,
- (SpecimenTypeDesignationStatus) selection, style);
- break;
- case SEX:
- element = new SexComboElement(this, parentElement, labelString,
- (Sex) selection, style);
- break;
- case STAGE:
- element = new StageComboElement(this, parentElement, labelString,
- (Stage) selection, style);
- break;
- case PRESERVATION_METHOD:
- element = new PreservationMethodComboElement(this, parentElement,
- labelString, (PreservationMethod) selection, style);
- break;
- case MEASUREMENT_UNIT:
- element = new MeasurementUnitComboElement(this, parentElement,
- labelString, (MeasurementUnit) selection, style);
- break;
- case STATE:
- element = new StateComboElement(this, parentElement, labelString,
- (State) selection, style);
- break;
- case SCOPE:
- element = new ScopeComboElement(this, parentElement, labelString,
- (Scope) selection, style);
- break;
- case MODIFIER:
- element = new ModifierComboElement(this, parentElement,
- labelString, (Modifier) selection, style);
- break;
- case STATISTICAL_MEASURE:
- element = new StatisticalMeasureComboElement(this, parentElement,
- labelString, (StatisticalMeasure) selection, style);
- break;
- case DETERMINATION_MODIFIER:
- element = new DeterminationModifierComboElement(this,
- parentElement, labelString,
- (DeterminationModifier) selection, style);
- break;
- case REFERENCE_SYSTEM:
- element = new ReferenceSystemComboElement(this, parentElement,
- labelString, (ReferenceSystem) selection, style);
- break;
- }
-
+
+ public <T extends DefinedTermBase> TermComboElement<T> createTermComboElement(
+ Class<T> termComboType, ICdmFormElement parentElement,
+ String labelString, T selection, int style) {
+ TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termComboType, labelString, selection, style);
adapt(element);
parentElement.addElement(element);
return element;
}
- public static enum EnumComboType {
- REFERENCETYPE, NOMENCLATURALCODE
- }
-
/**
* <p>
* createEnumComboElement
*
* @param enumComboType
* a
- * {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EnumComboType}
+ * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
* object.
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param style
* a int.
* @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
* object.
*/
- public AbstractEnumComboElement createEnumComboElement(
- EnumComboType enumComboType, ICdmFormElement parentElement,
+ public <T extends IDefinedTerm> EnumComboElement<T> createEnumComboElement(
+ Class<T> enumComboType, ICdmFormElement parentElement,
int style) {
- AbstractEnumComboElement element = null;
-
- switch (enumComboType) {
- case REFERENCETYPE:
- element = new ReferenceTypeComboElement(this, parentElement,
- "Reference Type", null, style);
- break;
- case NOMENCLATURALCODE:
- element = new NomenclaturalCodeComboElement(this, parentElement,
- "Nomenclatural Code", null, style);
- break;
- }
+ EnumComboElement<T> element = new EnumComboElement<T>(this, parentElement, enumComboType, style);
adapt(element);
parentElement.addElement(element);
return element;
* @param style
* a int.
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.BrowserElement} object.
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement} object.
*/
public BrowserElement createBrowserElement(ICdmFormElement parentElement,
URI imageUri, int style) {
* </p>
*
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param imageUri
* a {@link java.net.URI} object.
* @param style
* a int.
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.ImageElement} object.
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
*/
public ImageElement createImageElement(ICdmFormElement parentElement,
URI imageUri, int style) {
* @param style
* a int.
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param buttonLabel
* a {@link java.lang.String} object.
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.TextActionElement}
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
* object.
*/
public TextActionElement createTextActionElement(
return element;
}
- /**
- *
- * @author n.hoffmann
- * @created Mar 5, 2010
- * @version 1.0
- */
- public static enum SelectionType {
- AGENT, INSTITUTION, NAME, REFERENCE, TAXON_BASE, TAXON, SYNONYM, TEAM, AUTHOR_TEAM, PERSON, DERIVED_UNIT, FIELD_OBSERVATION, FEATURE_TREE, CLASSIFICATION, TAXON_NODE, COLLECTION, FEATURE, POLYTOMOUS_KEY, POLYTOMOUS_KEY_NODE, USER, GROUP
- }
-
/**
* <p>
* createCheckbox
* </p>
*
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param label
* a {@link java.lang.String} object.
* a boolean.
* @param style
* a int.
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.CheckboxElement} object.
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement} object.
*/
public CheckboxElement createCheckbox(ICdmFormElement parentElement,
String label, boolean initialState, int style) {
*
* @return the section widget
* @param section
- * a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
*/
public Section adapt(AbstractFormSection section) {
* </p>
*
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param labelString
* a {@link java.lang.String} object.
* a boolean.
* @param style
* a int.
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.ToggleableTextElement}
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
* object.
*/
public ToggleableTextElement createToggleableTextField(
* </p>
*
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param labelString
* a {@link java.lang.String} object.
* a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
* @param style
* a int.
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.TimePeriodElement}
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
* object.
*/
public TimePeriodElement createTimePeriodElement(
* @param style
* a int.
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param point
* a {@link eu.etaxonomy.cdm.model.location.Point} object.
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.PointElement} object.
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
*/
public PointElement createPointElement(ICdmFormElement parentElement,
Point point, int style) {
* </p>
*
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param style
* a int.
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.DateDetailSection}
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
* object.
*/
public DateDetailSection createDateDetailSection(
* </p>
*
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param labelString
* a {@link java.lang.String} object.
* a {@link org.joda.time.Partial} object.
* @param style
* a int.
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.PartialElement} object.
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement} object.
*/
public PartialElement createPartialElement(ICdmFormElement parentElement,
String labelString, Partial partial, int style) {
* </p>
*
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param style
* a int.
int style) {
Label separator = this.createSeparator(
parentElement.getLayoutComposite(), SWT.HORIZONTAL | style);
- separator.setLayoutData(FILL_HORIZONTALLY());
+ separator.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
return separator;
}
* </p>
*
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param entity
* a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
parentElement.addElement(element);
return element;
}
+
+ /**
+ * @param cdmBaseSection
+ * @param object
+ * @param style
+ * @return
+ */
+ public CdmBaseElement createCdmBaseElement(ICdmFormElement parentElement,
+ CdmBase entity, int style) {
+ CdmBaseElement element = new CdmBaseElement(this, parentElement,
+ entity, style);
+ adapt(element);
+ parentElement.addElement(element);
+ return element;
+ }
+
/**
* <p>
* </p>
*
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param style
* a int.
adapt(section);
return section;
}
+
+ /**
+ * @param parent
+ * @param i
+ * @return
+ */
+ public CdmBaseSection createCdmBaseSection(ICdmFormElement parentElement, int style) {
+ CdmBaseSection section = new CdmBaseSection(this, parentElement, style);
+ parentElement.addElement(section);
+ adapt(section);
+ return section;
+ }
/**
* <p>
* </p>
*
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
*/
* </p>
*
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @return a
* {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
* </p>
*
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param parserProblem
* a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
HYBRID,
USER,
GROUP,
- DETERMINATION
+ DETERMINATION,
+ TAXON_RELATIONSHIP,
+ REFERENCED_ENTITY,
+ TERM_VOCABULARY,
+ NAMED_AREA,
+ NAMED_AREA_LEVEL,
+ USE_RECORD
+ }
+
+ public AbstractFormSection createDefinedTermDetailSection(Class definedTermClass,
+ ConversationHolder conversation, ICdmFormElement parentElement,
+ ISelectionProvider selectionProvider, int style) {
+
+ AbstractFormSection section = new DefinedTermDetailSection(this, definedTermClass, conversation, parentElement, selectionProvider, style);
+
+ parentElement.addElement(section);
+ adapt(section);
+ return section;
+
+ }
+
+ /**
+ * @param definedTermClass
+ * @param formElement
+ * @param style
+ * @return
+ */
+ public AbstractCdmDetailElement createDefinedTermDetailElement(
+ Class definedTermClass, AbstractCdmDetailSection parentElement,
+ int style) {
+ AbstractCdmDetailElement element = null;
+
+ if (NamedArea.class.isAssignableFrom(definedTermClass)){
+ element = new eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement(this, parentElement);
+ }
+ else {
+ element = new DefinedTermDetailElement(this, parentElement);
+ }
+
+ adapt(element);
+ parentElement.addElement(element);
+ return element;
}
/**
*
* @param detailType
* a
- * {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType}
+ * {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType}
* object.
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param selectionProvider
* a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
* @param conversation
* a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
* object.
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
*/
public AbstractFormSection createCdmDetailSection(DetailType detailType,
case DETERMINATION:
section = new DeterminationDetailSection(this, conversation, parentElement,
selectionProvider, style);
+ break;
+ case TAXON_RELATIONSHIP:
+ section = new TaxonRelationshipDetailSection(this, conversation, parentElement,
+ selectionProvider, style);
+ break;
+ case REFERENCED_ENTITY:
+ section = new ReferencedEntityDetailSection(this, conversation, parentElement,
+ selectionProvider, style);
+ break;
+ case TERM_VOCABULARY:
+ section = new TermVocabularyDetailSection(this, conversation, parentElement,
+ selectionProvider, style);
+ break;
+ case NAMED_AREA:
+ section = new NamedAreaDetailSection(this, conversation, parentElement,
+ selectionProvider, style);
+ break;
+ case USE_RECORD:
+ section = new UseRecordDetailSection(this, conversation, parentElement,
+ selectionProvider, style);
+ break;
}
+
if (section == null) {
throw new RuntimeException(
return section;
}
+
+
/**
* <p>
* createCdmDetailElement
*
* @param detailType
* a
- * {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType}
+ * {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType}
* object.
* @param style
* a int.
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @return a
* {@link eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement}
case DETERMINATION:
element = new DeterminationDetailElement(this, parentElement);
break;
+ case TAXON_RELATIONSHIP:
+ element = new TaxonRelationshipDetailElement(this, parentElement);
+ break;
+ case REFERENCED_ENTITY:
+ element = new RefereneEntityDetailElement(this, parentElement);
+ break;
+ case TERM_VOCABULARY:
+ element = new TermVocabularyDetailElement(this, parentElement);
+ break;
+ case NAMED_AREA:
+ element = new eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement(this, parentElement);
+ break;
+ case NAMED_AREA_LEVEL:
+ element = new DefinedTermDetailElement<NamedAreaLevel>(this, parentElement);
+ break;
+ case USE_RECORD:
+ //element = new UseRecordDetailElement(this, parentElement, style);
+ element = new UseRecordDetailElement(this, parentElement);
+ break;
}
if (element == null) {
* @version 1.0
*/
public static enum EntityDetailType {
- TEAM, TEAMMEMBER, ANNOTATION, CREDIT, DESCRIPTIONELEMENTSOURCE, EXTENSION, MARKER, MEDIA, DESCRIPTIONELEMENTMEDIA, MEDIAREPRESENTATION, MEDIAREPRESENTATIONPART, MODIFIER, NOMENCLATURALSTATUS, NAME_RELATIONSHIP, PROTOLOG, RIGHTS, SOURCE, SCOPE, DESCRIPTIONSOURCE, TYPEDESIGNATION, STATE_DATA, STATISTICAL_MEASUREMENT_VALUE, DESCRIBED_SPECIMEN, COLLECTING_AREA, DETERMINATION_EVENT, SPECIMEN_COLLECTION, IDENTIFIABLE_SOURCE_COLLECTION, GEOGRAPHICAL_SCOPE, SCOPE_RESTRICTION, MEMBER, GRANTED_AUTHORITY, GROUPS_BY_USER, TAXONOMIC_SCOPE, DETERMINATION_CURRENT, DETERMINATION_HISTORY
+ TEAM,
+ TEAMMEMBER,
+ ANNOTATION,
+ CREDIT,
+ DESCRIPTIONELEMENTSOURCE,
+ EXTENSION,
+ MARKER,
+ MEDIA,
+ DESCRIPTIONELEMENTMEDIA,
+ MEDIAREPRESENTATION,
+ MEDIAREPRESENTATIONPART,
+ MODIFIER,
+ NOMENCLATURALSTATUS,
+ NAME_RELATIONSHIP,
+ PROTOLOG,
+ RIGHTS,
+ SOURCE,
+ SCOPE,
+ DESCRIPTIONSOURCE,
+ TYPEDESIGNATION,
+ STATE_DATA,
+ STATISTICAL_MEASUREMENT_VALUE,
+ DESCRIBED_SPECIMEN,
+ COLLECTING_AREA,
+ DETERMINATION_EVENT,
+ SPECIMEN_COLLECTION,
+ IDENTIFIABLE_SOURCE_COLLECTION,
+ GEOGRAPHICAL_SCOPE,
+ SCOPE_RESTRICTION,
+ MEMBER,
+ GRANTED_AUTHORITY,
+ GROUPS_BY_USER,
+ TAXONOMIC_SCOPE,
+ DETERMINATION_CURRENT,
+ DETERMINATION_HISTORY
}
/**
*
* @param entityDetailType
* a
- * {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType}
+ * {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType}
* object.
* @param style
* a int.
* a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
* object.
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
*/
public AbstractFormSection createEntityDetailSection(
* @param style
* a int.
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
* @param versionableEntity
* a {@link eu.etaxonomy.cdm.model.common.IVersionableEntity}
/**
* <p>
- * createSelectionElement
+ * Creates a selection element for the given type T.
+ * </p>
+ * <p>
+ * <strong>Selection elements not handled by this method:</strong>
+ * <ul>
+ * <li>{@link TaxonNodeSelectionElement} see {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}</li>
+ * <li>{@link NomenclaturalAuthorTeamSelectionElement} see {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}</li>
+ * </ul>
* </p>
*
- * @param selectionType
- * a
- * {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType}
- * object.
+ * @param clazz
+ * a {@link Class} object of the type that you want the selection element to handle
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link ICdmFormElement}
* object.
* @param labelString
- * a {@link java.lang.String} object.
+ * a {@link String} object.
* @param selectionType
* @param selection
- * a {@link eu.etaxonomy.cdm.model.common.IAnnotatableEntity}
- * object.
+ * a {@link ICdmBase} object.
* @param style
* a int.
* @param conversation
- * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
- * object.
+ * a {@link ConversationHolder} object.
* @return a
- * {@link eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement}
+ * {@link EntitySelectionElement}
* object.
*/
- public AbstractSelectionElement createSelectionElement(
- SelectionType selectionType, ConversationHolder conversation,
+ public <T extends ICdmBase> EntitySelectionElement<T> createSelectionElement(
+ Class<T> clazz, ConversationHolder conversation,
ICdmFormElement parentElement, String labelString,
- ICdmBase selection, int mode, int style) {
- AbstractSelectionElement element = null;
-
- IAnnotatableEntity entity = (IAnnotatableEntity) HibernateProxyHelper
- .deproxy(selection);
-
- switch (selectionType) {
- case AGENT:
- element = new AgentSelectionElement(this, conversation,
- parentElement, labelString, (TeamOrPersonBase) entity,
- mode, style);
- break;
- case PERSON:
- element = new PersonSelectionElement(this, conversation,
- parentElement, labelString, (Person) entity, mode, style);
- break;
- case TEAM:
- element = new TeamSelectionElement(this, conversation,
- parentElement, labelString, (Team) entity, mode, style);
- break;
- case AUTHOR_TEAM:
- element = new NomenclaturalAuthorTeamSelectionElement(this,
- conversation, parentElement, labelString, (Team) entity,
- mode, style);
- break;
- case INSTITUTION:
- element = new InstitutionSelectionElement(this, conversation,
- parentElement, labelString, (Institution) entity, mode,
- style);
- break;
- case NAME:
- element = new NameSelectionElement(this, conversation,
- parentElement, labelString, (TaxonNameBase) entity, mode,
- style);
- break;
- case REFERENCE:
- element = new ReferenceSelectionElement(this, conversation,
- parentElement, labelString, (Reference) entity, mode, style);
- break;
- case TAXON_BASE:
- element = new TaxonBaseSelectionElement(this, conversation,
- parentElement, labelString, (TaxonBase) entity, mode, style);
- break;
- case TAXON:
- element = new TaxonSelectionElement(this, conversation,
- parentElement, labelString, (Taxon) entity, mode, style);
- break;
- case SYNONYM:
- element = new SynonymSelectionElement(this, conversation,
- parentElement, labelString, (Synonym) entity, mode, style);
- break;
- case DERIVED_UNIT:
- element = new DerivedUnitBaseSelectionElement(this, conversation,
- parentElement, labelString, (DerivedUnitBase) entity, mode,
- style);
- break;
- case FIELD_OBSERVATION:
- element = new FieldObservationSelectionElement(this, conversation,
- parentElement, labelString, (FieldObservation) entity,
- mode, style);
- break;
- case FEATURE_TREE:
- element = new FeatureTreeSelectionElement(this, conversation,
- parentElement, labelString, (FeatureTree) entity, mode,
- style);
- break;
- case CLASSIFICATION:
- element = new ClassificationSelectionElement(this, conversation,
- parentElement, labelString, (Classification) entity, mode,
- style);
- break;
- case TAXON_NODE:
- element = new TaxonNodeSelectionElement(this, conversation,
- parentElement, labelString, (TaxonNode) entity, mode, style);
- break;
- case COLLECTION:
- element = new CollectionSelectionElement(this, conversation,
- parentElement, labelString, (Collection) entity, mode,
- style);
- break;
- case FEATURE:
- element = new FeatureSelectionElement(this, conversation,
- parentElement, labelString, (Feature) entity, mode, style);
- break;
- case POLYTOMOUS_KEY:
- element = new PolytomousKeySelectionElement(this, conversation,
- parentElement, labelString, (PolytomousKey) entity, mode,
- style);
- break;
- case POLYTOMOUS_KEY_NODE:
- element = new PolytomousKeyNodeSelectionElement(this, conversation,
- parentElement, labelString, (PolytomousKeyNode) entity,
- mode, style);
- break;
- case USER:
- element = new UserSelectionElement(this, conversation,
- parentElement, labelString, (User) entity, mode, style);
- break;
- case GROUP:
- element = new GroupSelectionElement(this, conversation,
- parentElement, labelString, (Group) entity, mode, style);
- break;
- default:
- new RuntimeException(
- "There is no selection composite for the desired selection type.");
- break;
- }
-
+ T selection, int mode, int style) {
+ EntitySelectionElement<T> element = new EntitySelectionElement<T>(this, conversation, parentElement, clazz, labelString, selection, mode, style);
adapt(element);
parentElement.addElement(element);
return element;
}
-
- /**
- * <p>
- * createNamedAreaSelectionElement
- * </p>
- *
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
- * object.
- * @param conversation
- * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
- * object.
- * @param labelString
- * a {@link java.lang.String} object.
- * @param selection
- * a {@link eu.etaxonomy.cdm.model.location.NamedArea} object.
- * @param style
- * a int.
- * @return a
- * {@link eu.etaxonomy.taxeditor.ui.selection.NamedAreaSelectionElement}
- * object.
- */
- public NamedAreaSelectionElement createNamedAreaSelectionElement(
- ICdmFormElement parentElement, ConversationHolder conversation,
- String labelString, NamedArea selection, int style) {
- NamedAreaSelectionElement element = new NamedAreaSelectionElement(this,
- conversation, parentElement, labelString, selection,
- AbstractSelectionElement.NOTHING, style);
+
+ public TaxonNodeSelectionElement createTaxonNodeSelectionElement(
+ ConversationHolder conversation,
+ ICdmFormElement parentElement, String labelString,
+ TaxonNode selection, int mode, int style) {
+ TaxonNodeSelectionElement element = new TaxonNodeSelectionElement(this, conversation, parentElement, labelString, selection, mode, style);
adapt(element);
parentElement.addElement(element);
return element;
}
-
+
+ public NomenclaturalAuthorTeamSelectionElement createNomenclaturalAuthorTeamSelectionElement(
+ ConversationHolder conversation,
+ ICdmFormElement parentElement, String labelString,
+ Team selection, int mode, int style) {
+ NomenclaturalAuthorTeamSelectionElement element = new NomenclaturalAuthorTeamSelectionElement(this, conversation, parentElement, labelString, selection, mode, style);
+ adapt(element);
+ parentElement.addElement(element);
+ return element;
+ }
+
+
/** {@inheritDoc} */
public LabelElement createLabel(ICdmFormElement parentElement, String text) {
LabelElement labelElement = new LabelElement(this, parentElement, text);
* </p>
*
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param entity
* a
// text.addFocusListener(visibilityHandler);
return text;
}
+
+
+
+
+
+
}
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import org.eclipse.jface.util.PropertyChangeEvent;
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
*
* @param initialState a boolean.
* @param style a int.
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param labelString a {@link java.lang.String} object.
*/
protected CheckboxElement(CdmFormFactory formFactory, ICdmFormElement parentElement, String labelString, boolean initialState,
}
checkbox = formFactory.createButton(getLayoutComposite(), null, SWT.CHECK | style);
- checkbox.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+ checkbox.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
checkbox.setSelection(initialState);
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.widgets.Text;
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param style
* a int.
*/
protected DateDetailSection(CdmFormFactory formFactory,
ICdmFormElement parentElement, int style) {
- super(formFactory, null, parentElement, style);
+ super(formFactory, parentElement, style);
partialElement_start = formFactory.createPartialElement(this,
"Start: ", null, style);
text_parseText = formFactory.createTextWithLabelElement(this, "Parse",
null, style);
text_parseText.getMainControl().setLayoutData(
- CdmFormFactory.FILL_HORIZONTALLY(6, 1));
+ LayoutConstants.FILL_HORIZONTALLY(6, 1));
text_freeText = formFactory.createTextWithLabelElement(this,
"Freetext", null, style);
text_freeText.getMainControl().setLayoutData(
- CdmFormFactory.FILL_HORIZONTALLY(6, 1));
+ LayoutConstants.FILL_HORIZONTALLY(6, 1));
formFactory.addPropertyChangeListener(this);
}
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import java.util.List;
/**
* <p>addElement</p>
*
- * @param element a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param element a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
*/
public abstract void addElement(ICdmFormElement element);
/**
* <p>getParentElement</p>
*
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
*/
public abstract ICdmFormElement getParentElement();
/**
* <p>containsFormElement</p>
*
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @return a boolean.
*/
public boolean containsFormElement(ICdmFormElement formElement);
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
/**
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
/**
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
/**
/**
* <p>addExceptionHandler</p>
*
- * @param handler a {@link eu.etaxonomy.taxeditor.ui.forms.IExceptionHandler} object.
+ * @param handler a {@link eu.etaxonomy.taxeditor.ui.element.IExceptionHandler} object.
*/
public void addExceptionHandler(IExceptionHandler handler);
/**
* <p>removeExceptionHandler</p>
*
- * @param handler a {@link eu.etaxonomy.taxeditor.ui.forms.IExceptionHandler} object.
+ * @param handler a {@link eu.etaxonomy.taxeditor.ui.element.IExceptionHandler} object.
*/
public void removeExceptionHandler(IExceptionHandler handler);
/**
* <p>exceptionOccurred</p>
*
- * @param event a {@link eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent} object.
+ * @param event a {@link eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent} object.
*/
public void exceptionOccurred(CdmPropertyChangeEvent event);
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
/**
/**
* <p>handleException</p>
*
- * @param event a {@link eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent} object.
+ * @param event a {@link eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent} object.
*/
void handleException(CdmPropertyChangeEvent event);
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
/**
/**
*
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
/**
* Notify registeres listeners of changed properties
*
- * @param event a {@link eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent} object.
+ * @param event a {@link eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent} object.
*/
public void firePropertyChangeEvent(CdmPropertyChangeEvent event);
}
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
/**
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
/**
* Returns this elements selection arbitrator
*
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator} object.
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator} object.
*/
public SelectionArbitrator getSelectionArbitrator();
}
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import java.io.IOException;
import java.io.InputStream;
/**
* <p>Constructor for ImageElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param imageUri a {@link java.net.URI} object.
* @param style a int.
*/
super(formFactory, parentElement);
container = new Composite(getLayoutComposite(), style);
- container.setLayoutData(CdmFormFactory.FILL(2, 1));
+ container.setLayoutData(LayoutConstants.FILL(2, 1));
container.addPaintListener(this);
}
/** {@inheritDoc} */
@Override
public void paintControl(PaintEvent e) {
- TableWrapData layoutData = CdmFormFactory.FILL(2, 1);
+ TableWrapData layoutData = LayoutConstants.FILL(2, 1);
Control control = (Control) e.widget;
if(image != null){
Rectangle imageMaxBounds = calculateImageBounds(image, control);
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import org.eclipse.jface.util.PropertyChangeEvent;
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import java.util.Map;
import java.util.Map.Entry;
import org.eclipse.swt.widgets.Table;
import org.eclipse.ui.forms.widgets.TableWrapData;
+
/**
* <p>KeyValueViewerElement class.</p>
*
/**
* <p>Constructor for KeyValueViewerElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param keyHeading a {@link java.lang.String} object.
* @param valueHeading a {@link java.lang.String} object.
* @param map a {@link java.util.Map} object.
super(formFactory, formElement);
label = formFactory.createLabel(getLayoutComposite(), "Meta Data");
- label.setLayoutData(CdmFormFactory.FILL(2, 1));
+ label.setLayoutData(LayoutConstants.FILL(2, 1));
addControl(label);
tableViewer = new TableViewer(formElement.getLayoutComposite(), SWT.MULTI | SWT.H_SCROLL
createColumns(tableViewer, keyHeading, valueHeading);
- TableWrapData layoutData = CdmFormFactory.FILL(2, 1);
+ TableWrapData layoutData = LayoutConstants.FILL(2, 1);
layoutData.heightHint = 100;
tableViewer.getControl().setLayoutData(layoutData);
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Label;
/**
* <p>Constructor for LabelElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param text a {@link java.lang.String} object.
*/
public LabelElement(CdmFormFactory formFactory, ICdmFormElement formElement, String text) {
super(formFactory, formElement);
label = formFactory.createLabel(getLayoutComposite(), text, SWT.WRAP);
- label.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+ label.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
addControl(label);
}
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import org.eclipse.swt.events.ModifyEvent;
/**
* <p>Constructor for LanguageStringWithLabelElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param labelString a {@link java.lang.String} object.
* @param languageString a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
* @param style a int.
/**
* <p>Constructor for LanguageStringWithLabelElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param labelString a {@link java.lang.String} object.
* @param languageString a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
* @param height a int.
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2009 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.element;
+
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+
+/**
+ * @author n.hoffmann
+ * @date Jan 25, 2012
+ *
+ */
+public class LayoutConstants {
+
+ /**
+ * <p>
+ * LAYOUT
+ * </p>
+ *
+ * @return a {@link org.eclipse.ui.forms.widgets.TableWrapLayout} object.
+ */
+ public static final TableWrapLayout LAYOUT() {
+ return LayoutConstants.LAYOUT(1, false);
+ }
+
+ /**
+ * <p>
+ * LAYOUT
+ * </p>
+ *
+ * @param columns
+ * a int.
+ * @param equalWidth
+ * a boolean.
+ * @return a {@link org.eclipse.ui.forms.widgets.TableWrapLayout} object.
+ */
+ public static final TableWrapLayout LAYOUT(int columns, boolean equalWidth) {
+ TableWrapLayout layout = new TableWrapLayout();
+ layout.topMargin = 0;
+ layout.rightMargin = 0;
+ layout.bottomMargin = 0;
+ layout.leftMargin = 0;
+ layout.numColumns = columns;
+ layout.makeColumnsEqualWidth = equalWidth;
+ layout.verticalSpacing = 0;
+ layout.horizontalSpacing = 0;
+ return layout;
+ }
+
+ /**
+ * <p>
+ * FILL
+ * </p>
+ *
+ * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
+ */
+ public static final TableWrapData FILL() {
+ return LayoutConstants.FILL(1, 1);
+ }
+
+ /**
+ * <p>
+ * FILL
+ * </p>
+ *
+ * @param horizontalSpan
+ * a int.
+ * @param verticalSpan
+ * a int.
+ * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
+ */
+ public static final TableWrapData FILL(int horizontalSpan, int verticalSpan) {
+ TableWrapData layoutData = new TableWrapData(TableWrapData.FILL_GRAB,
+ TableWrapData.FILL_GRAB);
+ layoutData.colspan = horizontalSpan;
+ layoutData.rowspan = verticalSpan;
+ return layoutData;
+ }
+
+ /**
+ * <p>
+ * LEFT
+ * </p>
+ *
+ * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
+ */
+ public static final TableWrapData LEFT() {
+ return new TableWrapData(TableWrapData.LEFT, TableWrapData.TOP);
+ }
+
+ /**
+ * <p>
+ * RIGHT
+ * </p>
+ *
+ * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
+ */
+ public static final TableWrapData RIGHT() {
+ return new TableWrapData(TableWrapData.RIGHT, TableWrapData.TOP);
+ }
+
+ /**
+ * <p>
+ * FILL_HORIZONTALLY
+ * </p>
+ *
+ * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
+ */
+ public static final TableWrapData FILL_HORIZONTALLY() {
+ return LayoutConstants.FILL_HORIZONTALLY(1, 1);
+ }
+
+ /**
+ * <p>
+ * FILL_HORIZONTALLY
+ * </p>
+ *
+ * @param horizontalSpan
+ * a int.
+ * @param verticalSpan
+ * a int.
+ * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
+ */
+ public static final TableWrapData FILL_HORIZONTALLY(int horizontalSpan,
+ int verticalSpan) {
+ TableWrapData layoutData = new TableWrapData(TableWrapData.FILL_GRAB,
+ TableWrapData.TOP);
+ layoutData.colspan = horizontalSpan;
+ layoutData.rowspan = verticalSpan;
+ return layoutData;
+ }
+
+}
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
import java.util.Map;
import eu.etaxonomy.cdm.model.common.Language;
import eu.etaxonomy.cdm.model.common.LanguageString;
import eu.etaxonomy.cdm.model.common.MultilanguageTextHelper;
+import eu.etaxonomy.taxeditor.model.DefaultTermComparator;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.term.EmptyComboElement;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
import eu.etaxonomy.taxeditor.ui.translation.TranslationWizard;
/**
SelectionListener {
private class OpenTranslationWizard extends SelectionAdapter {
- private final Map<Language, LanguageString> multilanguageText;
-
- public OpenTranslationWizard(
- Map<Language, LanguageString> multilanguageText) {
+
+ public OpenTranslationWizard() {
super();
- this.multilanguageText = multilanguageText;
}
/*
*/
@Override
public void widgetSelected(SelectionEvent e) {
+ Map<Language, LanguageString> multilanguageText = getMultilanguageText();
+
+ if (multilanguageText == null){
+ StoreUtil.warningDialog("No text to transalte", getClass(), "The text is empty and therefore can not be translated");
+ }
+
TranslationWizard wizard = new TranslationWizard(multilanguageText);
WizardDialog dialog = new WizardDialog(getLayoutComposite()
.getShell(), wizard);
}
}
- private EmptyComboElement<Language> combo_language;
+ private TermComboElement<Language> combo_language;
protected LanguageStringWithLabelElement element_languageString;
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param labelString
* a {@link java.lang.String} object.
formFactory.addPropertyChangeListener(this);
- element_languageString = formFactory
+ element_languageString = this.formFactory
.createLanguageStringWithLabelElement(formElement, labelString,
null, textHeight, style);
if (PreferencesUtil.isMultilanguageTextEditingCapability()) {
- combo_language = (EmptyComboElement<Language>) formFactory
- .createTermComboElement(TermComboType.EMPTY, formElement,
- "", null, style);
- combo_language.addSelectionListener(this);
- addControl(formFactory.createLabel(getLayoutComposite(), ""));
- button = formFactory.createButton(getLayoutComposite(),
- "Open In Translation Editor", SWT.PUSH);
- addControl(button);
- button.setLayoutData(CdmFormFactory.RIGHT());
- button.addSelectionListener(new OpenTranslationWizard(
- multilanguageText));
+ createMultilanguageTextEditingElements(formElement,
+ multilanguageText, style);
}
setMultilanguageText(multilanguageText);
}
+ private void createMultilanguageTextEditingElements(
+ ICdmFormElement formElement,
+ Map<Language, LanguageString> multilanguageText, int style) {
+ combo_language = formFactory
+ .createTermComboElement(Language.class, formElement,
+ "", null, style);
+ combo_language.addSelectionListener(this);
+ addControl(formFactory.createLabel(getLayoutComposite(), ""));
+ button = formFactory.createButton(getLayoutComposite(),
+ "Open In Translation Editor", SWT.PUSH);
+ addControl(button);
+ button.setLayoutData(LayoutConstants.RIGHT());
+ button.addSelectionListener(new OpenTranslationWizard());
+ }
+
private List<Language> getLanguages() {
ArrayList<Language> languageList = new ArrayList<Language>(
getMultilanguageText().keySet());
- // TODO sort
+ Collections.sort(languageList, new DefaultTermComparator<Language>());
return languageList;
}
}
if (PreferencesUtil.isMultilanguageTextEditingCapability()) {
combo_language.setTerms(getLanguages());
+ button.setEnabled(false);
}
updateControls();
}
element_languageString.setLanguageString(preferredLanguageString);
if (PreferencesUtil.isMultilanguageTextEditingCapability()) {
combo_language.setSelection(preferredLanguageString.getLanguage());
- }
+ button.setEnabled(true);
+ }
}
/**
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
/**
* <p>Constructor for NumberWithLabelElement.</p>
*
- * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param labelString a {@link java.lang.String} object.
* @param initialInteger a {@link java.lang.Integer} object.
* @param style a int.
/**
* <p>Constructor for NumberWithLabelElement.</p>
*
- * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param labelString a {@link java.lang.String} object.
* @param initialFloat a {@link java.lang.Float} object.
* @param style a int.
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.graphics.Color;
/**
* <p>Constructor for PartialElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param formElement a {@link eu.etaxonomy.taxeditor.forms.ICdmFormElement} object.
* @param labelString a {@link java.lang.String} object.
* @param style a int.
ICdmFormElement formElement, String labelString, int style) {
super(formFactory, formElement);
- formElement.getLayoutComposite().setLayout(CdmFormFactory.LAYOUT(7, false));
+ formElement.getLayoutComposite().setLayout(LayoutConstants.LAYOUT(7, false));
label = formFactory.createLabel(getLayoutComposite(), labelString);
addControl(label);
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import java.text.ParseException;
import org.eclipse.jface.util.PropertyChangeEvent;
import eu.etaxonomy.cdm.model.location.Point;
+import eu.etaxonomy.cdm.model.location.ReferenceSystem;
import eu.etaxonomy.taxeditor.preference.Resources;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.term.ReferenceSystemComboElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
/**
* <p>
private final TextWithLabelElement text_latitude;
private final TextWithLabelElement text_longitude;
private final NumberWithLabelElement number_errorRadius;
- private final ReferenceSystemComboElement combo_referenceSystem;
+ private final TermComboElement<ReferenceSystem> combo_referenceSystem;
private final TextWithLabelElement text_latitudeParsed;
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param point
* a {@link eu.etaxonomy.cdm.model.location.Point} object.
text_longitudeParsed.setEnabled(false);
number_errorRadius = formFactory.createIntegerTextWithLabelElement(
formElement, "Error Radius (m)", null, style);
- combo_referenceSystem = (ReferenceSystemComboElement) formFactory
- .createTermComboElement(TermComboType.REFERENCE_SYSTEM,
+ combo_referenceSystem = formFactory
+ .createTermComboElement(ReferenceSystem.class,
formElement, "Reference System", null, style);
setPoint(point);
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Composite;
+
/**
* <p>RootElement class.</p>
*
/**
* <p>Constructor for RootElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param layoutComposite a {@link org.eclipse.swt.widgets.Composite} object.
*/
public RootElement(CdmFormFactory formFactory, Composite layoutComposite) {
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import java.util.HashSet;
import java.util.Set;
/**
* <p>Constructor for SelectionArbitrator.</p>
*
- * @param selectableComposite a {@link eu.etaxonomy.taxeditor.ui.forms.IEntityElement} object.
+ * @param selectableComposite a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement} object.
*/
public SelectionArbitrator(IEntityElement selectableComposite){
this.entityElement = selectableComposite;
/**
* <p>Getter for the field <code>entityElement</code>.</p>
*
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.IEntityElement} object.
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement} object.
*/
public IEntityElement getEntityElement() {
return entityElement;
/**
* <p>setEntityComposite</p>
*
- * @param entityElement a {@link eu.etaxonomy.taxeditor.ui.forms.IEntityElement} object.
+ * @param entityElement a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement} object.
*/
public void setEntityComposite(IEntityElement entityElement) {
this.entityElement = entityElement;
/**
*
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
* <p>Constructor for TextActionElement.</p>
*
* @param style a int.
- * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param labelString a {@link java.lang.String} object.
* @param buttonLabel a {@link java.lang.String} object.
* @param initialText a {@link java.lang.String} object.
addControl(label);
box = formFactory.createComposite(getLayoutComposite());
- box.setLayout(CdmFormFactory.LAYOUT(2, false));
- box.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+ box.setLayout(LayoutConstants.LAYOUT(2, false));
+ box.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
addControl(box);
text = toolkit.createText(box, "", style);
addControl(text);
- text.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+ text.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
setText(CdmUtils.Nz(initialText));
/**
*
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.KeyAdapter;
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param labelString
* a {@link java.lang.String} object.
label = formFactory.createLabel(getLayoutComposite(),
CdmUtils.Nz(labelString), SWT.NULL);
addControl(label);
- label.setLayoutData(CdmFormFactory.LEFT());
+ label.setLayoutData(LayoutConstants.LEFT());
}
int scrollStyle = textHeight == null ? SWT.NULL
});
}
- TableWrapData layoutData = CdmFormFactory.FILL();
+ TableWrapData layoutData = LayoutConstants.FILL();
if (textHeight != null && textHeight > 0) {
(layoutData).heightHint = textHeight;
}
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.graphics.Color;
* @param style
* a int.
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param labelString
* a {@link java.lang.String} object.
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import java.util.HashSet;
import java.util.Set;
* <p>Constructor for ToggleableTextElement.</p>
*
* @param style a int.
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param labelString a {@link java.lang.String} object.
* @param initialText a {@link java.lang.String} object.
* @param initialState a boolean.
addControl(label);
container = formFactory.createComposite(getLayoutComposite(), SWT.WRAP);
- container.setLayout(CdmFormFactory.LAYOUT(2, false));
- container.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+ container.setLayout(LayoutConstants.LAYOUT(2, false));
+ container.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
addControl(container);
text_cache = formFactory.createText(container, initialText, SWT.WRAP | SWT.MULTI);
addControl(text_cache);
text_cache.addModifyListener(this);
- text_cache.setLayoutData(CdmFormFactory.FILL());
+ text_cache.setLayoutData(LayoutConstants.FILL());
// Don't accept carriage returns as input
text_cache.addKeyListener( new KeyAdapter(){
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
import java.net.URI;
import java.net.URISyntaxException;
+
/**
* @author n.hoffmann
* @created Dec 20, 2010
import eu.etaxonomy.cdm.ext.openurl.OpenUrlReference;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ImageElement;
-import eu.etaxonomy.taxeditor.ui.forms.RootElement;
+import eu.etaxonomy.taxeditor.ui.element.ImageElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.RootElement;
/**
* @author n.hoffmann
private Button button_next;
private Button button_previous;
- private OpenUrlReference reference;
-
private Composite container;
private Label label_pageNumber;
container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
scrolledForm = getWizard().getFormFactory().createScrolledForm(container);
- scrolledForm.getBody().setLayout(CdmFormFactory.LAYOUT(3, false));
+ scrolledForm.getBody().setLayout(LayoutConstants.LAYOUT(3, false));
scrolledForm.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true));
Composite buttonContainer = getWizard().getFormFactory().createComposite(container);
button_next.addSelectionListener(this);
button_next.setLayoutData(new GridData(SWT.RIGHT, SWT.BOTTOM, true, false));
- scrolledForm.getBody().setLayoutData(CdmFormFactory.FILL());
+ scrolledForm.getBody().setLayoutData(LayoutConstants.FILL());
rootElement = new RootElement(getWizard().getFormFactory(), scrolledForm.getBody());
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.editors.text.EditorsUI;
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
/**
* @author n.hoffmann
addControl(label);
button = formFactory.createButton(getLayoutComposite(), labelString, SWT.PUSH);
- button.setLayoutData(CdmFormFactory.RIGHT());
+ button.setLayoutData(LayoutConstants.RIGHT());
addControl(button);
button.addSelectionListener(this);
}
/**
* @return
*/
- private String getDetail() {
+ public String getDetail() {
return referenceDetail;
}
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
/**
* @author n.hoffmann
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms.password;
+package eu.etaxonomy.taxeditor.ui.password;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.SWT;
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
import eu.etaxonomy.cdm.model.common.User;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
/**
* @author n.hoffmann
String buttonLabelString = (labelString != null) ? labelString : "Change Password";
button = formFactory.createButton(getLayoutComposite(), buttonLabelString, SWT.PUSH);
- button.setLayoutData(CdmFormFactory.RIGHT());
+ button.setLayoutData(LayoutConstants.RIGHT());
addControl(button);
button.addSelectionListener(this);
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms.password;
+package eu.etaxonomy.taxeditor.ui.password;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.swt.widgets.Display;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
/**
* @author n.hoffmann
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.forms.password;
+package eu.etaxonomy.taxeditor.ui.password;
import org.eclipse.jface.dialogs.IInputValidator;
import org.eclipse.swt.SWT;
import eu.etaxonomy.cdm.api.service.IUserService;
import eu.etaxonomy.cdm.model.common.User;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
/**
private TextWithLabelElement text_passwordRepeat;
private PasswordValidator passwordValidator;
+ private UniqueUserNameValidator uniqueUsernameValidator;
+
/**
* @param formFactory
* @param conversation
super(formFactory, conversation, entity);
passwordValidator = new PasswordValidator();
+ uniqueUsernameValidator = new UniqueUserNameValidator();
}
/* (non-Javadoc)
@Override
public void createControl(Composite parent) {
Composite control = formFactory.createComposite(parent);
- control.setLayoutData(CdmFormFactory.FILL());
+ control.setLayoutData(LayoutConstants.FILL());
setPageComplete(false);
- control.setLayout(CdmFormFactory.LAYOUT(2, false));
+ control.setLayout(LayoutConstants.LAYOUT(2, false));
WizardPageRootElement rootElement = new WizardPageRootElement(formFactory, control, getConversationHolder());
if(!CdmStore.getLoginManager().isAdmin()){
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEnableableFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEntityElement;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectable;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEntityElement;
+import eu.etaxonomy.taxeditor.ui.element.ISelectable;
/**
* <p>
private T entity;
- private boolean enabled;
-
private boolean irrelevant;
/**
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param <T>
* a T object.
* Sets all field to the given enablement state except the objects in
* collection except
*
- * @see eu.etaxonomy.taxeditor.ui.forms.IEnableableFormElement#setEnabled(boolean)
+ * @see eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement#setEnabled(boolean)
* @param enabled
* a boolean.
* @param except
/** {@inheritDoc} */
public void setEnabled(boolean enabled) {
- this.enabled = enabled;
setEnabled(enabled, null);
}
* Create all content elements
*
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param entity
* a T object.
*
* @param event
* a
- * {@link eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent}
+ * {@link eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent}
* object.
*/
public void handleException(CdmPropertyChangeEvent event) {
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEnableableFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectableElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement;
+import eu.etaxonomy.taxeditor.ui.element.ISelectableElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
/**
* <p>
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param conversation
* a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
* object.
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param selectionProvider
* a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
public AbstractCdmDetailSection(CdmFormFactory formFactory,
ConversationHolder conversation, ICdmFormElement parentElement,
ISelectionProvider selectionProvider, int style) {
- super(formFactory, conversation, parentElement, selectionProvider,
+ super(formFactory, parentElement, selectionProvider,
Section.CLIENT_INDENT | style);
setText(getHeading());
createControls(this, SWT.NULL);
}
+
+ public AbstractCdmDetailSection(CdmFormFactory formFactory, Class<ENTITY> clazz,
+ ConversationHolder conversation, ICdmFormElement parentElement,
+ ISelectionProvider selectionProvider, int style) {
+ super(formFactory, parentElement, selectionProvider,
+ Section.CLIENT_INDENT | style);
+
+ setText(getHeading());
+
+ addExpansionListener(this);
+
+ createControlsByType(this, clazz, SWT.NULL);
+ }
+
+ /**
+ * @param abstractCdmDetailSection
+ * @param definedTermClass
+ * @param null1
+ */
+ protected void createControlsByType(
+ AbstractCdmDetailSection<ENTITY> abstractCdmDetailSection,
+ Class<ENTITY> entityClass, int style) {
+ }
+
/**
* <p>
* </p>
*
* @return a
- * {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType}
+ * {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType}
* object.
*/
protected abstract DetailType getDetailType();
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Layout;
import org.eclipse.ui.forms.widgets.TableWrapLayout;
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.model.ImageResources;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEntityElement;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectable;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEntityElement;
+import eu.etaxonomy.taxeditor.ui.element.ISelectable;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
/**
* <p>
* @param style
* a int.
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param section
- * a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
* @param entity
* a ENTITY object.
box.setBackgroundMode(SWT.INHERIT_DEFAULT);
addControl(box);
- TableWrapLayout boxLayout = CdmFormFactory.LAYOUT(2, false);
+ TableWrapLayout boxLayout = LayoutConstants.LAYOUT(2, false);
boxLayout.topMargin = 4;
boxLayout.bottomMargin = 4;
box.setLayout(boxLayout);
- box.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+ box.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
// box.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_BLUE));
setLayoutComposite(container);
addControl(container);
- Layout containerLayout = CdmFormFactory.LAYOUT(2, false);
+ Layout containerLayout = LayoutConstants.LAYOUT(2, false);
container.setLayout(containerLayout);
- container.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+ container.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
if (removeListener != null) {
button_remove = formFactory.createButton(box, null, SWT.PUSH);
addControl(button_remove);
- button_remove.setLayoutData(CdmFormFactory.RIGHT());
+ button_remove.setLayoutData(LayoutConstants.RIGHT());
button_remove.setImage(ImageResources
.getImage(ImageResources.TRASH_ICON));
button_remove.setToolTipText("Remove");
* </p>
*
* @param element
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param style
* a int.
import java.util.Collection;
-import org.apache.commons.collections.CollectionUtils;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.resource.ImageDescriptor;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.preference.Resources;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
/**
* <p>Abstract AbstractEntityCollectionSection class.</p>
* <p>Constructor for AbstractEntityCollectionSection.</p>
*
* @param conversation
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param title a {@link java.lang.String} object.
* @param <ENTITY> a ENTITY object.
* @param <ELEMENT> a ELEMENT object.
*/
public AbstractEntityCollectionSection(CdmFormFactory formFactory, ConversationHolder conversation, ICdmFormElement parentElement, String title, int style) {
- super(formFactory, conversation, parentElement, Section.CLIENT_INDENT | style);
+ super(formFactory, parentElement, Section.CLIENT_INDENT | style);
this.title = title;
this.setText(getTitleString());
showToolbar();
*/
@Override
public void setEntity(ENTITY entity) {
- if(entity != null && hasCollectionChanged(entity)){
+ if(entity != null){
super.setEntity(entity);
internalUpdateSection(false);
}
firePropertyChangeEvent(this);
}
- /**
- * Whether the entities specific collection changed
- *
- * @param newEntity
- * @return
- */
- private boolean hasCollectionChanged(ENTITY newEntity){
-
- // return true on null
- if(getEntity() == null || newEntity == null) return true;
-
- // if the entities differ the collection has changed
- if(! getEntity().equals(newEntity)) return true;
-
- Collection<ELEMENT> oldCollection = getCollection(getEntity());
- Collection<ELEMENT> newCollection = getCollection(newEntity);
-
- // return true on null
- if(oldCollection == null || newCollection == null) return true;
-
- // if the collections are object equal, check if the content is equal, too
- if(oldCollection.equals(newCollection)){
-
- boolean equal = CollectionUtils.isEqualCollection(oldCollection, newCollection);
- // return true when collections are not equal
- return equal ? false : true;
- }
- return true;
- }
-
/**
* Create the elements to be shown in this seciton client area
*/
* @param backgroundColor a {@link org.eclipse.swt.graphics.Color} object.
*/
protected void createElementComposite(ELEMENT element, SelectionListener removeListener, Color backgroundColor){
- AbstractEntityCollectionElement formElement = formFactory.createEntityCollectionElement(this, element, removeListener, backgroundColor, SWT.NULL);
+ formFactory.createEntityCollectionElement(this, element, removeListener, backgroundColor, SWT.NULL);
}
/* (non-Javadoc)
import java.util.Arrays;
import eu.etaxonomy.cdm.model.common.IIdentifiableEntity;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.ToggleableTextElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement;
/**
* @author n.hoffmann
import org.eclipse.swt.widgets.Label;
import eu.etaxonomy.cdm.model.common.VersionableEntity;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
/**
* <p>EmptyElement class.</p>
* <p>Constructor for EmptyElement.</p>
*
* @param style a int.
- * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param entity a {@link eu.etaxonomy.cdm.model.common.VersionableEntity} object.
*/
public EmptyElement(CdmFormFactory toolkit, ICdmFormElement parentElement, VersionableEntity entity, int style) {
package eu.etaxonomy.taxeditor.ui.section.agent;
import eu.etaxonomy.cdm.model.agent.Institution;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.InstitutionSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* @author n.hoffmann
// private InstitutionTypeSection section_institutionTypes;
- private InstitutionSelectionElement selection_partOfInstitution;
+ private EntitySelectionElement<Institution> selection_partOfInstitution;
/**
* @param formFactory
text_code = formFactory.createTextWithLabelElement(formElement, "Code",
entity.getCode(), style);
// section_institutionTypes
- selection_partOfInstitution = (InstitutionSelectionElement) formFactory
- .createSelectionElement(SelectionType.INSTITUTION,
+ selection_partOfInstitution = formFactory
+ .createSelectionElement(Institution.class,
getConversationHolder(), formElement, "Is Part Of",
entity.getIsPartOf(),
- InstitutionSelectionElement.DEFAULT, style);
+ EntitySelectionElement.EDITABLE | EntitySelectionElement.SELECTABLE | EntitySelectionElement.DELETABLE,
+ style);
}
/*
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.agent.Institution;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
/**
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.agent.Institution;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
/**
* (eu.etaxonomy.taxeditor.forms.ICdmFormElement)
*/
@Override
- public AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
+ public AbstractCdmDetailElement<Institution> createElement(ICdmFormElement rootElement) {
InstitutionDetailElement detailElement = (InstitutionDetailElement) formFactory
.createCdmDetailElement(DetailType.INSTITUTION, rootElement,
SWT.NULL);
import org.eclipse.swt.SWT;
import eu.etaxonomy.cdm.model.agent.Person;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.ToggleableTextElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
/**
* </p>
*
* @param cdmFormFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param style
* a int.
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.agent.Person;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
/**
/**
* <p>Constructor for PersonDetailSection.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
* @param style a int.
*/
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.agent.Person;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
/**
/**
* <p>Constructor for PersonWizardPage.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
* @param entity a {@link eu.etaxonomy.cdm.model.agent.Person} object.
*/
import org.eclipse.ui.forms.widgets.Section;
import eu.etaxonomy.cdm.model.agent.Team;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.ToggleableTextElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
/**
* </p>
*
* @param cdmFormFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param style
* a int.
section_teamMembers = (TeamMemberSection) formFactory
.createEntityDetailSection(EntityDetailType.TEAMMEMBER,
getConversationHolder(), formElement, Section.EXPANDED);
- section_teamMembers.setLayoutData(CdmFormFactory
+ section_teamMembers.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY(2, 1));
}
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.agent.Team;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
/**
/**
* <p>Constructor for TeamDetailSection.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
* @param style a int.
*/
import eu.etaxonomy.cdm.model.agent.Person;
import eu.etaxonomy.cdm.model.agent.Team;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.PersonSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
*/
public class TeamMemberElement extends AbstractEntityCollectionElement<Person> {
- private PersonSelectionElement selection_person;
+ private EntitySelectionElement<Person> selection_person;
/**
* <p>
* </p>
*
* @param cdmFormFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param section
- * a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
* @param entity
* a {@link eu.etaxonomy.cdm.model.agent.Person} object.
/** {@inheritDoc} */
@Override
public void createControls(ICdmFormElement element, int style) {
- selection_person = (PersonSelectionElement) formFactory
- .createSelectionElement(SelectionType.PERSON,
+ selection_person = formFactory
+ .createSelectionElement(Person.class,
getConversationHolder(), this, "Person", null,
- PersonSelectionElement.DEFAULT, style);
+ EntitySelectionElement.EDITABLE | EntitySelectionElement.SELECTABLE,
+ style);
}
/*
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.agent.Person;
import eu.etaxonomy.cdm.model.agent.Team;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
/**
* <p>Constructor for TeamMemberSection.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public TeamMemberSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
package eu.etaxonomy.taxeditor.ui.section.agent;
-import org.apache.log4j.Logger;
import org.eclipse.jface.viewers.ISelectionProvider;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.agent.Person;
import eu.etaxonomy.cdm.model.agent.Team;
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
/**
*/
public class TeamOrPersonBaseDetailSection extends AbstractCdmDetailSection<TeamOrPersonBase> {
- private static final Logger logger = Logger
- .getLogger(TeamOrPersonBaseDetailSection.class);
-
/**
* <p>Constructor for TeamOrPersonBaseDetailSection.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
* @param style a int.
*/
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.agent.Team;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
/**
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param conversation
* a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
package eu.etaxonomy.taxeditor.ui.section.classification;
-import org.apache.log4j.Logger;
import org.eclipse.swt.SWT;
import eu.etaxonomy.cdm.model.common.LanguageString;
+import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.cdm.model.taxon.Classification;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
public class ClassificationDetailElement extends
AbstractCdmDetailElement<Classification> {
- private static final Logger logger = Logger
- .getLogger(ClassificationDetailElement.class);
-
private TextWithLabelElement text_treeLabel;
- private ReferenceSelectionElement selection_reference;
+ private EntitySelectionElement<Reference> selection_reference;
private TextWithLabelElement text_microReference;
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
*/
public ClassificationDetailElement(CdmFormFactory formFactory,
text_treeLabel = formFactory.createTextWithLabelElement(formElement,
"Label", entity != null ? entity.getTitleCache() : null,
SWT.NULL);
- selection_reference = (ReferenceSelectionElement) formFactory
- .createSelectionElement(SelectionType.REFERENCE,
+ selection_reference = formFactory
+ .createSelectionElement(Reference.class,
getConversationHolder(), formElement, "Reference",
entity != null ? entity.getReference() : null,
- ReferenceSelectionElement.DEFAULT, SWT.NULL);
+ EntitySelectionElement.ALL, SWT.NULL);
text_microReference = formFactory.createTextWithLabelElement(
formElement, "Reference Detail",
entity != null ? entity.getMicroReference() : null, SWT.NULL);
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.taxon.Classification;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
/**
/**
* <p>Constructor for ClassificationDetailSection.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
* @param style a int.
*/
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.taxon.Classification;
-import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
/**
* <p>
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param conversation
* a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.parser.ParseHandler;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.ClassificationSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.NameSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
import eu.etaxonomy.taxeditor.ui.selection.TaxonNodeSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.TaxonSelectionElement;
/**
* <p>
*/
public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITreeNode> {
- private ClassificationSelectionElement selection_classification;
+ private EntitySelectionElement<Classification> selection_classification;
private Classification classification;
private ITreeNode parentTreeNode;
- private TaxonSelectionElement selection_reuseExistingTaxon;
+ private EntitySelectionElement<Taxon> selection_reuseExistingTaxon;
private Taxon taxon;
private boolean complete;
- private NameSelectionElement selection_reuseExistingName;
+ private EntitySelectionElement<TaxonNameBase> selection_reuseExistingName;
/**
* <p>
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
*/
public TaxonNodeDetailElement(CdmFormFactory formFactory,
@Override
protected void createControls(ICdmFormElement formElement,
ITreeNode entity, int style) {
- selection_classification = (ClassificationSelectionElement) formFactory
- .createSelectionElement(SelectionType.CLASSIFICATION,
+ selection_classification = formFactory
+ .createSelectionElement(Classification.class,
getConversationHolder(), formElement, "Classification",
- null, ClassificationSelectionElement.DEFAULT, style);
- selection_parentTaxonNode = (TaxonNodeSelectionElement) formFactory
- .createSelectionElement(SelectionType.TAXON_NODE,
- getConversationHolder(), formElement, "Parent", null,
- TaxonNodeSelectionElement.DEFAULT, style);
- selection_reuseExistingTaxon = (TaxonSelectionElement) formFactory
- .createSelectionElement(SelectionType.TAXON,
+ null, EntitySelectionElement.DELETABLE, style);
+ selection_parentTaxonNode = formFactory
+ .createTaxonNodeSelectionElement(getConversationHolder(), formElement, "Parent", null,
+ EntitySelectionElement.DELETABLE, style);
+ selection_reuseExistingTaxon = formFactory
+ .createSelectionElement(Taxon.class,
getConversationHolder(), formElement,
"Reuse existing Taxon", null,
- TaxonSelectionElement.DELETABLE, style);
+ EntitySelectionElement.NOTHING, style);
- selection_reuseExistingName = (NameSelectionElement) formFactory
- .createSelectionElement(SelectionType.NAME,
+ selection_reuseExistingName = formFactory
+ .createSelectionElement(TaxonNameBase.class,
getConversationHolder(), formElement,
"Reuse existing name", null,
- NameSelectionElement.DEFAULT, style);
+ EntitySelectionElement.ALL, style);
text_newTaxonName = formFactory.createTextWithLabelElement(formElement,
"New Taxon", "", style);
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
/**
/**
* <p>Constructor for TaxonNodeDetailSection.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
* @param style a int.
*/
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.taxon.ITreeNode;
import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
/**
* <p>
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param conversation
* a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2009 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.section.common;
+
+import org.eclipse.jface.viewers.ISelectionProvider;
+
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.model.common.ReferencedEntityBase;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
+
+/**
+ * @author n.hoffmann
+ * @date Dec 1, 2011
+ *
+ */
+public class ReferencedEntityDetailSection extends AbstractCdmDetailSection<ReferencedEntityBase>{
+
+ public ReferencedEntityDetailSection(CdmFormFactory formFactory,
+ ConversationHolder conversation, ICdmFormElement parentElement,
+ ISelectionProvider selectionProvider, int style) {
+ super(formFactory, conversation, parentElement, selectionProvider, style);
+ }
+
+ @Override
+ protected DetailType getDetailType() {
+ return DetailType.REFERENCED_ENTITY;
+ }
+
+ @Override
+ public String getHeading() {
+ return "Reference";
+ }
+
+
+}
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2009 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.section.common;
+
+import eu.etaxonomy.cdm.model.common.ReferencedEntityBase;
+import eu.etaxonomy.cdm.model.reference.Reference;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
+
+/**
+ * @author n.hoffmann
+ * @date Dec 1, 2011
+ *
+ */
+public class RefereneEntityDetailElement extends AbstractCdmDetailElement<ReferencedEntityBase>{
+
+ private EntitySelectionElement<Reference> selection_reference;
+ private TextWithLabelElement text_referenceDetail;
+
+ public RefereneEntityDetailElement(CdmFormFactory formFactory,
+ ICdmFormElement formElement) {
+ super(formFactory, formElement);
+ }
+
+ @Override
+ protected void createControls(ICdmFormElement formElement,
+ ReferencedEntityBase entity, int style) {
+ selection_reference = formFactory
+ .createSelectionElement(Reference.class,
+ getConversationHolder(), formElement, "Reference",
+ entity.getCitation(),
+ EntitySelectionElement.ALL, style);
+ text_referenceDetail = formFactory.createTextWithLabelElement(
+ formElement, "Reference Detail",
+ entity.getCitationMicroReference(), style);
+ }
+
+ @Override
+ public void handleEvent(Object eventSource) {
+ if (eventSource == selection_reference) {
+ getEntity().setCitation(selection_reference.getSelection());
+ } else if (eventSource == text_referenceDetail) {
+ getEntity().setCitationMicroReference(
+ text_referenceDetail.getText());
+ }
+ }
+
+}
import org.eclipse.swt.events.SelectionListener;
+import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.DerivedUnitBaseSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
public class DerivedUnitElement extends
AbstractEntityCollectionElement<SpecimenOrObservationBase> {
- private AbstractSelectionElement selection_derivedUnit;
+ private EntitySelectionElement<DerivedUnitBase> selection_derivedUnit;
/**
* <p>
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param section
- * a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
* @param entity
* a
@Override
public void createControls(ICdmFormElement element, int style) {
selection_derivedUnit = formFactory.createSelectionElement(
- SelectionType.DERIVED_UNIT, getConversationHolder(), element,
- "Specimen", null, DerivedUnitBaseSelectionElement.DEFAULT,
+ DerivedUnitBase.class, getConversationHolder(), element,
+ "Specimen", null, EntitySelectionElement.SELECTABLE | EntitySelectionElement.EDITABLE,
style);
}
/** {@inheritDoc} */
@Override
public void handleEvent(Object eventSource) {
-
+ if(eventSource == selection_derivedUnit){
+ setEntity(selection_derivedUnit.getSelection());
+ }
}
/** {@inheritDoc} */
@Override
public void setEntity(SpecimenOrObservationBase entity) {
-
+ this.entity = entity;
}
+
}
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.description.TaxonDescription;
-import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
+import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.DerivedUnitSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
/**
* <p>Constructor for DescribedSpecimenSection.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public DescribedSpecimenSection(CdmFormFactory formFactory,
/** {@inheritDoc} */
@Override
public SpecimenOrObservationBase createNewElement() {
- return DerivedUnit.NewInstance();
+ DerivedUnitBase selection = DerivedUnitSelectionDialog.select(getShell(), getConversationHolder(), null);
+ return selection;
}
/** {@inheritDoc} */
import eu.etaxonomy.cdm.model.description.DescriptionBase;
import eu.etaxonomy.cdm.model.description.FeatureTree;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.FeatureTreeSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>DescriptionDetailElement class.</p>
public class DescriptionDetailElement extends AbstractCdmDetailElement<DescriptionBase> {
private TextWithLabelElement detailDescription;
- private FeatureTreeSelectionElement selection_featureTree;
+ private EntitySelectionElement<FeatureTree> selection_featureTree;
/**
* <p>Constructor for DescriptionDetailElement.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public DescriptionDetailElement(CdmFormFactory cdmFormFactory,
detailDescription = formFactory.createMultilineTextWithLabel(this, "Label", 50, SWT.WRAP);
detailDescription.setText(entity.getTitleCache());
-// selection_featureTree = (FeatureTreeSelectionElement) formFactory.createSelectionElement(SelectionType.FEATURE_TREE, getConversationHolder(), formElement, "Feature Tree", null, style);
+ // TODO I initially thought that we can handle the entity's descriptive system with a feature tree
+ // Since descriptiveSystem is a Set of Features that are present or allowed for the current description,
+ // it is similar to a FeatureTree (you can get this information from a feature tree) but not the same.
+ // Please correct this once it is clear what descriptive system will be used for in CDM
+// selection_featureTree = formFactory.createSelectionElement(FeatureTree.class, getConversationHolder(), formElement, "Feature Tree", null, EntitySelectionElement.ALL, style);
}
-
+
/** {@inheritDoc} */
@Override
public void handleEvent(Object eventSource) {
package eu.etaxonomy.taxeditor.ui.section.description;
-import org.apache.log4j.Logger;
import org.eclipse.jface.viewers.ISelectionProvider;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.description.DescriptionBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
/**
*/
public class DescriptionDetailSection extends AbstractCdmDetailSection<DescriptionBase> {
- private static final Logger logger = Logger
- .getLogger(DescriptionDetailSection.class);
-
/**
* <p>Constructor for DescriptionDetailSection.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
* @param style a int.
*/
package eu.etaxonomy.taxeditor.ui.section.description;
-import org.apache.log4j.Logger;
-
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement;
/**
* <p>DescriptionElementDetailElement class.</p>
public class DescriptionElementDetailElement extends
AbstractCdmDetailElement<DescriptionElementBase> {
-
- private static final Logger logger = Logger
- .getLogger(DescriptionElementDetailElement.class);
- private AbstractDetailedDescriptionDetailElement detailElement;
-
/**
* <p>Constructor for DescriptionElementDetailElement.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public DescriptionElementDetailElement(CdmFormFactory cdmFormFactory,
/** {@inheritDoc} */
@Override
protected void createControls(ICdmFormElement formElement, DescriptionElementBase entity, int style) {
- detailElement = formFactory.createDetailedDescriptionDetailElement(formElement, entity, style);
+ formFactory.createDetailedDescriptionDetailElement(formElement, entity, style);
}
/** {@inheritDoc} */
import eu.etaxonomy.cdm.model.description.TextData;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
import eu.etaxonomy.taxeditor.ui.section.description.operation.ChangeDescriptionElementType;
/**
* <p>Constructor for DescriptionElementDetailSection.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
* @param style a int.
*/
toolBarManager.add(addAction);
- ICdmFormElement parentElement = this.getParentElement();
-
-
return toolBarManager.createControl(this);
}
import java.util.Collection;
-import org.apache.log4j.Logger;
-
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
import eu.etaxonomy.cdm.model.description.Feature;
import eu.etaxonomy.cdm.model.media.Media;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
*/
public class DescriptionElementMediaSection extends
AbstractEntityCollectionSection<DescriptionElementBase, Media> {
- private static final Logger logger = Logger
- .getLogger(DescriptionElementMediaSection.class);
/**
* <p>Constructor for DescriptionElementMediaSection.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public DescriptionElementMediaSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation,
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.cdm.model.common.DescriptionElementSource;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEntityElement;
-import eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEntityElement;
import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractOriginalSourceElement;
-import eu.etaxonomy.taxeditor.ui.selection.NameSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
AbstractOriginalSourceElement<DescriptionElementSource> implements
IEntityElement<DescriptionElementSource> {
- private final SelectionArbitrator selectionArbitrator;
-
- private NameSelectionElement selection_name;
+ private EntitySelectionElement<TaxonNameBase> selection_name;
/**
* <p>
* </p>
*
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
* @param element
* a
* @param style
* a int.
* @param cdmFormFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
*/
public DescriptionElementSourceElement(CdmFormFactory cdmFormFactory,
AbstractFormSection formElement, DescriptionElementSource element,
SelectionListener removeListener, int style) {
super(cdmFormFactory, formElement, element, removeListener, style);
- selectionArbitrator = formFactory.createSelectionArbitrator(this);
+ formFactory.createSelectionArbitrator(this);
}
/*
@Override
public void createControls(ICdmFormElement formElement, int style) {
super.createControls(formElement, style);
- selection_name = (NameSelectionElement) formFactory
- .createSelectionElement(SelectionType.NAME,
+ selection_name = formFactory
+ .createSelectionElement(TaxonNameBase.class,
getConversationHolder(), formElement, "Name in Source",
- null, NameSelectionElement.DEFAULT, SWT.NULL);
+ null, EntitySelectionElement.ALL, SWT.NULL);
}
/*
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.DescriptionElementSource;
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
/**
* <p>Constructor for DescriptionElementSourceSection.</p>
*
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
*/
public DescriptionElementSourceSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style){
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.cdm.model.reference.Reference;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
public class DescriptionSourceElement extends
AbstractEntityCollectionElement<Reference> {
- private ReferenceSelectionElement selection_descriptionSource;
+ private EntitySelectionElement<Reference> selection_descriptionSource;
/**
* <p>
* </p>
*
* @param cdmFormFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
* @param element
* a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase}
/** {@inheritDoc} */
@Override
public void createControls(ICdmFormElement element, int style) {
- selection_descriptionSource = (ReferenceSelectionElement) formFactory
- .createSelectionElement(SelectionType.REFERENCE,
+ selection_descriptionSource = formFactory
+ .createSelectionElement(Reference.class,
getConversationHolder(), element, "Description Source",
- null, ReferenceSelectionElement.DEFAULT, style);
+ null, EntitySelectionElement.ALL, style);
}
/** {@inheritDoc} */
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.IdentifiableSource;
import eu.etaxonomy.cdm.model.description.DescriptionBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
/**
* <p>Constructor for DescriptionSourceSection.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public DescriptionSourceSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation,
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.cdm.model.location.NamedArea;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
/**
/**
* <p>Constructor for GeoScopeElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
* @param entity a {@link eu.etaxonomy.cdm.model.location.NamedArea} object.
* @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
* @param style a int.
import java.util.Collection;
-import org.apache.log4j.Logger;
-
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.description.TaxonDescription;
import eu.etaxonomy.cdm.model.location.NamedArea;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
*/
public class GeoScopeSection extends AbstractEntityCollectionSection<TaxonDescription, NamedArea> {
-
- private static final Logger logger = Logger
- .getLogger(GeoScopeSection.class);
-
/**
* <p>Constructor for GeoScopeSection.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public GeoScopeSection(CdmFormFactory formFactory,
package eu.etaxonomy.taxeditor.ui.section.description;
-import org.apache.log4j.Logger;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.ui.forms.widgets.Section;
import org.eclipse.ui.forms.widgets.TableWrapLayout;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.media.Media;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
import eu.etaxonomy.taxeditor.ui.section.media.MediaElement;
*/
public class MediaDetailsSection extends AbstractCdmDetailSection<Media> {
-
- private static final Logger logger = Logger
- .getLogger(MediaDetailsSection.class);
private MediaElement element_media;
/**
* <p>Constructor for MediaDetailsSection.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
* @param style a int.
*/
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.cdm.model.description.Modifier;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.term.ModifierComboElement;
/**
* <p>ModifierElement class.</p>
*/
public class ModifierElement extends AbstractEntityCollectionElement<Modifier> {
- private ModifierComboElement combo_modifier;
+ private TermComboElement<Modifier> combo_modifier;
/**
* <p>Constructor for ModifierElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
* @param entity a {@link eu.etaxonomy.cdm.model.description.Modifier} object.
* @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
* @param style a int.
/** {@inheritDoc} */
@Override
public void createControls(ICdmFormElement element, int style) {
- combo_modifier = (ModifierComboElement) formFactory.createTermComboElement(TermComboType.MODIFIER, element, "Modifier", getEntity(), style);
+ combo_modifier = formFactory.createTermComboElement(Modifier.class, element, "Modifier", getEntity(), style);
}
/** {@inheritDoc} */
import java.util.Collection;
-import org.apache.log4j.Logger;
-
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.description.IModifiable;
import eu.etaxonomy.cdm.model.description.Modifier;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
*/
public class ModifierSection extends AbstractEntityCollectionSection<IModifiable, Modifier> {
-
- private static final Logger logger = Logger
- .getLogger(ModifierSection.class);
-
/**
* <p>Constructor for ModifierSection.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public ModifierSection(CdmFormFactory formFactory,
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.LabelElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
/**
/**
* <p>Constructor for NaturalLanguageDetailElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
*/
public NaturalLanguageDetailElement(CdmFormFactory formFactory,
ICdmFormElement formElement) {
package eu.etaxonomy.taxeditor.ui.section.description;
-import org.apache.log4j.Logger;
import org.eclipse.jface.viewers.ISelectionProvider;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.description.TaxonDescription;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
/**
*/
public class NaturalLanguageSection extends AbstractCdmDetailSection<TaxonDescription> {
-
- private static final Logger logger = Logger
- .getLogger(NaturalLanguageSection.class);
-
/**
* <p>Constructor for NaturalLanguageSection.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
* @param style a int.
*/
package eu.etaxonomy.taxeditor.ui.section.description;
-import org.apache.log4j.Logger;
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.cdm.model.description.Scope;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.term.ScopeComboElement;
/**
* <p>ScopeElement class.</p>
*/
public class ScopeElement extends AbstractEntityCollectionElement<Scope> {
- private static final Logger logger = Logger.getLogger(ScopeElement.class);
- private ScopeComboElement combo_scope;
+ private TermComboElement<Scope> combo_scope;
/**
* <p>Constructor for ScopeElement.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
* @param element a {@link eu.etaxonomy.cdm.model.description.Scope} object.
* @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
* @param style a int.
/** {@inheritDoc} */
@Override
public void createControls(ICdmFormElement element, int style) {
- combo_scope = (ScopeComboElement) formFactory.createTermComboElement(TermComboType.SCOPE, element, "Scope", null, style);
+ combo_scope = formFactory.createTermComboElement(Scope.class, element, "Scope", null, style);
}
/** {@inheritDoc} */
import java.util.Collection;
-import org.apache.log4j.Logger;
-
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.description.Scope;
import eu.etaxonomy.cdm.model.description.TaxonDescription;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
*/
public class ScopeSection extends AbstractEntityCollectionSection<TaxonDescription, Scope> {
-
- private static final Logger logger = Logger.getLogger(ScopeSection.class);
-
/**
* <p>Constructor for ScopeSection.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public ScopeSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
package eu.etaxonomy.taxeditor.ui.section.description;
-import org.apache.log4j.Logger;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.ui.forms.widgets.Section;
import eu.etaxonomy.cdm.model.description.State;
import eu.etaxonomy.cdm.model.description.StateData;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.term.AbstractTermComboElement;
/**
* <p>StateDataElement class.</p>
*/
public class StateDataElement extends AbstractEntityCollectionElement<StateData> {
- private static final Logger logger = Logger
- .getLogger(StateDataElement.class);
- private AbstractTermComboElement<State> combo_state;
+ private TermComboElement<State> combo_state;
private ModifierSection section_modifiers;
private TextWithLabelElement text_modifyingText;
/**
* <p>Constructor for StateDataElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
* @param entity a {@link eu.etaxonomy.cdm.model.description.StateData} object.
* @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
* @param style a int.
/** {@inheritDoc} */
@Override
public void createControls(ICdmFormElement element, int style) {
- combo_state = formFactory.createTermComboElement(TermComboType.STATE, element, "State", null, style);
+ combo_state = formFactory.createTermComboElement(State.class, element, "State", null, style);
section_modifiers = (ModifierSection) formFactory.createEntityDetailSection(EntityDetailType.MODIFIER, getConversationHolder(), element, Section.TWISTIE);
- section_modifiers.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+ section_modifiers.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
text_modifyingText = formFactory.createTextWithLabelElement(element, "Modifying Text", null, style);
}
getEntity().setState(combo_state.getSelection());
}
if(eventSource == text_modifyingText){
- getEntity().addModifyingText(LanguageString.NewInstance(text_modifyingText.getText(), CdmStore.getDefaultLanguage()));
+ getEntity().putModifyingText(LanguageString.NewInstance(text_modifyingText.getText(), CdmStore.getDefaultLanguage()));
}
}
}
import java.util.Collection;
-import org.apache.log4j.Logger;
-
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.description.CategoricalData;
import eu.etaxonomy.cdm.model.description.StateData;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
*/
public class StateDataSection extends AbstractEntityCollectionSection<CategoricalData, StateData> {
-
- private static final Logger logger = Logger
- .getLogger(StateDataSection.class);
-
/**
* <p>Constructor for StateDataSection.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public StateDataSection(CdmFormFactory formFactory,
package eu.etaxonomy.taxeditor.ui.section.description;
-import org.apache.log4j.Logger;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.ui.forms.widgets.Section;
+import eu.etaxonomy.cdm.model.description.StatisticalMeasure;
import eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.NumberWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.term.StatisticalMeasureComboElement;
/**
* <p>StatisticalMeasurementValueElement class.</p>
public class StatisticalMeasurementValueElement extends
AbstractEntityCollectionElement<StatisticalMeasurementValue> {
-
- private static final Logger logger = Logger
- .getLogger(StatisticalMeasurementValueElement.class);
private NumberWithLabelElement number_value;
- private StatisticalMeasureComboElement combo_type;
+ private TermComboElement<StatisticalMeasure> combo_type;
private ModifierSection section_modifiers;
/**
* <p>Constructor for StatisticalMeasurementValueElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
* @param entity a {@link eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue} object.
* @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
* @param style a int.
@Override
public void createControls(ICdmFormElement element, int style) {
number_value = formFactory.createFloatTextWithLabelElement(element, "Value", 0, style);
- combo_type = (StatisticalMeasureComboElement) formFactory.createTermComboElement(TermComboType.STATISTICAL_MEASURE, element, "Statistical Measure", null, style);
+ combo_type = formFactory.createTermComboElement(StatisticalMeasure.class, element, "Statistical Measure", null, style);
section_modifiers = (ModifierSection) formFactory.createEntityDetailSection(EntityDetailType.MODIFIER, getConversationHolder(), element, Section.TWISTIE);
- section_modifiers.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+ section_modifiers.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
}
/** {@inheritDoc} */
import java.util.Collection;
-import org.apache.log4j.Logger;
-
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.description.QuantitativeData;
import eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
public class StatisticalMeasurementValueSection extends
AbstractEntityCollectionSection<QuantitativeData, StatisticalMeasurementValue> {
-
- private static final Logger logger = Logger
- .getLogger(StatisticalMeasurementValueSection.class);
-
/**
* <p>Constructor for StatisticalMeasurementValueSection.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public StatisticalMeasurementValueSection(CdmFormFactory formFactory,
package eu.etaxonomy.taxeditor.ui.section.description.detail;
-import org.apache.log4j.Logger;
-
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
/**
* @version 1.0
*/
public abstract class AbstractDetailedDescriptionDetailElement<T extends DescriptionElementBase> extends AbstractCdmDetailElement<T>{
-
- private static final Logger logger = Logger
- .getLogger(AbstractDetailedDescriptionDetailElement.class);
/**
* <p>Constructor for AbstractDetailedDescriptionDetailElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param entity a T object.
* @param style a int.
* @param <T> a T object.
import org.eclipse.ui.forms.widgets.Section;
import eu.etaxonomy.cdm.model.description.CategoricalData;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
import eu.etaxonomy.taxeditor.ui.section.description.StateDataSection;
/**
/**
* <p>Constructor for CategoricalDataDetailElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param entity a {@link eu.etaxonomy.cdm.model.description.CategoricalData} object.
* @param style a int.
*/
checkbox_orderRelevant = formFactory.createCheckbox(formElement, "Order Relevant", entity.getOrderRelevant(), style);
section_stateData = (StateDataSection) formFactory.createEntityDetailSection(EntityDetailType.STATE_DATA, getConversationHolder(), formElement, Section.TWISTIE | Section.EXPANDED);
section_stateData.setEntity(entity);
- section_stateData.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+ section_stateData.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
}
/** {@inheritDoc} */
package eu.etaxonomy.taxeditor.ui.section.description.detail;
-import org.apache.log4j.Logger;
import org.eclipse.swt.SWT;
+import eu.etaxonomy.cdm.model.common.Language;
import eu.etaxonomy.cdm.model.description.CommonTaxonName;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.selection.NamedAreaSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.LanguageComboElement;
+import eu.etaxonomy.cdm.model.location.NamedArea;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>CommonNameDetailElement class.</p>
* @version 1.0
*/
public class CommonNameDetailElement extends AbstractDetailedDescriptionDetailElement<CommonTaxonName> {
-
- private static final Logger logger = Logger
- .getLogger(CommonNameDetailElement.class);
- private LanguageComboElement combo_language;
- private NamedAreaSelectionElement selection_namedArea;
+ private TermComboElement<Language> combo_language;
+ private EntitySelectionElement<NamedArea> selection_namedArea;
private TextWithLabelElement commonName;
/**
* <p>Constructor for CommonNameDetailElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param entity a {@link eu.etaxonomy.cdm.model.description.CommonTaxonName} object.
* @param style a int.
*/
@Override
protected void createControls(ICdmFormElement formElement,
CommonTaxonName entity, int style) {
- combo_language = (LanguageComboElement) formFactory.createTermComboElement(TermComboType.LANGUAGE, this, "Language", entity.getLanguage(), style);
-
- selection_namedArea = formFactory.createNamedAreaSelectionElement(this, getConversationHolder(), "Area", entity.getArea(), style);
-
commonName = formFactory.createTextWithLabelElement(this, "Common Name", entity.getName(), SWT.WRAP);
+
+ combo_language = formFactory.createTermComboElement(Language.class, this, "Language", entity.getLanguage(), style);
+
+ selection_namedArea = formFactory.createSelectionElement(NamedArea.class, getConversationHolder(),
+ formElement, "Area",
+ entity.getArea(), EntitySelectionElement.NOTHING, style);
}
/** {@inheritDoc} */
package eu.etaxonomy.taxeditor.ui.section.description.detail;
-import org.apache.log4j.Logger;
-
import eu.etaxonomy.cdm.model.description.Distribution;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.selection.NamedAreaSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.PresenceAbsenceTermComboElement;
+import eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase;
+import eu.etaxonomy.cdm.model.location.NamedArea;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>DistributionDetailElement class.</p>
public class DistributionDetailElement extends
AbstractDetailedDescriptionDetailElement<Distribution> {
- private static final Logger logger = Logger
- .getLogger(DistributionDetailElement.class);
- private NamedAreaSelectionElement selection_namedArea;
- private PresenceAbsenceTermComboElement combo_presenceAbsence;
+ private EntitySelectionElement<NamedArea> selection_namedArea;
+ private TermComboElement<PresenceAbsenceTermBase> combo_presenceAbsence;
/**
* <p>Constructor for DistributionDetailElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param entity a {@link eu.etaxonomy.cdm.model.description.Distribution} object.
* @param style a int.
*/
@Override
protected void createControls(ICdmFormElement formElement,
Distribution entity, int style) {
- selection_namedArea = formFactory.createNamedAreaSelectionElement(this, getConversationHolder(), "Area", entity.getArea(), style);
-
- combo_presenceAbsence = (PresenceAbsenceTermComboElement) formFactory.createTermComboElement(TermComboType.PRESENCEABSENCESTATUS, this, "Distribution Status", entity.getStatus(), style);
+ selection_namedArea = formFactory.createSelectionElement(NamedArea.class, getConversationHolder(),
+ formElement, "Area",
+ entity.getArea(), EntitySelectionElement.NOTHING, style);
+ combo_presenceAbsence = formFactory.createTermComboElement(PresenceAbsenceTermBase.class, this, "Distribution Status", entity.getStatus(), style);
}
import java.util.Map;
-import org.apache.log4j.Logger;
-
+import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.common.Language;
import eu.etaxonomy.cdm.model.common.LanguageString;
import eu.etaxonomy.cdm.model.description.IndividualsAssociation;
+import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.selection.DerivedUnitBaseSelectionElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
public class IndividualsAssociationDetailElement extends
AbstractDetailedDescriptionDetailElement<IndividualsAssociation> {
- private static final Logger logger = Logger
- .getLogger(IndividualsAssociationDetailElement.class);
private TextWithLabelElement text_description;
- private DerivedUnitBaseSelectionElement selection_derivedUnit;
+ private EntitySelectionElement<DerivedUnitBase> selection_derivedUnit;
/**
* <p>
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param entity
* a
@Override
protected void createControls(ICdmFormElement formElement,
IndividualsAssociation entity, int style) {
- selection_derivedUnit = (DerivedUnitBaseSelectionElement) formFactory
- .createSelectionElement(SelectionType.DERIVED_UNIT,
+ selection_derivedUnit = formFactory
+ .createSelectionElement(DerivedUnitBase.class,
getConversationHolder(), formElement, "Unit",
- entity.getAssociatedSpecimenOrObservation(),
- DerivedUnitBaseSelectionElement.DEFAULT, style);
+ CdmBase.deproxy(entity.getAssociatedSpecimenOrObservation(),DerivedUnitBase.class),
+ EntitySelectionElement.ALL, style);
text_description = formFactory.createMultilineTextWithLabel(
formElement, "Description", 200, style);
getEntity().setAssociatedSpecimenOrObservation(
selection_derivedUnit.getEntity());
} else if (eventSource == text_description) {
- getEntity().addDescription(text_description.getText(),
- CdmStore.getDefaultLanguage());
+ getEntity().putDescription(CdmStore.getDefaultLanguage(), text_description.getText());
}
}
import org.eclipse.ui.forms.widgets.Section;
+import eu.etaxonomy.cdm.model.description.MeasurementUnit;
import eu.etaxonomy.cdm.model.description.QuantitativeData;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
import eu.etaxonomy.taxeditor.ui.section.description.StatisticalMeasurementValueSection;
-import eu.etaxonomy.taxeditor.ui.term.MeasurementUnitComboElement;
/**
* <p>QuantitativeDataDetailElement class.</p>
public class QuantitativeDataDetailElement extends
AbstractDetailedDescriptionDetailElement<QuantitativeData> {
- private MeasurementUnitComboElement combo_mesaurementUnit;
+ private TermComboElement<MeasurementUnit> combo_mesaurementUnit;
private StatisticalMeasurementValueSection section_statisticalMeasurementValues;
/**
* <p>Constructor for QuantitativeDataDetailElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param entity a {@link eu.etaxonomy.cdm.model.description.QuantitativeData} object.
* @param style a int.
*/
@Override
protected void createControls(ICdmFormElement formElement,
QuantitativeData entity, int style) {
- combo_mesaurementUnit = (MeasurementUnitComboElement) formFactory.createTermComboElement(TermComboType.MEASUREMENT_UNIT, formElement, "Measurement Unit", entity.getUnit(), style);
+ combo_mesaurementUnit = formFactory.createTermComboElement(MeasurementUnit.class, formElement, "Measurement Unit", entity.getUnit(), style);
section_statisticalMeasurementValues = (StatisticalMeasurementValueSection) formFactory.createEntityDetailSection(EntityDetailType.STATISTICAL_MEASUREMENT_VALUE, getConversationHolder(), formElement, Section.TWISTIE | Section.EXPANDED);
section_statisticalMeasurementValues.setEntity(entity);
- section_statisticalMeasurementValues.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+ section_statisticalMeasurementValues.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
}
/* (non-Javadoc)
/** {@inheritDoc} */
@Override
public void handleEvent(Object eventSource) {
-
+ if(eventSource == combo_mesaurementUnit){
+ getEntity().setUnit(combo_mesaurementUnit.getSelection());
+ }else if (eventSource == section_statisticalMeasurementValues){
+ // FIXME
+ }
}
}
import org.eclipse.swt.SWT;
import eu.etaxonomy.cdm.model.description.TaxonInteraction;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.selection.TaxonSelectionElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
public class TaxonInteractionDetailElement extends
AbstractDetailedDescriptionDetailElement<TaxonInteraction> {
- private TaxonSelectionElement taxonSelection;
+ private EntitySelectionElement<Taxon> taxonSelection;
private TextWithLabelElement interactionDescription;
/**
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param entity
* a {@link eu.etaxonomy.cdm.model.description.TaxonInteraction}
@Override
protected void createControls(ICdmFormElement formElement,
TaxonInteraction entity, int style) {
- taxonSelection = (TaxonSelectionElement) formFactory
- .createSelectionElement(SelectionType.TAXON,
- getConversationHolder(), this, null,
- entity.getTaxon2(), TaxonSelectionElement.DEFAULT,
+ taxonSelection = formFactory
+ .createSelectionElement(Taxon.class,
+ getConversationHolder(), this, "Taxon",
+ entity.getTaxon2(), EntitySelectionElement.NOTHING,
SWT.WRAP);
interactionDescription = formFactory.createMultilineTextWithLabel(this,
if (eventSource == taxonSelection) {
getEntity().setTaxon2(taxonSelection.getEntity());
} else if (eventSource == interactionDescription) {
- getEntity().addDescription(interactionDescription.getText(),
- CdmStore.getDefaultLanguage());
+ getEntity().putDescription(CdmStore.getDefaultLanguage(), interactionDescription.getText());
}
}
}
import org.eclipse.swt.SWT;
import eu.etaxonomy.cdm.model.description.TextData;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.MultilanguageTextElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement;
/**
* <p>TextDataDetailElement class.</p>
/**
* <p>Constructor for TextDataDetailElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param entity a {@link eu.etaxonomy.cdm.model.description.TextData} object.
* @param style a int.
*/
public class ChangeDescriptionElementType extends AbstractPostOperation {
private DescriptionElementBase sourceElement;
- private DestinationType destinationType;
private DescriptionElementBase destinationElement;
-
- public enum DestinationType {
- TextData,
- Distribution
- }
/**
* <p>Constructor for ChangeDescriptionElementType.</p>
@Override
public IStatus redo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- // TODO Auto-generated method stub
return null;
}
@Override
public IStatus undo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- // TODO Auto-generated method stub
return null;
}
import java.net.URI;
import java.net.URISyntaxException;
-import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Set;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Label;
import eu.etaxonomy.cdm.common.UriUtils;
import eu.etaxonomy.cdm.model.common.Language;
-import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
-import eu.etaxonomy.cdm.model.description.Distribution;
import eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase;
import eu.etaxonomy.cdm.model.description.TaxonDescription;
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.BrowserElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.BrowserElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
/**
/**
* <p>Constructor for FeatureDistributionDetailElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
*/
public FeatureDistributionDetailElement(CdmFormFactory formFactory,
ICdmFormElement formElement) {
Label label = formFactory.createLabel(getLayoutComposite(), message, SWT.WRAP);
addControl(label);
- label.setLayoutData(CdmFormFactory.FILL(2, 1));
+ label.setLayoutData(LayoutConstants.FILL(2, 1));
}
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.description.Feature;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
/**
/**
* <p>Constructor for FeatureDistributionDetailSection.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
* @param style a int.
*/
package eu.etaxonomy.taxeditor.ui.section.group;
import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Color;
import org.springframework.security.core.GrantedAuthority;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
/**
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.Group;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
package eu.etaxonomy.taxeditor.ui.section.group;
import eu.etaxonomy.cdm.model.common.Group;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
/**
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.Group;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
/**
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.Group;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
/**
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.UserSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* @author n.hoffmann
*/
public class MemberDetailElement extends AbstractEntityCollectionElement<User> {
- private UserSelectionElement selection_user;
+ private EntitySelectionElement<User> selection_user;
/**
* @param formFactory
*/
@Override
public void createControls(ICdmFormElement element, int style) {
- selection_user = (UserSelectionElement) formFactory
- .createSelectionElement(SelectionType.USER,
+ selection_user = formFactory
+ .createSelectionElement(User.class,
getConversationHolder(), element, "Member", entity,
- UserSelectionElement.EDITABLE, style);
+ EntitySelectionElement.EDITABLE, style);
}
/*
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.Group;
import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.UserSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.UserSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.description.IIdentificationKey;
import eu.etaxonomy.cdm.model.location.NamedArea;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
import org.eclipse.swt.SWT;
import eu.etaxonomy.cdm.model.description.PolytomousKey;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.ToggleableTextElement;
-import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
/**
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.description.PolytomousKey;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
/**
*/
package eu.etaxonomy.taxeditor.ui.section.key;
+import eu.etaxonomy.cdm.model.description.Feature;
+import eu.etaxonomy.cdm.model.description.PolytomousKey;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.KeyStatementElement;
-import eu.etaxonomy.taxeditor.ui.forms.NumberWithLabelElement;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.KeyStatementElement;
+import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.FeatureSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.PolytomousKeyNodeSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.PolytomousKeySelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.TaxonSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* @author n.hoffmann
private KeyStatementElement element_statement;
- private FeatureSelectionElement selection_feature;
+ private EntitySelectionElement<Feature> selection_feature;
- private TaxonSelectionElement selection_taxon;
+ private EntitySelectionElement<Taxon> selection_taxon;
- private PolytomousKeySelectionElement selection_subkey;
+ private EntitySelectionElement<PolytomousKey> selection_subkey;
- private PolytomousKeyNodeSelectionElement selection_otherNode;
+ private EntitySelectionElement<PolytomousKeyNode> selection_otherNode;
private KeyStatementElement element_question;
element_question = formFactory.createKeyStatementElement(
formElement, "Question", parent.getQuestion(), 50, style);
- selection_feature = (FeatureSelectionElement) formFactory
- .createSelectionElement(SelectionType.FEATURE,
+ selection_feature = formFactory
+ .createSelectionElement(Feature.class,
getConversationHolder(), formElement, "Feature",
parent.getFeature(),
- FeatureSelectionElement.DEFAULT, style);
+ EntitySelectionElement.EDITABLE | EntitySelectionElement.DELETABLE, style);
}
element_statement = formFactory.createKeyStatementElement(formElement,
"Statement", entity.getStatement(), 50, style);
if (entity.isLeaf()) {
- selection_taxon = (TaxonSelectionElement) formFactory
- .createSelectionElement(SelectionType.TAXON,
+ selection_taxon = formFactory
+ .createSelectionElement(Taxon.class,
getConversationHolder(), formElement, "Taxon",
- entity.getTaxon(), TaxonSelectionElement.DELETABLE,
+ entity.getTaxon(), EntitySelectionElement.NOTHING,
style);
}
- selection_subkey = (PolytomousKeySelectionElement) formFactory
- .createSelectionElement(SelectionType.POLYTOMOUS_KEY,
+ selection_subkey = formFactory
+ .createSelectionElement(PolytomousKey.class,
getConversationHolder(), formElement, "Subkey",
entity.getSubkey(),
- PolytomousKeySelectionElement.DEFAULT, style);
+ EntitySelectionElement.EDITABLE | EntitySelectionElement.DELETABLE, style);
- selection_otherNode = (PolytomousKeyNodeSelectionElement) formFactory
- .createSelectionElement(SelectionType.POLYTOMOUS_KEY_NODE,
+ selection_otherNode = formFactory
+ .createSelectionElement(PolytomousKeyNode.class,
getConversationHolder(), formElement, "Other Node",
entity.getOtherNode(),
- PolytomousKeyNodeSelectionElement.DEFAULT, style);
+ EntitySelectionElement.DELETABLE, style);
formFactory.createMultiLanguageTextElement(formElement,
"Modifying Text", entity.getModifyingText(), 50, style);
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
/**
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.description.PolytomousKey;
import eu.etaxonomy.cdm.model.description.Scope;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.description.PolytomousKey;
import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonBaseSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonBaseSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
@Override
public Taxon createNewElement() {
Taxon selection = TaxonBaseSelectionDialog.selectTaxon(getShell(),
- getConversationHolder());
+ getConversationHolder(), null);
return selection;
}
import org.apache.commons.lang.StringUtils;
import org.apache.http.HttpException;
import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.ui.editors.text.EditorsUI;
import eu.etaxonomy.cdm.common.media.ImageInfo;
import eu.etaxonomy.cdm.model.media.ImageFile;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.ImageElement;
-import eu.etaxonomy.taxeditor.ui.forms.KeyValueViewerElement;
-import eu.etaxonomy.taxeditor.ui.forms.NumberWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.ImageElement;
+import eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement;
+import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement;
/**
* <p>ImageFileElement class.</p>
/**
* <p>Constructor for ImageFileElement.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
* @param element a {@link eu.etaxonomy.cdm.model.media.ImageFile} object.
* @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
* @param style a int.
text_height.setInteger(entity.getHeight());
text_width.setInteger(entity.getWidth());
try {
- showImage(entity.getUri());
+ loadImage(entity.getUri(), false);
} catch (Exception e) {
handleException(e);
}
}
- private void showImage(URI uri) throws IOException, HttpException{
+ private void loadImage(URI uri, boolean updateDimensions) throws IOException, HttpException{
element_image.initImageUri(uri);
element_image.loadImage(postRunnable );
ImageInfo imageInfo = ImageInfo.NewInstanceWithMetaData(uri, 10000);
- text_size.setText(FileUtils.byteCountToDisplaySize(imageInfo.getLength()));
- // KLUDGE this is not save for very large files, because of the int cast. But then, I don't think we will handle such large files in the near future
- getEntity().setSize((int) imageInfo.getLength());
+ element_keyValue.setInput(imageInfo.getMetaData());
- text_height.setInteger(imageInfo.getHeight());
- getEntity().setHeight(imageInfo.getHeight());
+ if(updateDimensions){
+ text_size.setText(FileUtils.byteCountToDisplaySize(imageInfo.getLength()));
+ // KLUDGE this is not save for very large files, because of the int cast.
+ // But then, I don't think we will handle such large files in the near future
+ getEntity().setSize((int) imageInfo.getLength());
- text_width.setInteger(imageInfo.getWidth());
- getEntity().setWidth(imageInfo.getWidth());
- element_keyValue.setInput(imageInfo.getMetaData());
+ text_height.setInteger(imageInfo.getHeight());
+ getEntity().setHeight(imageInfo.getHeight());
+
+ text_width.setInteger(imageInfo.getWidth());
+ getEntity().setWidth(imageInfo.getWidth());
+ }
+
element_messages.setText("");
}
getEntity().setUri(uri);
- showImage(getEntity().getUri());
+ loadImage(getEntity().getUri(), true);
firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
} catch (Exception e) {
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
+import eu.etaxonomy.cdm.model.agent.AgentBase;
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
import eu.etaxonomy.cdm.model.common.LanguageString;
import eu.etaxonomy.cdm.model.media.Media;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.LanguageStringWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.AgentSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
public class MediaElement extends AbstractEntityCollectionElement<Media> {
private MediaRepresentationSection section_mediaRepresentation;
- private AgentSelectionElement selection_artist;
+ private EntitySelectionElement<AgentBase> selection_artist;
private LanguageStringWithLabelElement text_description;
private LanguageStringWithLabelElement text_title;
* </p>
*
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
* @param element
* a {@link eu.etaxonomy.cdm.model.media.Media} object.
* @param style
* a int.
* @param cdmFormFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
*/
public MediaElement(CdmFormFactory cdmFormFactory,
public void createControls(ICdmFormElement element, int style) {
text_title = formFactory.createLanguageStringWithLabelElement(element,
"Title", null, style);
- selection_artist = (AgentSelectionElement) formFactory
- .createSelectionElement(SelectionType.AGENT,
+ selection_artist = formFactory
+ .createSelectionElement(AgentBase.class,
getConversationHolder(), element, "Artist", null,
- AgentSelectionElement.DEFAULT, style);
+ EntitySelectionElement.ALL, style);
text_description = formFactory.createLanguageStringWithLabelElement(
element, "Description", null, 100, style);
section_mediaRepresentation = (MediaRepresentationSection) formFactory
.createEntityDetailSection(
EntityDetailType.MEDIAREPRESENTATION,
getConversationHolder(), element, style);
- section_mediaRepresentation.setLayoutData(CdmFormFactory
+ section_mediaRepresentation.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY(2, 1));
}
import eu.etaxonomy.cdm.model.media.MediaRepresentation;
import eu.etaxonomy.cdm.model.media.MediaRepresentationPart;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
/**
/**
* <p>Constructor for MediaRepresentationElement.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
* @param element a {@link eu.etaxonomy.cdm.model.media.MediaRepresentation} object.
* @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
* @param style a int.
text_mimeType = formFactory.createTextWithLabelElement(element, "Mime Type", null, style);
text_suffix = formFactory.createTextWithLabelElement(element, "Suffix", null, style);
section_mediaRepresentationPart = (MediaRepresentationPartSection) formFactory.createEntityDetailSection(EntityDetailType.MEDIAREPRESENTATIONPART, getConversationHolder(), element, style);
- section_mediaRepresentationPart.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+ section_mediaRepresentationPart.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
}
/** {@inheritDoc} */
StoreUtil.error(getClass(), e);
}
}
-
-
- }
-
- private String getMimeType(URI uri){
- return null;
}
}
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.cdm.model.media.MediaRepresentationPart;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.LabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.NumberWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LabelElement;
+import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
/**
/**
* <p>Constructor for AbstractMediaRepresentationPartElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
* @param element a T object.
* @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
* @param style a int.
import eu.etaxonomy.cdm.model.media.ImageFile;
import eu.etaxonomy.cdm.model.media.MediaRepresentation;
import eu.etaxonomy.cdm.model.media.MediaRepresentationPart;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
/**
* <p>Constructor for MediaRepresentationPartSection.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public MediaRepresentationPartSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation,
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.media.Media;
import eu.etaxonomy.cdm.model.media.MediaRepresentation;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
/**
* <p>Constructor for MediaRepresentationSection.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public MediaRepresentationSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation,
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity;
import eu.etaxonomy.cdm.model.media.Media;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
/**
* <p>Constructor for MediaSection.</p>
*
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
*/
public MediaSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
package eu.etaxonomy.taxeditor.ui.section.name;
-import org.apache.log4j.Logger;
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.cdm.model.name.TypeDesignationBase;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractReferencedEntityElement;
/**
*/
public abstract class AbstractTypeDesignationElement<T extends TypeDesignationBase> extends AbstractReferencedEntityElement<T> {
- private static final Logger logger = Logger
- .getLogger(AbstractTypeDesignationElement.class);
protected CheckboxElement checkbox_notDesignated;
/**
* <p>Constructor for AbstractTypeDesignationElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
* @param entity a T object.
* @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
* @param style a int.
import java.util.Arrays;
import eu.etaxonomy.cdm.model.agent.INomenclaturalAuthor;
+import eu.etaxonomy.cdm.model.agent.Team;
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.taxeditor.model.AuthorHelper;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEnableableFormElement;
-import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
import eu.etaxonomy.taxeditor.ui.selection.NomenclaturalAuthorTeamSelectionElement;
/**
AbstractIdentifiableEntityDetailElement<NonViralName> implements
IEnableableFormElement {
- private AbstractSelectionElement selection_exBasionymAuthorTeam;
- private AbstractSelectionElement selection_basionymAuthorTeam;
- private AbstractSelectionElement selection_exCombinationAuthorTeam;
- private AbstractSelectionElement selection_combinationAuthorTeam;
+ private NomenclaturalAuthorTeamSelectionElement selection_exBasionymAuthorTeam;
+ private NomenclaturalAuthorTeamSelectionElement selection_basionymAuthorTeam;
+ private NomenclaturalAuthorTeamSelectionElement selection_exCombinationAuthorTeam;
+ private NomenclaturalAuthorTeamSelectionElement selection_combinationAuthorTeam;
/**
* <p>
* </p>
*
* @param cdmFormFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param style
* a int.
toggleable_cache = formFactory.createToggleableTextField(this,
"Authorship Cache", entity.getAuthorshipCache(),
entity.isProtectedAuthorshipCache(), style);
-
- selection_combinationAuthorTeam = formFactory.createSelectionElement(
- SelectionType.AUTHOR_TEAM, getConversationHolder(),
+ selection_combinationAuthorTeam = formFactory.createNomenclaturalAuthorTeamSelectionElement(
+ getConversationHolder(),
formElement, "Author",
AuthorHelper.getAuthor(entity.getCombinationAuthorTeam()),
- NomenclaturalAuthorTeamSelectionElement.DEFAULT, style);
+ EntitySelectionElement.ALL, style);
addElement(selection_combinationAuthorTeam);
- selection_exCombinationAuthorTeam = formFactory.createSelectionElement(
- SelectionType.AUTHOR_TEAM, getConversationHolder(),
+ selection_exCombinationAuthorTeam = formFactory.createNomenclaturalAuthorTeamSelectionElement(
+ getConversationHolder(),
formElement, "Ex Author",
AuthorHelper.getAuthor(entity.getExCombinationAuthorTeam()),
- NomenclaturalAuthorTeamSelectionElement.DEFAULT, style);
+ EntitySelectionElement.ALL, style);
addElement(selection_exCombinationAuthorTeam);
- selection_basionymAuthorTeam = formFactory.createSelectionElement(
- SelectionType.AUTHOR_TEAM, getConversationHolder(),
+ selection_basionymAuthorTeam = formFactory.createNomenclaturalAuthorTeamSelectionElement(
+ getConversationHolder(),
formElement, "Basionym Author",
AuthorHelper.getAuthor(entity.getBasionymAuthorTeam()),
- NomenclaturalAuthorTeamSelectionElement.DEFAULT, style);
+ EntitySelectionElement.ALL, style);
addElement(selection_basionymAuthorTeam);
- selection_exBasionymAuthorTeam = formFactory.createSelectionElement(
- SelectionType.AUTHOR_TEAM, getConversationHolder(),
+ selection_exBasionymAuthorTeam = formFactory.createNomenclaturalAuthorTeamSelectionElement(
+ getConversationHolder(),
formElement, "Ex Basionym Author",
AuthorHelper.getAuthor(entity.getExBasionymAuthorTeam()),
- NomenclaturalAuthorTeamSelectionElement.DEFAULT, style);
+ EntitySelectionElement.ALL, style);
addElement(selection_exBasionymAuthorTeam);
}
if (getEntity() == null) {
setEntity(NonViralName.NewInstance(null));
}
- NonViralName nonViralName = getEntity();
-
+
super.updateContent();
toggleable_cache.setEnabled(getEntity().isProtectedAuthorshipCache());
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
/**
* <p>Constructor for AuthorshipDetailSection.</p>
*
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
*/
package eu.etaxonomy.taxeditor.ui.section.name;
import eu.etaxonomy.cdm.model.name.NonViralName;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
/**
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
import org.eclipse.swt.SWT;
import eu.etaxonomy.cdm.model.name.BotanicalName;
+import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.name.Rank;
import eu.etaxonomy.cdm.model.name.ZoologicalName;
import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEnableableFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectableElement;
-import eu.etaxonomy.taxeditor.ui.forms.NumberWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement;
+import eu.etaxonomy.taxeditor.ui.element.ISelectableElement;
+import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
-import eu.etaxonomy.taxeditor.ui.term.AbstractTermComboElement;
/**
* <p>NameDetailElement class.</p>
*/
public class NameDetailElement extends AbstractIdentifiableEntityDetailElement<NonViralName> implements ISelectableElement, IEnableableFormElement{
- private AbstractTermComboElement<Rank> combo_rank;
+ private TermComboElement<Rank> combo_rank;
private TextWithLabelElement text_appendedPhrase;
private TextWithLabelElement text_uninomial;
private TextWithLabelElement text_infragenericEpithet;
/**
* <p>Constructor for NameDetailElement.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public NameDetailElement(CdmFormFactory cdmFormFactory, ICdmFormElement formElement,
toggleable_cache = formFactory.createToggleableTextField(this, "Name Cache", nonViralName.getNameCache(), nonViralName.isProtectedNameCache(), style);
- combo_rank = formFactory.createTermComboElement(TermComboType.RANK, this, "Rank", nonViralName.getRank(), style);
-
+ combo_rank = formFactory.createTermComboElement(Rank.class, this, "Rank", nonViralName.getRank(), style);
+
createGenusOrUninomialControls(this, nonViralName, style);
createInfragenerericEpithetControls(this, nonViralName, style);
createSpecificEpithetControls(this, nonViralName, style);
private void createSpecificNameParts(ICdmFormElement formElement,
NonViralName nonViralName, int style) {
- switch(nonViralName.getNomenclaturalCode()){
- case ICBN:
- createBotanicalNameParts(formElement, nonViralName, style);
- break;
- case ICZN:
- createZoologicalNameParts(formElement, nonViralName, style);
- break;
+ NomenclaturalCode code = nonViralName.getNomenclaturalCode();
+ if (code != null){
+ switch(nonViralName.getNomenclaturalCode()){
+ case ICBN:
+ createBotanicalNameParts(formElement, nonViralName, style);
+ break;
+ case ICZN:
+ createZoologicalNameParts(formElement, nonViralName, style);
+ break;
+ }
}
}
/**
* <p>Getter for the field <code>selectionArbitrator</code>.</p>
*
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator} object.
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator} object.
*/
public SelectionArbitrator getSelectionArbitrator() {
return selectionArbitrator;
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
/**
* <p>Constructor for NameDetailSection.</p>
*
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
*/
import org.eclipse.swt.graphics.Color;
import eu.etaxonomy.cdm.model.name.NameRelationship;
+import eu.etaxonomy.cdm.model.name.NameRelationshipType;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.LabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LabelElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractReferencedEntityElement;
-import eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.NameRelationshipTypeComboElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>NameRelationshipDetailElement class.</p>
public class NameRelationshipDetailElement extends AbstractReferencedEntityElement<NameRelationship>{
private TextWithLabelElement text_ruleConsidered;
- private AbstractSelectionElement selection_toName;
- private NameRelationshipTypeComboElement combo_relationshipType;
+ private EntitySelectionElement selection_toName;
+ private TermComboElement<NameRelationshipType> combo_relationshipType;
private LabelElement label;
/**
* <p>Constructor for NameRelationshipDetailElement.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
* @param entity a {@link eu.etaxonomy.cdm.model.name.NameRelationship} object.
* @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
* @param style a int.
else if(eventSource == text_ruleConsidered){
getEntity().setRuleConsidered(text_ruleConsidered.getText());
}
- // referenced entity fields
+ else if(eventSource == selection_reference){
+ getEntity().setCitation(selection_reference.getSelection());
+ }
+ else if(eventSource == text_referenceDetail){
+ getEntity().setCitationMicroReference(text_referenceDetail.getText());
+ }
}
/** {@inheritDoc} */
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
/**
* <p>Constructor for NameRelationshipDetailSection.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public NameRelationshipDetailSection(CdmFormFactory formFactory, ConversationHolder conversation,
package eu.etaxonomy.taxeditor.ui.section.name;
-import org.apache.log4j.Logger;
import org.eclipse.jface.wizard.Wizard;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
* @param callingSection a {@link eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailSection} object.
*/
public NameRelationshipWizard(NameRelationshipDetailSection callingSection) {
- this.callingSection = callingSection;
+ NameRelationshipWizard.callingSection = callingSection;
}
-
- private static final Logger logger = Logger
- .getLogger(NameRelationshipWizard.class);
-
+
private NameRelationshipWizardPage page;
/** {@inheritDoc} */
import eu.etaxonomy.cdm.model.name.NameRelationship;
import eu.etaxonomy.cdm.model.name.NameRelationshipType;
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.forms.RootElement;
-import eu.etaxonomy.taxeditor.ui.selection.NameSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.NameRelationshipTypeComboElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.RootElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
private final CdmFormFactory formFactory;
- private NameSelectionElement selection_relatedTo;
+ private EntitySelectionElement<TaxonNameBase> selection_relatedTo;
- private NameRelationshipTypeComboElement combo_relationshipType;
-
- private final NameRelationshipDetailSection callingSection;
+ private TermComboElement<NameRelationshipType> combo_relationshipType;
private final TaxonNameBase entity;
super("NameRelationshipWizardPage");
setTitle("New Name Relationship");
setDescription(callingSection.getEntity().getTitleCache());
- this.callingSection = callingSection;
this.entity = callingSection.getEntity();
this.formFactory = callingSection.getFormFactory();
Composite control = formFactory.createComposite(parent);
- control.setLayout(CdmFormFactory.LAYOUT(2, false));
+ control.setLayout(LayoutConstants.LAYOUT(2, false));
rootElement = new RootElement(formFactory, control);
- combo_relationshipType = (NameRelationshipTypeComboElement) formFactory
- .createTermComboElement(TermComboType.NAMERELATIONSHIP,
+ combo_relationshipType = formFactory.createTermComboElement(NameRelationshipType.class,
rootElement, "Name Relationship Type", null, SWT.NULL);
- selection_relatedTo = (NameSelectionElement) formFactory
- .createSelectionElement(SelectionType.NAME,
+ selection_relatedTo = formFactory
+ .createSelectionElement(TaxonNameBase.class,
((NameRelationshipWizard) getWizard())
.getConversationHolder(), rootElement,
- "Related to", null, NameSelectionElement.DEFAULT,
+ "Related to", null, EntitySelectionElement.ALL,
SWT.NULL);
setControl(control);
package eu.etaxonomy.taxeditor.ui.section.name;
-import org.apache.log4j.Logger;
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.name.NameTypeDesignation;
import eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus;
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.selection.NameSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.NameTypeDesignationStatusComboElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
public class NameTypeDesignationElement extends
AbstractTypeDesignationElement<NameTypeDesignation> {
- private static final Logger logger = Logger
- .getLogger(NameTypeDesignationElement.class);
private CheckboxElement checkbox_rejectedType;
private CheckboxElement checkbox_conservedType;
- private NameSelectionElement selection_typeName;
- private NameTypeDesignationStatusComboElement combo_typeStatus;
+ private EntitySelectionElement<TaxonNameBase> selection_typeName;
+ private TermComboElement<NameTypeDesignationStatus> combo_typeStatus;
/**
* <p>
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param section
- * a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
* @param entity
* a {@link eu.etaxonomy.cdm.model.name.NameTypeDesignation}
"Rejected Type", false, style);
checkbox_conservedType = formFactory.createCheckbox(formElement,
"Conserved Type", false, style);
- selection_typeName = (NameSelectionElement) formFactory
- .createSelectionElement(SelectionType.NAME,
+ selection_typeName = formFactory
+ .createSelectionElement(TaxonNameBase.class,
getConversationHolder(), formElement, "Name", null,
- NameSelectionElement.DEFAULT, style);
- combo_typeStatus = (NameTypeDesignationStatusComboElement) formFactory
- .createTermComboElement(
- TermComboType.NAMETYPEDESIGNATIONSTATUS, formElement,
+ EntitySelectionElement.ALL, style);
+ combo_typeStatus = formFactory.createTermComboElement(
+ NameTypeDesignationStatus.class, formElement,
"Designation Status", null, style);
super.createControls(formElement, style);
import eu.etaxonomy.cdm.model.name.NomenclaturalStatus;
import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEntityElement;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectableElement;
-import eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEntityElement;
+import eu.etaxonomy.taxeditor.ui.element.ISelectableElement;
+import eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractReferencedEntityElement;
-import eu.etaxonomy.taxeditor.ui.term.AbstractTermComboElement;
/**
* <p>NomenclaturalStatusElement class.</p>
*/
public class NomenclaturalStatusElement extends AbstractReferencedEntityElement<NomenclaturalStatus> implements IEntityElement<NomenclaturalStatus>, ISelectableElement{
- private AbstractTermComboElement<NomenclaturalStatusType> nomenclaturalStatusTypeCombo;
+ private TermComboElement<NomenclaturalStatusType> nomenclaturalStatusTypeCombo;
private TextWithLabelElement ruleConsideredText;
/**
* <p>Constructor for NomenclaturalStatusElement.</p>
*
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
* @param element a {@link eu.etaxonomy.cdm.model.name.NomenclaturalStatus} object.
* @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
* @param style a int.
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
*/
public NomenclaturalStatusElement(CdmFormFactory cdmFormFactory, AbstractFormSection formElement,
NomenclaturalStatus element, SelectionListener removeListener, int style) {
/** {@inheritDoc} */
@Override
public void createControls(ICdmFormElement element, int style) {
- nomenclaturalStatusTypeCombo = formFactory.createTermComboElement(TermComboType.NOMENCLATURALSTATUSTYPE, this, "Nomenclatural Status Type", null, style);
+ nomenclaturalStatusTypeCombo = formFactory.createTermComboElement(NomenclaturalStatusType.class, this, "Nomenclatural Status Type", null, style);
ruleConsideredText = formFactory.createTextWithLabelElement(this, "Rule Considered", "", style);
super.createControls(element, style);
/**
* <p>Getter for the field <code>selectionArbitrator</code>.</p>
*
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator} object.
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator} object.
*/
public SelectionArbitrator getSelectionArbitrator() {
return selectionArbitrator;
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
/**
* <p>Constructor for NomenclaturalStatusSection.</p>
*
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
*/
public NomenclaturalStatusSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement,
import org.eclipse.ui.forms.widgets.Section;
+import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
import eu.etaxonomy.cdm.model.name.NonViralName;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EnumComboType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
-import eu.etaxonomy.taxeditor.ui.term.NomenclaturalCodeComboElement;
/**
* <p>
private NameDetailSection section_name;
private AuthorshipDetailSection section_author;
- private NomenclaturalCodeComboElement combo_nomenclaturalCode;
+ private EnumComboElement<NomenclaturalCode> combo_nomenclaturalCode;
private HybridDetailSection section_hybrid;
/**
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
*/
public NonViralNameDetailElement(CdmFormFactory formFactory,
"Cache", entity.getTitleCache(), entity.isProtectedTitleCache()
|| entity.isProtectedFullTitleCache(), style);
- combo_nomenclaturalCode = (NomenclaturalCodeComboElement) formFactory
- .createEnumComboElement(EnumComboType.NOMENCLATURALCODE,
+ combo_nomenclaturalCode = formFactory
+ .createEnumComboElement(NomenclaturalCode.class,
formElement, style);
combo_nomenclaturalCode.setSelection(entity.getNomenclaturalCode());
section_name = (NameDetailSection) formFactory.createCdmDetailSection(
DetailType.SCIENTIFICNAME, getConversationHolder(),
formElement, null, Section.TWISTIE | Section.EXPANDED);
- section_name.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+ section_name.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
addControl(section_name);
addElement(section_name);
section_author = (AuthorshipDetailSection) formFactory
.createCdmDetailSection(DetailType.AUTHORSHIP,
getConversationHolder(), formElement, null,
Section.TWISTIE | Section.EXPANDED);
- section_author.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+ section_author.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
addControl(section_author);
addElement(section_author);
section_hybrid = (HybridDetailSection) formFactory.createCdmDetailSection(DetailType.HYBRID,
getConversationHolder(), formElement, null,
Section.TWISTIE);
- section_hybrid.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+ section_hybrid.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
addControl(section_hybrid);
addElement(section_hybrid);
}
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
/**
* <p>Constructor for NonViralNameDetailSection.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
* @param style a int.
*/
package eu.etaxonomy.taxeditor.ui.section.name;
-import org.apache.log4j.Logger;
import org.eclipse.swt.SWT;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.name.NonViralName;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
/**
*/
public class NonViralNameWizardPage extends AbstractCdmEntityWizardPage<NonViralName> {
-
- private static final Logger logger = Logger
- .getLogger(NonViralNameWizardPage.class);
private NonViralNameDetailElement nameElement;
/**
* <p>Constructor for NonViralNameWizardPage.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
* @param entity a {@link eu.etaxonomy.cdm.model.name.NonViralName} object.
*/
/** {@inheritDoc} */
@Override
- public AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
+ public AbstractCdmDetailElement<NonViralName> createElement(ICdmFormElement rootElement) {
nameElement = (NonViralNameDetailElement) formFactory.createCdmDetailElement(DetailType.NONVIRALNAME, rootElement, SWT.NULL);
nameElement.setEntity(entity);
return nameElement;
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectableElement;
-import eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.ISelectableElement;
+import eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.openurl.IOpenUrlEnabled;
-import eu.etaxonomy.taxeditor.ui.openurl.OpenUrlSelectorElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
/**
private Media media;
private MediaRepresentation mediaRepresentation;
- private OpenUrlSelectorElement element_openUrl;
-
/**
* <p>Constructor for ProtologueElement.</p>
*
* @param element a {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase} object.
* @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
* @param style a int.
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
*/
public ProtologueElement(CdmFormFactory cdmFormFactory, AbstractFormSection formElement, DescriptionElementBase element,
SelectionListener removeListener, int style) {
public void createControls(ICdmFormElement element, int style) {
protologueUriText = formFactory.createTextWithLabelElement(this, "Protologue URI", "", style);
- element_openUrl = formFactory.createOpenUrlSelectorElement(element, "Query BHL for Reference Image", this, style);
+ formFactory.createOpenUrlSelectorElement(element, "Query BHL for Reference Image", this, style);
}
/* (non-Javadoc)
/**
* <p>Getter for the field <code>selectionArbitrator</code>.</p>
*
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator} object.
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator} object.
*/
public SelectionArbitrator getSelectionArbitrator() {
return selectionArbitrator;
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
/**
* <p>Constructor for ProtologueSection.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
*/
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
+import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
import eu.etaxonomy.cdm.model.occurrence.Specimen;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.selection.DerivedUnitBaseSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.SpecimenTypeDesignationStatusComboElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
public class SpecimenTypeDesignationElement extends
AbstractTypeDesignationElement<SpecimenTypeDesignation> {
- private SpecimenTypeDesignationStatusComboElement combo_typeStatus;
- private DerivedUnitBaseSelectionElement selection_typeSpecimen;
+ private TermComboElement<SpecimenTypeDesignationStatus> combo_typeStatus;
+ private EntitySelectionElement<DerivedUnitBase> selection_typeSpecimen;
private TextWithLabelElement text_specimenTypeText;
/**
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param section
- * a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
* @param entity
* a {@link eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation}
/** {@inheritDoc} */
@Override
public void createControls(ICdmFormElement formElement, int style) {
- selection_typeSpecimen = (DerivedUnitBaseSelectionElement) formFactory
- .createSelectionElement(SelectionType.DERIVED_UNIT,
- getConversationHolder(), formElement, "Unit", null,
- DerivedUnitBaseSelectionElement.DEFAULT, style);
- combo_typeStatus = (SpecimenTypeDesignationStatusComboElement) formFactory
- .createTermComboElement(
- TermComboType.SPECIMENTYPEDESIGNATIONSTATUS,
+ selection_typeSpecimen = formFactory
+ .createSelectionElement(DerivedUnitBase.class,
+ getConversationHolder(), formElement, "Specimen", null,
+ EntitySelectionElement.ALL, style);
+ combo_typeStatus = formFactory
+ .createTermComboElement(SpecimenTypeDesignationStatus.class,
formElement, "Designation Status", null, style);
super.createControls(formElement, style);
import java.util.Collection;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.api.service.INameService;
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.name.NameTypeDesignation;
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.cdm.model.name.TypeDesignationBase;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
/**
* <p>Constructor for TypeDesignationSection.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public TypeDesignationSection(CdmFormFactory formFactory, ConversationHolder conversation,
/** {@inheritDoc} */
@Override
public void addElement(TypeDesignationBase element) {
- getEntity().addTypeDesignation(element, false);
+ getEntity().addTypeDesignation(element, PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.ADD_TYPES_TO_ALL_NAMES));
}
/** {@inheritDoc} */
/** {@inheritDoc} */
@Override
public void removeElement(TypeDesignationBase element) {
- getEntity().removeTypeDesignation(element);
+ boolean removeTypeDesignationFromAllTypifiedNames = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.ADD_TYPES_TO_ALL_NAMES);
+ TaxonNameBase entity = removeTypeDesignationFromAllTypifiedNames ? null : getEntity();
+ CdmStore.getService(INameService.class).deleteTypeDesignation(entity, element);
}
/*
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
import eu.etaxonomy.cdm.model.occurrence.DeterminationEvent;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
import org.eclipse.swt.events.SelectionListener;
+import eu.etaxonomy.cdm.model.agent.AgentBase;
import eu.etaxonomy.cdm.model.common.EventBase;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.TimePeriodElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.TimePeriodElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.AgentSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
public abstract class AbstractEventDetailElement<T extends EventBase> extends
AbstractEntityCollectionElement<T> {
- protected AgentSelectionElement selection_agent;
+ protected EntitySelectionElement<AgentBase> selection_agent;
protected TextWithLabelElement text_description;
protected TimePeriodElement element_timePeriod;
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param section
- * a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
* @param entity
* a T object.
/** {@inheritDoc} */
@Override
public void createControls(ICdmFormElement element, int style) {
- selection_agent = (AgentSelectionElement) formFactory
- .createSelectionElement(SelectionType.AGENT,
+ selection_agent = formFactory
+ .createSelectionElement(AgentBase.class,
getConversationHolder(), element, "Actor", null,
- AgentSelectionElement.DEFAULT, style);
+ EntitySelectionElement.ALL, style);
element_timePeriod = formFactory.createTimePeriodElement(element,
"Time Period", null, style);
text_description = formFactory.createTextWithLabelElement(element,
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
import eu.etaxonomy.cdm.model.location.NamedArea;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.NamedAreaSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.NamedAreaSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
/**
* <p>Constructor for CollectingAreasDetailSection.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public CollectingAreasDetailSection(CdmFormFactory formFactory,
package eu.etaxonomy.taxeditor.ui.section.occurrence;
+import eu.etaxonomy.cdm.model.agent.Institution;
import eu.etaxonomy.cdm.model.occurrence.Collection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.ToggleableTextElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.CollectionSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.InstitutionSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
private TextWithLabelElement text_townOrLocation;
- private InstitutionSelectionElement selection_institute;
+ private EntitySelectionElement<Institution> selection_institute;
- private CollectionSelectionElement selection_superCollection;
+ private EntitySelectionElement<Collection> selection_superCollection;
/**
* <p>
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
*/
public CollectionDetailElement(CdmFormFactory formFactory,
text_townOrLocation = formFactory.createTextWithLabelElement(
formElement, "Town Or Location", entity.getTownOrLocation(),
style);
- selection_institute = (InstitutionSelectionElement) formFactory
- .createSelectionElement(SelectionType.INSTITUTION,
+ selection_institute = formFactory
+ .createSelectionElement(Institution.class,
getConversationHolder(), formElement, "Institute",
entity.getInstitute(),
- InstitutionSelectionElement.DEFAULT, style);
- selection_superCollection = (CollectionSelectionElement) formFactory
- .createSelectionElement(SelectionType.COLLECTION,
+ EntitySelectionElement.ALL, style);
+ selection_superCollection = formFactory
+ .createSelectionElement(Collection.class,
getConversationHolder(), formElement,
"Super Collection", entity.getSuperCollection(),
- CollectionSelectionElement.DEFAULT, style);
+ EntitySelectionElement.ALL, style);
}
/*
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.occurrence.Collection;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
/**
/**
* <p>Constructor for CollectionWizardPage.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
* @param entity a {@link eu.etaxonomy.cdm.model.occurrence.Collection} object.
*/
*/
/** {@inheritDoc} */
@Override
- public AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
+ public AbstractCdmDetailElement<Collection> createElement(ICdmFormElement rootElement) {
CollectionDetailElement collectionDetailElement = (CollectionDetailElement) formFactory.createCdmDetailElement(DetailType.COLLECTION, rootElement, SWT.NULL);
collectionDetailElement.setEntity(entity);
return collectionDetailElement;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
import eu.etaxonomy.cdm.model.occurrence.DeterminationEvent;
import eu.etaxonomy.taxeditor.model.ImageResources;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
/**
* @author n.hoffmann
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
import eu.etaxonomy.cdm.api.facade.MethodNotSupportedByDerivedUnitTypeException;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.occurrence.PreservationMethod;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.NameSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.PreservationMethodComboElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
private TextWithLabelElement text_catalogNumber;
- private NameSelectionElement selection_storedUnder;
+ private EntitySelectionElement<TaxonNameBase> selection_storedUnder;
private TextWithLabelElement text_exsicatum;
- private PreservationMethodComboElement combo_preservationMethod;
+ private TermComboElement<PreservationMethod> combo_preservationMethod;
private SpecimenCollectionDetailSection section_duplicates;
private SourceCollectionDetailSection section_source;
- private TextWithLabelElement text_collectorsNumber;
-
/**
* <p>
* Constructor for DerivedUnitBaseDetailElement.
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
*/
public DerivedUnitBaseDetailElement(CdmFormFactory formFactory,
entity.getCatalogNumber(), style);
try {
- combo_preservationMethod = (PreservationMethodComboElement) formFactory
- .createTermComboElement(TermComboType.PRESERVATION_METHOD,
+ combo_preservationMethod = formFactory.createTermComboElement(PreservationMethod.class,
formElement, "Preservation Method",
entity.getPreservationMethod(), style);
} catch (MethodNotSupportedByDerivedUnitTypeException e) {
// we ignore this
StoreUtil.info(e.getMessage());
}
- selection_storedUnder = (NameSelectionElement) formFactory
- .createSelectionElement(SelectionType.NAME,
+ selection_storedUnder = formFactory
+ .createSelectionElement(TaxonNameBase.class,
getConversationHolder(), formElement, "Stored Under",
- entity.getStoredUnder(), NameSelectionElement.DEFAULT,
+ entity.getStoredUnder(), EntitySelectionElement.ALL,
style);
try {
EntityDetailType.SPECIMEN_COLLECTION,
getConversationHolder(), formElement, Section.TWISTIE);
section_duplicates
- .setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+ .setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
section_duplicates.setEntity(entity);
section_source = (SourceCollectionDetailSection) formFactory
.createEntityDetailSection(
EntityDetailType.IDENTIFIABLE_SOURCE_COLLECTION,
getConversationHolder(), formElement, Section.TWISTIE);
- section_source.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+ section_source.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
section_source.setEntity(entity);
}
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
/**
/**
* <p>Constructor for DerivedUnitBaseDetailSection.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
* @param style a int.
*/
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
/**
* @see eu.etaxonomy.taxeditor.forms.AbstractCdmEntityWizardPage#createElement(eu.etaxonomy.taxeditor.forms.ICdmFormElement)
*/
@Override
- public AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
+ public AbstractCdmDetailElement<DerivedUnitFacade> createElement(ICdmFormElement rootElement) {
DerivedUnitBaseDetailElement detailElement = (DerivedUnitBaseDetailElement) formFactory.createCdmDetailElement(DetailType.DERIVED_UNIT, rootElement, SWT.NULL);
detailElement.setEntity(getEntity());
return detailElement;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException;
import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
/**
* <p>Constructor for DerivedUnitFacadeDetailElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
*/
public DerivedUnitFacadeDetailElement(CdmFormFactory formFactory,
ICdmFormElement formElement) {
DerivedUnitBase entity, int style) {
section_general = (GeneralDetailSection) formFactory.createCdmDetailSection(DetailType.DERIVED_UNIT_GENERAL, getConversationHolder(), formElement, null, Section.TWISTIE | Section.EXPANDED);
- section_general.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+ section_general.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
addControl(section_general);
addElement(section_general);
section_gatheringEvent = (GatheringEventDetailSection) formFactory.createCdmDetailSection(DetailType.GATHERING_EVENT, getConversationHolder(), formElement, null, Section.TWISTIE);
- section_gatheringEvent.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+ section_gatheringEvent.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
addControl(section_gatheringEvent);
addElement(section_gatheringEvent);
section_fieldObservation = (FieldObservationDetailSection) formFactory.createCdmDetailSection(DetailType.FIELD_OBSERVATION, getConversationHolder(), formElement, null, Section.TWISTIE);
- section_fieldObservation.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+ section_fieldObservation.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
addControl(section_fieldObservation);
addElement(section_fieldObservation);
section_derivedUnitBase = (DerivedUnitBaseDetailSection) formFactory.createCdmDetailSection(DetailType.DERIVED_UNIT, getConversationHolder(), formElement, null, Section.TWISTIE);
- section_derivedUnitBase.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+ section_derivedUnitBase.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
addControl(section_derivedUnitBase);
addElement(section_derivedUnitBase);
}
package eu.etaxonomy.taxeditor.ui.section.occurrence;
-import org.apache.log4j.Logger;
import org.eclipse.jface.viewers.ISelectionProvider;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
/**
*/
public class DerivedUnitFacadeDetailSection extends AbstractCdmDetailSection<DerivedUnitBase> {
-
- private static final Logger logger = Logger
- .getLogger(DerivedUnitFacadeDetailSection.class);
-
/**
* <p>Constructor for DerivedUnitFacadeDetailSection.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
* @param style a int.
*/
import org.eclipse.ui.forms.widgets.Section;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
/**
.createEntityDetailSection(
EntityDetailType.DETERMINATION_CURRENT,
getConversationHolder(), formElement, Section.EXPANDED);
- section_currentDetermination.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+ section_currentDetermination.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
section_currentDetermination.setEntity(entity);
section_determinationHistory = (DeterminationHistoryDetailSection) formFactory
.createEntityDetailSection(
EntityDetailType.DETERMINATION_HISTORY,
getConversationHolder(), formElement, Section.TWISTIE);
- section_determinationHistory.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+ section_determinationHistory.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
section_determinationHistory.setEntity(entity);
}
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
/**
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.cdm.model.occurrence.DeterminationEvent;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.selection.TaxonBaseSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.TaxonSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.DeterminationModifierComboElement;
+import eu.etaxonomy.cdm.model.occurrence.DeterminationModifier;
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
public class DeterminationEventDetailElement extends
AbstractEventDetailElement<DeterminationEvent> {
- private DeterminationModifierComboElement combo_determinationModifier;
+ private TermComboElement<DeterminationModifier> combo_determinationModifier;
private CheckboxElement checkbox_preferredFlag;
- private TaxonBaseSelectionElement selection_taxonBase;
+ private EntitySelectionElement<TaxonBase> selection_taxonBase;
// private TODO a set of references
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param section
- * a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
* @param entity
* a {@link eu.etaxonomy.cdm.model.occurrence.DeterminationEvent}
/** {@inheritDoc} */
@Override
public void createControls(ICdmFormElement element, int style) {
- selection_taxonBase = (TaxonBaseSelectionElement) formFactory
- .createSelectionElement(SelectionType.TAXON_BASE,
+ selection_taxonBase = formFactory
+ .createSelectionElement(TaxonBase.class,
getConversationHolder(), element, "Taxon", null,
- TaxonSelectionElement.DEFAULT, style);
+ EntitySelectionElement.NOTHING, style);
// TODO set of references
selection_agent.setLabel("Determined by");
- combo_determinationModifier = (DeterminationModifierComboElement) formFactory
- .createTermComboElement(TermComboType.DETERMINATION_MODIFIER,
+ combo_determinationModifier = formFactory.createTermComboElement(DeterminationModifier.class,
element, "Modifier", null, style);
}
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
import eu.etaxonomy.cdm.model.occurrence.DeterminationEvent;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
/**
* @author n.hoffmann
package eu.etaxonomy.taxeditor.ui.section.occurrence;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
+import eu.etaxonomy.cdm.model.description.Sex;
+import eu.etaxonomy.cdm.model.description.Stage;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.NumberWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.term.SexComboElement;
-import eu.etaxonomy.taxeditor.ui.term.StageComboElement;
/**
* <p>FieldObservationDetailElement class.</p>
private NumberWithLabelElement number_individualCount;
- private SexComboElement combo_sex;
+ private TermComboElement<Sex> combo_sex;
- private StageComboElement combo_lifeStage;
+ private TermComboElement<Stage> combo_lifeStage;
/**
* <p>Constructor for FieldObservationDetailElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
*/
public FieldObservationDetailElement(CdmFormFactory formFactory,
ICdmFormElement formElement) {
text_fieldNotes = formFactory.createTextWithLabelElement(formElement, "Field Notes", entity.getFieldNotes(), style);
number_individualCount = formFactory.createIntegerTextWithLabelElement(formElement, "Individual Count", entity.getIndividualCount(), style);
- combo_lifeStage = (StageComboElement) formFactory.createTermComboElement(TermComboType.STAGE, formElement, "Life Stage", entity.getLifeStage(), style);
- combo_sex = (SexComboElement) formFactory.createTermComboElement(TermComboType.SEX, formElement, "Sex", entity.getSex(), style);
+ combo_lifeStage = formFactory.createTermComboElement(Stage.class, formElement, "Life Stage", entity.getLifeStage(), style);
+ combo_sex = formFactory.createTermComboElement(Sex.class, formElement, "Sex", entity.getSex(), style);
}
/** {@inheritDoc} */
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
/**
/**
* <p>Constructor for FieldObservationDetailSection.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
* @param style a int.
*/
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
/**
* @see eu.etaxonomy.taxeditor.forms.AbstractCdmEntityWizardPage#createElement(eu.etaxonomy.taxeditor.forms.ICdmFormElement)
*/
@Override
- public AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
+ public AbstractCdmDetailElement<DerivedUnitFacade> createElement(ICdmFormElement rootElement) {
FieldObservationDetailElement detailElement = (FieldObservationDetailElement) formFactory.createCdmDetailElement(DetailType.FIELD_OBSERVATION, rootElement, SWT.NONE);
detailElement.setEntity(getEntity());
return detailElement;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
import eu.etaxonomy.taxeditor.preference.Resources;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.NumberWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
/**
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
*/
public GatheringEventDetailElement(CdmFormFactory formFactory,
section_collectingAreas = (CollectingAreasDetailSection) formFactory
.createEntityDetailSection(EntityDetailType.COLLECTING_AREA,
getConversationHolder(), formElement, Section.TWISTIE);
- section_collectingAreas.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(
+ section_collectingAreas.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(
2, 1));
section_collectingAreas.setEntity(entity);
}
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
/**
/**
* <p>Constructor for GatheringEventDetailSection.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
* @param style a int.
*/
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
/**
* @see eu.etaxonomy.taxeditor.forms.AbstractCdmEntityWizardPage#createElement(eu.etaxonomy.taxeditor.forms.ICdmFormElement)
*/
@Override
- public AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
+ public AbstractCdmDetailElement<DerivedUnitFacade> createElement(ICdmFormElement rootElement) {
GatheringEventDetailElement detailElement = (GatheringEventDetailElement) formFactory.createCdmDetailElement(DetailType.GATHERING_EVENT, rootElement, SWT.NULL);
detailElement.setEntity(getEntity());
return detailElement;
package eu.etaxonomy.taxeditor.ui.section.occurrence;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
+import eu.etaxonomy.cdm.model.agent.AgentBase;
import eu.etaxonomy.cdm.model.common.LanguageString;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.LanguageStringWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.NumberWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.PointElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.TimePeriodElement;
-import eu.etaxonomy.taxeditor.ui.forms.ToggleableTextElement;
+import eu.etaxonomy.cdm.model.location.NamedArea;
+import eu.etaxonomy.cdm.model.occurrence.Collection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.PointElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.TimePeriodElement;
+import eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.AgentSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.CollectionSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.NamedAreaSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* @author n.hoffmann
private ToggleableTextElement toggleableText_titleCache;
- private NamedAreaSelectionElement selection_country;
+ private EntitySelectionElement<NamedArea> selection_country;
private LanguageStringWithLabelElement languageText_locality;
private PointElement element_point;
private NumberWithLabelElement number_elevation;
private TimePeriodElement element_date;
- private AgentSelectionElement selection_collector;
+ private EntitySelectionElement<AgentBase> selection_collector;
private TextWithLabelElement text_collectingNumber;
- private CollectionSelectionElement selection_collection;
+ private EntitySelectionElement<Collection> selection_collection;
private TextWithLabelElement text_barcode;
/**
formElement, "Title Cache", entity.getTitleCache(),
entity.isProtectedTitleCache(), style);
- selection_country = formFactory.createNamedAreaSelectionElement(
- formElement, getConversationHolder(), "Country",
- entity.getCountry(), style);
+ selection_country = formFactory.createSelectionElement(NamedArea.class, getConversationHolder(),
+ formElement, "Country",
+ entity.getCountry(), EntitySelectionElement.NOTHING, style);
languageText_locality = formFactory
.createLanguageStringWithLabelElement(formElement, "Locality",
entity.getLocality(), style);
entity.getAbsoluteElevation(), style);
element_date = formFactory.createTimePeriodElement(formElement, "Date",
entity.getGatheringPeriod(), style);
- selection_collector = (AgentSelectionElement) formFactory
- .createSelectionElement(SelectionType.AGENT,
+ selection_collector = formFactory
+ .createSelectionElement(AgentBase.class,
getConversationHolder(), formElement, "Collector",
- entity.getCollector(), AgentSelectionElement.DEFAULT,
+ entity.getCollector(), EntitySelectionElement.ALL,
style);
text_collectingNumber = formFactory.createTextWithLabelElement(formElement,
"Collecting number", entity.getFieldNumber(), style);
- selection_collection = (CollectionSelectionElement) formFactory
- .createSelectionElement(SelectionType.COLLECTION,
+ selection_collection = formFactory
+ .createSelectionElement(Collection.class,
getConversationHolder(), formElement, "Collection",
entity.getCollection(),
- CollectionSelectionElement.DEFAULT, style);
+ EntitySelectionElement.ALL, style);
text_barcode = formFactory.createTextWithLabelElement(formElement,
"Barcode", entity.getBarcode(), style);
}
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
/**
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
/**
* @see eu.etaxonomy.taxeditor.forms.AbstractCdmEntityWizardPage#createElement(eu.etaxonomy.taxeditor.forms.ICdmFormElement)
*/
@Override
- public AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
+ public AbstractCdmDetailElement<DerivedUnitFacade> createElement(ICdmFormElement rootElement) {
GeneralDetailElement detailElement = (GeneralDetailElement) formFactory.createCdmDetailElement(DetailType.DERIVED_UNIT_GENERAL, rootElement, SWT.NULL);
detailElement.setEntity(getEntity());
+ checkComplete();
return detailElement;
}
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.cdm.model.location.NamedArea;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.NamedAreaSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
public class NamedAreaDetailElement extends
AbstractEntityCollectionElement<NamedArea> {
- private NamedAreaSelectionElement selection_namedArea;
+ private EntitySelectionElement<NamedArea> selection_namedArea;
/**
* <p>
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param section
- * a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
* @param entity
* a {@link eu.etaxonomy.cdm.model.location.NamedArea} object.
*/
/** {@inheritDoc} */
@Override
- public void createControls(ICdmFormElement element, int style) {
- selection_namedArea = formFactory.createNamedAreaSelectionElement(
- element, getConversationHolder(), "Area", null, style);
+ public void createControls(ICdmFormElement formElement, int style) {
+ selection_namedArea = formFactory.createSelectionElement(NamedArea.class, getConversationHolder(),
+ formElement, "Area",
+ null, EntitySelectionElement.NOTHING, style);
}
/*
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
import eu.etaxonomy.cdm.model.common.IdentifiableSource;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
/**
* <p>Constructor for SourceCollectionDetailSection.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public SourceCollectionDetailSection(CdmFormFactory formFactory,
import org.eclipse.swt.events.SelectionListener;
+import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
import eu.etaxonomy.cdm.model.occurrence.Specimen;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.DerivedUnitBaseSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
public class SpecimenCollectionDetailElement extends
AbstractEntityCollectionElement<Specimen> {
- private DerivedUnitBaseSelectionElement selection_derivedUnit;
+ private EntitySelectionElement<DerivedUnitBase> selection_derivedUnit;
/**
* <p>
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param section
- * a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
* @param entity
* a {@link eu.etaxonomy.cdm.model.occurrence.Specimen} object.
/** {@inheritDoc} */
@Override
public void createControls(ICdmFormElement element, int style) {
- selection_derivedUnit = (DerivedUnitBaseSelectionElement) formFactory
- .createSelectionElement(SelectionType.DERIVED_UNIT,
+ selection_derivedUnit = formFactory
+ .createSelectionElement(DerivedUnitBase.class,
getConversationHolder(), element, "Derived Unit", null,
- DerivedUnitBaseSelectionElement.DEFAULT, style);
+ EntitySelectionElement.EDITABLE | EntitySelectionElement.SELECTABLE, style);
}
/*
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
import eu.etaxonomy.cdm.model.occurrence.Specimen;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
/**
* <p>Constructor for SpecimenCollectionDetailSection.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public SpecimenCollectionDetailSection(CdmFormFactory formFactory,
package eu.etaxonomy.taxeditor.ui.section.reference;
-import org.apache.log4j.Logger;
-
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.cdm.model.reference.Reference;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
public class NomenclaturalReferenceDetailElement extends
AbstractCdmDetailElement<TaxonNameBase> {
- private static final Logger logger = Logger
- .getLogger(NomenclaturalReferenceDetailElement.class);
- private ReferenceSelectionElement selection_nomenclaturalReference;
+ private EntitySelectionElement<Reference> selection_nomenclaturalReference;
private TextWithLabelElement text_referenceDetail;
/**
* </p>
*
* @param cdmFormFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param style
* a int.
@Override
protected void createControls(ICdmFormElement formElement,
TaxonNameBase entity, int style) {
- selection_nomenclaturalReference = (ReferenceSelectionElement) formFactory
- .createSelectionElement(SelectionType.REFERENCE,
+ selection_nomenclaturalReference = formFactory
+ .createSelectionElement(Reference.class,
getConversationHolder(), formElement, "Reference",
- entity.getNomenclaturalReference(),
- ReferenceSelectionElement.DEFAULT, style);
+ (Reference) entity.getNomenclaturalReference(),
+ EntitySelectionElement.ALL, style);
text_referenceDetail = formFactory.createTextWithLabelElement(
formElement, "Reference Detail",
entity.getNomenclaturalMicroReference(), style);
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.cdm.model.reference.INomenclaturalReference;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
/**
* <p>Constructor for NomenclaturalReferenceDetailSection.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
* @param style a int.
*/
import org.eclipse.swt.SWT;
+import eu.etaxonomy.cdm.model.agent.AgentBase;
+import eu.etaxonomy.cdm.model.agent.Institution;
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
import eu.etaxonomy.cdm.model.reference.ReferenceType;
import eu.etaxonomy.taxeditor.model.AuthorHelper;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EnumComboType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IErrorIntolerableElement;
-import eu.etaxonomy.taxeditor.ui.forms.IExceptionHandler;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.TimePeriodElement;
-import eu.etaxonomy.taxeditor.ui.forms.ToggleableTextElement;
-import eu.etaxonomy.taxeditor.ui.forms.UriWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IErrorIntolerableElement;
+import eu.etaxonomy.taxeditor.ui.element.IExceptionHandler;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.TimePeriodElement;
+import eu.etaxonomy.taxeditor.ui.element.UriWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.AgentSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.InstitutionSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.ReferenceTypeComboElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
private TextWithLabelElement text_title;
private TextWithLabelElement text_volume;
private UriWithLabelElement text_uri;
- private AgentSelectionElement selection_authorTeam;
+ private EntitySelectionElement<AgentBase> selection_authorTeam;
private TimePeriodElement element_timePeriod;
- private ReferenceSelectionElement selection_inReference;
- private InstitutionSelectionElement selection_institution;
- private ReferenceTypeComboElement combo_referenceType;
+ private EntitySelectionElement<Reference> selection_inReference;
+ private EntitySelectionElement<Institution> selection_institution;
+ private EnumComboElement<ReferenceType> combo_referenceType;
- private ReferenceSelectionElement selection_inSeries;
+ private EntitySelectionElement<Reference> selection_inSeries;
/**
* <p>
* </p>
*
* @param cdmFormFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param style
* a int.
"Reference Cache", entity.getTitleCache(),
entity.isProtectedTitleCache(), style);
- combo_referenceType = (ReferenceTypeComboElement) formFactory
- .createEnumComboElement(EnumComboType.REFERENCETYPE,
+ combo_referenceType = formFactory.createEnumComboElement(ReferenceType.class,
formElement, style);
combo_referenceType.setSelection(entity.getType());
"Title", entity.getTitle(), style);
// author team
- selection_authorTeam = (AgentSelectionElement) formFactory
- .createSelectionElement(SelectionType.AGENT,
+ selection_authorTeam = formFactory
+ .createSelectionElement(AgentBase.class,
getConversationHolder(), formElement, "Author",
AuthorHelper.getAuthor(entity.getAuthorTeam()),
- AgentSelectionElement.DEFAULT, style);
+ EntitySelectionElement.ALL, style);
ReferenceType referenceType = entity.getType();
}
if (createInReferenceWidget) {
- selection_inReference = (ReferenceSelectionElement) formFactory
- .createSelectionElement(SelectionType.REFERENCE,
+ selection_inReference = formFactory
+ .createSelectionElement(Reference.class,
getConversationHolder(), element, label,
reference.getInReference(),
- ReferenceSelectionElement.DEFAULT, style);
+ EntitySelectionElement.ALL, style);
}
}
if (referenceType.equals(ReferenceType.Report)) {
// institution
- selection_institution = (InstitutionSelectionElement) formFactory
- .createSelectionElement(SelectionType.INSTITUTION,
+ selection_institution = formFactory
+ .createSelectionElement(Institution.class,
getConversationHolder(), element, "Institution",
reference.getInstitution(),
- InstitutionSelectionElement.DEFAULT, style);
+ EntitySelectionElement.ALL, style);
}
if (referenceType.equals(ReferenceType.Thesis)) {
// school
- selection_institution = (InstitutionSelectionElement) formFactory
- .createSelectionElement(SelectionType.INSTITUTION,
+ selection_institution = formFactory
+ .createSelectionElement(Institution.class,
getConversationHolder(), element, "School",
reference.getSchool(),
- InstitutionSelectionElement.DEFAULT, style);
+ EntitySelectionElement.ALL, style);
}
if (referenceType.equals(ReferenceType.Proceedings)) {
private void createPrintedUnitControls(ICdmFormElement element,
ReferenceType referenceType, Reference reference, int style) {
// in series
- selection_inSeries = (ReferenceSelectionElement) formFactory
- .createSelectionElement(SelectionType.REFERENCE,
+ selection_inSeries = formFactory
+ .createSelectionElement(Reference.class,
getConversationHolder(), element, "In Series",
- reference.getInSeries(),
- ReferenceSelectionElement.DEFAULT, style);
+ (Reference) reference.getInSeries(),
+ EntitySelectionElement.ALL, style);
// editor
text_editor = formFactory.createTextWithLabelElement(element, "Editor",
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
/**
* <p>Constructor for ReferenceBaseDetailSection.</p>
*
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
*/
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.reference.Reference;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IExceptionHandler;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IExceptionHandler;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
/**
/**
* <p>Constructor for ReferenceBaseWizardPage.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
* @param entity a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
*/
* @see eu.etaxonomy.taxeditor.forms.CdmEntityWizardPage#createElement(eu.etaxonomy.taxeditor.forms.ICdmFormElement)
*/
/** {@inheritDoc} */
- public AbstractCdmDetailElement createElement(ICdmFormElement rootElement){
+ public AbstractCdmDetailElement<Reference> createElement(ICdmFormElement rootElement){
ReferenceDetailElement referenceElement = (ReferenceDetailElement) formFactory.createCdmDetailElement(DetailType.REFERENCEBASE, rootElement, SWT.NULL);
referenceElement.addExceptionHandler(this);
referenceElement.setEntity(entity);
package eu.etaxonomy.taxeditor.ui.section.supplemental;
-import org.apache.log4j.Logger;
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.cdm.model.common.OriginalSourceBase;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
/**
* <p>Abstract AbstractOriginalSourceElement class.</p>
* @version 1.0
*/
public abstract class AbstractOriginalSourceElement<T extends OriginalSourceBase> extends AbstractReferencedEntityElement<T> {
- private static final Logger logger = Logger
- .getLogger(AbstractOriginalSourceElement.class);
protected TextWithLabelElement text_idInSource;
protected TextWithLabelElement text_idNamespace;
/**
* <p>Constructor for AbstractOriginalSourceElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
* @param element a T object.
* @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
* @param style a int.
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.cdm.model.common.ReferencedEntityBase;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.cdm.model.reference.Reference;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
public abstract class AbstractReferencedEntityElement<T extends ReferencedEntityBase>
extends AbstractEntityCollectionElement<T> {
- protected ReferenceSelectionElement selection_reference;
+ protected EntitySelectionElement<Reference> selection_reference;
protected TextWithLabelElement text_referenceDetail;
protected TextWithLabelElement text_originaleNameString;
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param section
- * a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
* @param entity
* a T object.
/** {@inheritDoc} */
@Override
public void createControls(ICdmFormElement formElement, int style) {
- selection_reference = (ReferenceSelectionElement) formFactory
- .createSelectionElement(SelectionType.REFERENCE,
+ selection_reference = formFactory
+ .createSelectionElement(Reference.class,
getConversationHolder(), formElement, "Reference",
- null, ReferenceSelectionElement.DEFAULT, style);
+ null, EntitySelectionElement.ALL, style);
text_referenceDetail = formFactory.createTextWithLabelElement(
formElement, "Reference Detail", null, SWT.NULL);
if (hasOriginalNameString)
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.cdm.model.common.Annotation;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
+import eu.etaxonomy.cdm.model.common.AnnotationType;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.term.AnnotationTypeComboElement;
/**
* <p>AnnotationElement class.</p>
public class AnnotationElement extends AbstractEntityCollectionElement<Annotation>{
private TextWithLabelElement text;
- private AnnotationTypeComboElement combo_annotationType;
+ private TermComboElement<AnnotationType> combo_annotationType;
/**
* <p>Constructor for AnnotationElement.</p>
*
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
* @param annotation a {@link eu.etaxonomy.cdm.model.common.Annotation} object.
* @param style a int.
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
*/
public AnnotationElement(CdmFormFactory cdmFormFactory, AbstractFormSection formElement, Annotation annotation, SelectionListener removeListener, int style) {
/** {@inheritDoc} */
@Override
public void createControls(ICdmFormElement element, int style) {
- combo_annotationType = (AnnotationTypeComboElement) formFactory.createTermComboElement(TermComboType.ANNOTATIONTYPE, this, "Annotation Type", null, style);
+ combo_annotationType = formFactory.createTermComboElement(AnnotationType.class, this, "Annotation Type", null, style);
text = formFactory.createMultilineTextWithLabel(this, "Annotation", 100, style);
}
import eu.etaxonomy.cdm.model.common.AnnotationType;
import eu.etaxonomy.cdm.model.common.Language;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
/**
* <p>Constructor for AnnotationSection.</p>
*
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
*/
public AnnotationSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.ui.section.supplemental;\r
+\r
+import eu.etaxonomy.cdm.model.common.CdmBase;\r
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.element.IEntityElement;\r
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 24 Jan 2012\r
+ *\r
+ */\r
+public class CdmBaseElement extends AbstractCdmFormElement implements IEntityElement<CdmBase>{\r
+\r
+ private TextWithLabelElement text_uuid;\r
+ private TextWithLabelElement text_objectId;\r
+ private CdmBase entity;\r
+ /**\r
+ * @param formFactory\r
+ * @param formElement\r
+ */\r
+ public CdmBaseElement(CdmFormFactory formFactory,\r
+ ICdmFormElement formElement, CdmBase entity, int style) {\r
+ \r
+ super(formFactory, formElement);\r
+ text_uuid = formFactory.createTextWithLabelElement(formElement, "UUID", null, style); \r
+ text_objectId = formFactory.createTextWithLabelElement(formElement, "Object ID", null, style);\r
+ setEntity(entity);\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.ui.element.ISelectable#setSelected(boolean)\r
+ */\r
+ @Override\r
+ public void setSelected(boolean selected) {\r
+ // this entity element is not likely to get selected\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.ui.element.IEntityElement#getEntity()\r
+ */\r
+ @Override\r
+ public CdmBase getEntity() {\r
+ return entity;\r
+ }\r
+\r
+ \r
+ public void setEntity(CdmBase entity) {\r
+ \r
+ this.entity = entity; \r
+ \r
+ text_uuid.setText(entity != null ? entity.getUuid().toString() : ""); \r
+ text_objectId.setText(entity != null ? entity.getId()+"" : "");\r
+ }\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.ui.section.supplemental;\r
+\r
+import eu.etaxonomy.cdm.model.common.CdmBase;\r
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 24 Jan 2012\r
+ *\r
+ */\r
+public class CdmBaseSection extends AbstractFormSection<CdmBase> {\r
+ \r
+ private CdmBaseElement cdmBaseElement;\r
+\r
+ /**\r
+ * @param formFactory\r
+ * @param parentElement\r
+ * @param selectionProvider\r
+ * @param style\r
+ */\r
+ public CdmBaseSection(CdmFormFactory formFactory,\r
+ ICdmFormElement parentElement,\r
+ int style) {\r
+\r
+ super(formFactory, parentElement, style);\r
+ cdmBaseElement = formFactory.createCdmBaseElement(this, null, style);\r
+ }\r
+ \r
+ /** {@inheritDoc} */\r
+ @Override\r
+ public void setEntity(CdmBase entity) {\r
+ super.setEntity(entity);\r
+ cdmBaseElement.setEntity(entity);\r
+ }\r
+\r
+}\r
import org.eclipse.swt.events.SelectionListener;
+import eu.etaxonomy.cdm.model.agent.AgentBase;
import eu.etaxonomy.cdm.model.common.Credit;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.AgentSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
*/
public class CreditElement extends AbstractEntityCollectionElement<Credit> {
- private AgentSelectionElement agentSelection;
+ private EntitySelectionElement<AgentBase> agentSelection;
private TextWithLabelElement text;
/**
* </p>
*
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
* @param style
* a int.
* @param cdmFormFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param credit
* a {@link eu.etaxonomy.cdm.model.common.Credit} object.
/** {@inheritDoc} */
@Override
public void createControls(ICdmFormElement element, int style) {
- agentSelection = (AgentSelectionElement) formFactory
- .createSelectionElement(SelectionType.AGENT,
+ agentSelection = formFactory
+ .createSelectionElement(AgentBase.class,
getConversationHolder(), this, "Agent", null,
- AgentSelectionElement.DEFAULT, style);
+ EntitySelectionElement.ALL, style);
text = formFactory.createMultilineTextWithLabel(this, "Text", 100,
style);
}
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.Credit;
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
/**
* <p>Constructor for CreditSection.</p>
*
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
*/
public CreditSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.common.Extension;
import eu.etaxonomy.cdm.model.common.ExtensionType;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.term.ExtensionTypeComboElement;
/**
* <p>ExtensionElement class.</p>
*/
public class ExtensionElement extends AbstractEntityCollectionElement<Extension> {
- private ExtensionTypeComboElement combo_extensionType;
+ private TermComboElement<ExtensionType> combo_extensionType;
private TextWithLabelElement text_extensionValue;
/**
* <p>Constructor for ExtensionElement.</p>
*
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
* @param element a {@link eu.etaxonomy.cdm.model.common.Extension} object.
* @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
* @param style a int.
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
*/
public ExtensionElement(CdmFormFactory cdmFormFactory, AbstractFormSection formElement, Extension element,
SelectionListener removeListener, int style) {
/** {@inheritDoc} */
@Override
public void createControls(ICdmFormElement element, int style) {
- combo_extensionType = (ExtensionTypeComboElement) formFactory.createTermComboElement(TermComboType.EXTENSIONTYPE, this, null, null, style);
+ combo_extensionType = formFactory.createTermComboElement(ExtensionType.class, this, null, null, style);
text_extensionValue = formFactory.createTextWithLabelElement(element, null, null, style);
- text_extensionValue.getLayoutComposite().setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+ text_extensionValue.getLayoutComposite().setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
}
/* (non-Javadoc)
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.Extension;
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
/**
* <p>Constructor for ExtensionSection.</p>
*
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
*/
public ExtensionSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.common.ICdmBase;
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
/**
* <p>HeadlineSection class.</p>
/**
* <p>Constructor for HeadlineSection.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public HeadlineSection(CdmFormFactory cdmFormFactory, ICdmFormElement parentElement,
int style) {
- super(cdmFormFactory, null, parentElement, style);
+ super(cdmFormFactory, parentElement, style);
}
/** {@inheritDoc} */
public void setEntity(ICdmBase cdmBase) {
ICdmBase entity = (ICdmBase) HibernateProxyHelper.deproxy(cdmBase);
super.setEntity(entity);
+
setText(entity.getClass().getSimpleName() + (entity instanceof IdentifiableEntity ? ": " + ((IdentifiableEntity) entity).getTitleCache() : ""));
layout();
}
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.cdm.model.common.IdentifiableSource;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
/**
* <p>IdentifiableSourceElement class.</p>
/**
* <p>Constructor for IdentifiableSourceElement.</p>
*
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
* @param element a {@link eu.etaxonomy.cdm.model.common.IdentifiableSource} object.
* @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
* @param style a int.
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
*/
public IdentifiableSourceElement(CdmFormFactory cdmFormFactory, AbstractFormSection formElement, IdentifiableSource element,
SelectionListener removeListener, int style) {
import eu.etaxonomy.cdm.model.common.Marker;
import eu.etaxonomy.cdm.model.common.MarkerType;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.term.AbstractTermComboElement;
/**
* <p>MarkerElement class.</p>
* @param element a {@link eu.etaxonomy.cdm.model.common.Marker} object.
* @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
* @param style a int.
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
*/
public MarkerElement(CdmFormFactory cdmFormFactory, AbstractFormSection formElement, Marker element,
SelectionListener removeListener, int style) {
super(cdmFormFactory, formElement, element, removeListener, null, style);
}
- private AbstractTermComboElement<MarkerType> combo_markerType;
+ private TermComboElement<MarkerType> combo_markerType;
private CheckboxElement checkbox_markerState;
@Override
public void createControls(ICdmFormElement element, int style) {
checkbox_markerState = formFactory.createCheckbox(this, null, false, style);
- combo_markerType = formFactory.createTermComboElement(TermComboType.MARKERTYPE, this, null, null, style);
+ combo_markerType = formFactory.createTermComboElement(MarkerType.class, this, null, null, style);
}
/* (non-Javadoc)
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.AnnotatableEntity;
import eu.etaxonomy.cdm.model.common.Marker;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
/**
* <p>Constructor for MarkerSection.</p>
*
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
*/
public MarkerSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
import eu.etaxonomy.cdm.model.agent.AgentBase;
import eu.etaxonomy.cdm.model.media.Rights;
import eu.etaxonomy.cdm.model.media.RightsTerm;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.AgentSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.AbstractTermComboElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
*/
public class RightsElement extends AbstractEntityCollectionElement<Rights> {
+ private TermComboElement<RightsTerm> combo_rightsType;
+ private EntitySelectionElement<AgentBase> selection_agent;
+ private TextWithLabelElement text;
+
/**
* <p>
* Constructor for RightsElement.
* </p>
*
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
* @param element
* a {@link eu.etaxonomy.cdm.model.media.Rights} object.
* @param style
* a int.
* @param cdmFormFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
*/
public RightsElement(CdmFormFactory cdmFormFactory,
super(cdmFormFactory, formElement, element, removeListener, null, style);
}
- private AbstractTermComboElement<RightsTerm> combo_rightsType;
- private AbstractSelectionElement<AgentBase> selection_agent;
- private TextWithLabelElement text;
/*
* (non-Javadoc)
@Override
public void createControls(ICdmFormElement element, int style) {
combo_rightsType = formFactory.createTermComboElement(
- TermComboType.RIGHTSTYPE, this, "Rights Type", null, style);
+ RightsTerm.class, this, "Rights Type", null, style);
selection_agent = formFactory.createSelectionElement(
- SelectionType.AGENT, getConversationHolder(), this, "Agent",
- null, AgentSelectionElement.DEFAULT, style);
+ AgentBase.class, getConversationHolder(), this, "Agent",
+ null, EntitySelectionElement.ALL, style);
text = formFactory.createMultilineTextWithLabel(this, "Text", 100,
style);
}
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
import eu.etaxonomy.cdm.model.media.Rights;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
/**
* <p>Constructor for RightsSection.</p>
*
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
*/
public RightsSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.IIdentifiableEntity;
import eu.etaxonomy.cdm.model.common.IdentifiableSource;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
/**
* <p>Constructor for SourceSection.</p>
*
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
*/
public SourceSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
import eu.etaxonomy.cdm.model.common.User;
import eu.etaxonomy.cdm.model.common.VersionableEntity;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEntityElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEntityElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
/**
* <p>VersionElement class.</p>
private Label label_created;
private Label label_updated;
- private TextWithLabelElement text_uuid;
- private TextWithLabelElement text_objectId;
+
private VersionableEntity entity;
- private boolean showDebug;
/**
* <p>Constructor for VersionElement.</p>
*
* @param style a int.
- * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param entity a {@link eu.etaxonomy.cdm.model.common.VersionableEntity} object.
*/
- public VersionElement(CdmFormFactory toolkit, ICdmFormElement parentElement, VersionableEntity entity, int style) {
- super(toolkit, parentElement);
-
- showDebug = PreferencesUtil.getPreferenceStore().getBoolean(PreferencesUtil.SHOW_DEBUG_INFORMATION);
-
- label_created = toolkit.createLabel(getLayoutComposite(), null);
- label_created.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+ public VersionElement(CdmFormFactory formFactory, ICdmFormElement parentElement, VersionableEntity entity, int style) {
+ super(formFactory, parentElement);
+
+ label_created = formFactory.createLabel(getLayoutComposite(), null, style);
+ label_created.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
- label_updated = toolkit.createLabel(getLayoutComposite(), null);
- label_updated.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+ label_updated = formFactory.createLabel(getLayoutComposite(), null, style);
+ label_updated.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
- if(showDebug){
- text_uuid = toolkit.createTextWithLabelElement(parentElement, "UUID", null, style);
-
- text_objectId = toolkit.createTextWithLabelElement(parentElement, "Object ID", null, style);
- }
+
+ setEntity(entity);
}
/**
this.entity = entity;
- String createdString = "Created "
- + dateFormat(entity.getCreated())
- + " by " + userFormat(entity.getCreatedBy());
- label_created.setText(createdString);
-
- String updatedString = "Updated "
- + dateFormat(entity.getUpdated())
- + " by " + userFormat(entity.getUpdatedBy());
- label_updated.setText(updatedString);
-
-
+ String createdString = "";
+ String updatedString = "";
- if(showDebug){
- text_uuid.setText(entity.getUuid().toString());
-
- text_objectId.setText(entity.getId()+"");
+ if(entity != null){
+ createdString = "Created "
+ + dateFormat(entity.getCreated())
+ + " by " + userFormat(entity.getCreatedBy());
+ updatedString = "Updated "
+ + dateFormat(entity.getUpdated())
+ + " by " + userFormat(entity.getUpdatedBy());
}
+ label_created.setText(createdString);
+ label_updated.setText(updatedString);
}
private String dateFormat(DateTime dateTime){
package eu.etaxonomy.taxeditor.ui.section.supplemental;
-import org.apache.log4j.Logger;
-
import eu.etaxonomy.cdm.model.common.VersionableEntity;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
/**
* <p>VersionSection class.</p>
*/
public class VersionSection extends AbstractFormSection<VersionableEntity>{
- private static final Logger logger = Logger.getLogger(VersionSection.class);
private VersionElement versionElement;
+
/**
* <p>Constructor for VersionSection.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public VersionSection(CdmFormFactory cdmFormFactory, ICdmFormElement parentElement,
int style) {
- super(cdmFormFactory, null, parentElement, style);
+ super(cdmFormFactory, parentElement, style);
versionElement = cdmFormFactory.createVersionElement(this, null, style);
}
import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
/**
* <p>ParsingMessageElement class.</p>
/**
* <p>Constructor for ParsingMessageElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param parserProblem a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem} object.
* @param style a int.
*/
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
/**
* <p>Constructor for ParsingMessagesSection.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
* @param style a int.
*/
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.SWT;
+import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
private CheckboxElement checkbox_useNameCache;
- private ReferenceSelectionElement selection_secundum;
+ private EntitySelectionElement<Reference> selection_secundum;
private TextWithLabelElement text_appendedPhrase;
* </p>
*
* @param cdmFormFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param style
* a int.
"Title Cache", entity.getTitleCache(),
entity.isProtectedTitleCache(), style);
- selection_secundum = (ReferenceSelectionElement) formFactory
- .createSelectionElement(SelectionType.REFERENCE,
+ selection_secundum = formFactory
+ .createSelectionElement(Reference.class,
getConversationHolder(), formElement, "Secundum",
- entity.getSec(), ReferenceSelectionElement.DEFAULT,
+ entity.getSec(), EntitySelectionElement.ALL,
style);
text_appendedPhrase = formFactory.createTextWithLabelElement(
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
/**
* <p>Constructor for TaxonBaseDetailSection.</p>
*
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
*/
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.TaxonSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* @author n.hoffmann
*/
public class TaxonDetailElement extends AbstractEntityCollectionElement<Taxon> {
- private TaxonSelectionElement selection_taxon;
+ private EntitySelectionElement<Taxon> selection_taxon;
/**
* @param formFactory
*/
@Override
public void createControls(ICdmFormElement element, int style) {
- selection_taxon = (TaxonSelectionElement) formFactory
- .createSelectionElement(SelectionType.TAXON,
+ selection_taxon = formFactory
+ .createSelectionElement(Taxon.class,
getConversationHolder(), element, "Taxon", null,
- TaxonSelectionElement.NOTHING, style);
+ EntitySelectionElement.NOTHING, style);
}
/*
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2009 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.section.taxon;
+
+import org.eclipse.ui.IEditorInput;
+
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
+import eu.etaxonomy.taxeditor.model.TaxonRelationshipTypeInverseContainer;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
+
+/**
+ * @author n.hoffmann
+ * @date Dec 1, 2011
+ *
+ */
+public class TaxonRelationshipDetailElement extends AbstractCdmDetailElement<TaxonRelationship> {
+
+ private TermComboElement<TaxonRelationshipTypeInverseContainer> combo_taxonRelationshipType;
+
+ private EntitySelectionElement<Taxon> selection_relatedTaxon;
+
+ public TaxonRelationshipDetailElement(CdmFormFactory formFactory,
+ ICdmFormElement formElement) {
+ super(formFactory, formElement);
+ }
+
+ @Override
+ protected void createControls(ICdmFormElement formElement,
+ TaxonRelationship entity, int style) {
+ combo_taxonRelationshipType = formFactory.createTermComboElement(
+ TaxonRelationshipTypeInverseContainer.class,
+ formElement, "Relationship Type",
+ getTaxonRelationshipTypeInverseContainer(), style);
+ combo_taxonRelationshipType.setEnabled(false);
+ selection_relatedTaxon = formFactory.createSelectionElement(
+ Taxon.class, getConversationHolder(),
+ formElement, "Related Taxon", getRelatedTaxon(),
+ EntitySelectionElement.SELECTABLE, style);
+ }
+
+ private Taxon getRelatedTaxon() {
+ return TaxonRelationshipTypeInverseContainer.RelatedTaxon(getSourceTaxon(), getEntity());
+ }
+
+ private TaxonRelationshipTypeInverseContainer getTaxonRelationshipTypeInverseContainer(){
+ return TaxonRelationshipTypeInverseContainer.CreateFromSource(getSourceTaxon(), getEntity());
+ }
+
+ private Taxon getSourceTaxon(){
+ IEditorInput editorInput = StoreUtil.getActiveEditorInput();
+ return (Taxon) editorInput.getAdapter(Taxon.class);
+ }
+
+ @Override
+ public void handleEvent(Object eventSource) {
+ if (eventSource == selection_relatedTaxon){
+ boolean inverse = getTaxonRelationshipTypeInverseContainer().isInverse();
+ Taxon relatedTaxon = selection_relatedTaxon.getEntity();
+ if(inverse){
+ getEntity().setFromTaxon(relatedTaxon);
+ }else{
+ getEntity().setToTaxon(relatedTaxon);
+ }
+ }
+ firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
+ }
+}
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2009 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.section.taxon;
+
+import org.eclipse.jface.viewers.ISelectionProvider;
+
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
+
+/**
+ * @author n.hoffmann
+ * @date Dec 1, 2011
+ *
+ */
+public class TaxonRelationshipDetailSection extends AbstractCdmDetailSection<TaxonRelationship>{
+
+ public TaxonRelationshipDetailSection(CdmFormFactory formFactory,
+ ConversationHolder conversation, ICdmFormElement parentElement,
+ ISelectionProvider selectionProvider, int style) {
+ super(formFactory, conversation, parentElement, selectionProvider, style);
+ }
+
+ @Override
+ protected DetailType getDetailType() {
+ return DetailType.TAXON_RELATIONSHIP;
+ }
+
+ @Override
+ public String getHeading() {
+ return "Taxon Relationship";
+ }
+
+}
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.cdm.model.common.Group;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.GroupSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
*
public class GroupsByUserDetailElement extends
AbstractEntityCollectionElement<Group> {
- private GroupSelectionElement selection_group;
+ private EntitySelectionElement<Group> selection_group;
/**
* @param formFactory
*/
@Override
public void createControls(ICdmFormElement element, int style) {
- selection_group = (GroupSelectionElement) formFactory
- .createSelectionElement(SelectionType.GROUP,
+ selection_group = formFactory
+ .createSelectionElement(Group.class,
getConversationHolder(), element, "Group", getEntity(),
- GroupSelectionElement.DEFAULT, style);
+ EntitySelectionElement.NOTHING, style);
}
/*
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.Group;
import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.GroupSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.GroupSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
*/
package eu.etaxonomy.taxeditor.ui.section.user;
-import eu.etaxonomy.cdm.api.service.IUserService;
+import eu.etaxonomy.cdm.model.agent.Person;
import eu.etaxonomy.cdm.model.common.User;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.password.EditPasswordElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.PersonSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* @author n.hoffmann
public class UserDetailElement extends AbstractCdmDetailElement<User> {
private TextWithLabelElement text_username;
- private EditPasswordElement element_editPassword;
private TextWithLabelElement text_emailAdress;
- private PersonSelectionElement selection_person;
+ private EntitySelectionElement<Person> selection_person;
private CheckboxElement checkbox_credentialsNonExpired;
private CheckboxElement checkbox_enabled;
private CheckboxElement checkbox_accountNonLocked;
"Username", entity.getUsername(), style);
if (userIsAuthenticated() || CdmStore.getLoginManager().isAdmin()) {
- element_editPassword = formFactory.createEditPasswordElement(
+ formFactory.createEditPasswordElement(
formElement, "Change Password", getConversationHolder(),
entity, style);
}
text_emailAdress = formFactory.createTextWithLabelElement(formElement,
"Email Adress", entity.getEmailAddress(), style);
- selection_person = (PersonSelectionElement) formFactory
- .createSelectionElement(SelectionType.PERSON,
- getConversationHolder(), formElement, "Person",
- entity.getPerson(), PersonSelectionElement.DEFAULT,
+ selection_person = formFactory
+ .createSelectionElement(Person.class,
+ getConversationHolder(),
+ formElement,
+ "Person",
+ entity.getPerson(),
+ EntitySelectionElement.EDITABLE | EntitySelectionElement.SELECTABLE,
style);
checkbox_accountNonExpired = formFactory.createCheckbox(formElement,
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
/**
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
/**
* @see eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage#createElement(eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement)
*/
@Override
- public AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
+ public AbstractCdmDetailElement<User> createElement(ICdmFormElement rootElement) {
UserDetailElement userElement = (UserDetailElement) formFactory.createCdmDetailElement(DetailType.USER, rootElement, SWT.NULL);
userElement.setEntity(getEntity());
return userElement;
--- /dev/null
+/**\r
+* Copyright (C) 2011 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.ui.section.userecords;\r
+\r
+import java.util.ArrayList;\r
+import java.util.Iterator;\r
+import java.util.List;\r
+import java.util.ListIterator;\r
+import java.util.Map;\r
+import java.util.Set;\r
+import org.apache.log4j.Logger;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.events.SelectionListener;\r
+import eu.etaxonomy.cdm.model.common.Language;\r
+import eu.etaxonomy.cdm.model.common.LanguageString;\r
+import eu.etaxonomy.cdm.model.common.Marker;\r
+import eu.etaxonomy.cdm.model.description.CategoricalData;\r
+import eu.etaxonomy.cdm.model.description.Modifier;\r
+import eu.etaxonomy.cdm.model.description.State;\r
+import eu.etaxonomy.cdm.model.description.StateData;\r
+import eu.etaxonomy.taxeditor.editor.UsageTermCollection;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+import eu.etaxonomy.taxeditor.store.TermStore;\r
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;\r
+\r
+ \r
+/**\r
+ * The context manager mediates context start/stop and workbench shutdowns to all registered listeners.\r
+ *\r
+ * @author a.theys \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class UseRecordDetailElement extends\r
+ AbstractCdmDetailElement<CategoricalData> implements SelectionListener {\r
+\r
+ private static final Logger logger = Logger\r
+ .getLogger(UseRecordDetailElement.class);\r
+\r
+ private TermComboElement<State> combo_UseCategory;\r
+ private TermComboElement<State> combo_UseSubCategory;\r
+ private TermComboElement<Modifier> combo_PlantPart;\r
+ private TermComboElement<Modifier> combo_Country;\r
+ private TermComboElement<Modifier> combo_HumanGroup;\r
+ private TermComboElement<Modifier> combo_EthnicGroup;\r
+\r
+ public UseRecordDetailElement(CdmFormFactory formFactory,\r
+ ICdmFormElement formElement) {\r
+ super(formFactory, formElement);\r
+ }\r
+\r
+ /** {@inheritDoc} */\r
+ @Override\r
+ protected void createControls(ICdmFormElement formElement,\r
+ CategoricalData entity, int style) {\r
+\r
+ combo_UseCategory = formFactory.createTermComboElement(State.class, this, UsageTermCollection.useCategoryVocabularyLabel, null, style);\r
+ combo_UseCategory.addSelectionListener(this);\r
+ combo_UseSubCategory = formFactory.createTermComboElement(State.class, this, UsageTermCollection.useSubCategoryVocabularyLabel, null, style);\r
+ combo_PlantPart = formFactory.createTermComboElement(Modifier.class, this, UsageTermCollection.plantPartLabel, null, style);\r
+ combo_HumanGroup = formFactory.createTermComboElement(Modifier.class, this, UsageTermCollection.humanGroupLabel, null, style);\r
+ combo_HumanGroup.addSelectionListener(this);\r
+ combo_EthnicGroup = formFactory.createTermComboElement(Modifier.class, this, UsageTermCollection.ethnicGroupLabel, null, style);\r
+ combo_Country = formFactory.createTermComboElement(Modifier.class, this, UsageTermCollection.countryLabel, null, style);\r
+ \r
+\r
+ List<State> termsUseCategory = setUseCategoryComboTerms(TermStore.getTerms(State.class, null, false));\r
+ combo_UseCategory.setTerms(termsUseCategory);\r
+ combo_UseCategory.setSelection(stateSelection(UsageTermCollection.useCategoryVocabularyLabel));\r
+ \r
+ List<State> termsSubCategory = setUseCategoryComboTerms(TermStore.getTerms(State.class, null, false), combo_UseCategory.getSelection());\r
+ \r
+ if (termsSubCategory != null) {\r
+ combo_UseSubCategory.setTerms(termsSubCategory);\r
+ combo_UseSubCategory.setSelection(stateSelection(UsageTermCollection.useSubCategoryVocabularyLabel));\r
+ combo_UseSubCategory.setEnabled(true);\r
+ }\r
+ else {\r
+ combo_UseSubCategory.setEnabled(false);\r
+ }\r
+ \r
+ List<Modifier> plantPartsToAdd = setModifierComboTerms(TermStore.getTerms(Modifier.class, null, false), UsageTermCollection.plantPartLabel);\r
+ combo_PlantPart.setTerms(plantPartsToAdd);\r
+ combo_PlantPart.setSelection(modifierSelection(UsageTermCollection.plantPartLabel));\r
+ \r
+ List<Modifier> countriesToAdd = setModifierComboTerms(TermStore.getTerms(Modifier.class, null, false), UsageTermCollection.countryLabel);\r
+ combo_Country.setTerms(countriesToAdd);\r
+ combo_Country.setSelection(modifierSelection(UsageTermCollection.countryLabel));\r
+ \r
+ List<Modifier> humanGroupToAdd = setModifierComboTerms(TermStore.getTerms(Modifier.class, null, false), UsageTermCollection.humanGroupLabel);\r
+ combo_HumanGroup.setTerms(humanGroupToAdd);\r
+ combo_HumanGroup.setSelection(modifierSelection(UsageTermCollection.humanGroupLabel));\r
+ \r
+ List<Modifier> ethnicGroupToAdd = setEthnicGroupComboTerms(TermStore.getTerms(Modifier.class, null, false), combo_HumanGroup.getSelection());\r
+ if (ethnicGroupToAdd != null) {\r
+ combo_EthnicGroup.setTerms(ethnicGroupToAdd);\r
+ combo_EthnicGroup.setSelection(modifierSelection(UsageTermCollection.ethnicGroupLabel));\r
+ combo_EthnicGroup.setEnabled(true);\r
+ } else {\r
+ combo_EthnicGroup.setEnabled(false);\r
+ }\r
+\r
+ }\r
+\r
+ /**\r
+ * Returns the select modifier\r
+ * @param comboCategory\r
+ * @return\r
+ */\r
+ private Modifier modifierSelection(String comboCategory) {\r
+ if(!getEntity().getModifiers().isEmpty()) {\r
+ for (Modifier modifier : getEntity().getModifiers()) {\r
+ if(GetVocabularyType(modifier, comboCategory)) {\r
+ return modifier;\r
+ }\r
+ }\r
+ } else {\r
+ return null;\r
+ }\r
+ return null;\r
+ \r
+ }\r
+ \r
+ /**\r
+ * Returns the selected state\r
+ * @param comboCategory\r
+ * @return\r
+ */\r
+ private State stateSelection(String comboCategory) {\r
+ if (!getEntity().getStates().isEmpty()) {\r
+ for (StateData statedata : getEntity().getStates()) {\r
+ if (statedata.getModifyingText().get(CdmStore.getDefaultLanguage()) != null) {\r
+ String testString = statedata.getModifyingText().get(CdmStore.getDefaultLanguage()).getText();\r
+ if(testString.equals(comboCategory)) {\r
+ if(statedata.getState() !=null) {\r
+ return statedata.getState();\r
+ }\r
+ }\r
+ } \r
+ }\r
+ }\r
+ else {\r
+ return null;\r
+ }\r
+ return null;\r
+ \r
+ }\r
+ \r
+ /**\r
+ * This function sets the combo terms (Besides EthnicGroup\r
+ * @param listOfTerms\r
+ * @param modType\r
+ * @return\r
+ */\r
+ private List<Modifier> setModifierComboTerms(List<Modifier> listOfTerms, String modType) {\r
+ List<Modifier> termsToAdd = new ArrayList<Modifier>();\r
+ for (Modifier term : listOfTerms) {\r
+\r
+ if ((term.getPartOf() != null) && (term.getPartOf().getTitleCache().equals(modType))) {\r
+ termsToAdd.add(term);\r
+ }\r
+ else if ((term.getVocabulary() != null) && (term.getPartOf() == null) && (term.getVocabulary().getTitleCache().equals(modType))) {\r
+ termsToAdd.add(term);\r
+ }\r
+ }\r
+ \r
+ return termsToAdd;\r
+ }\r
+ \r
+\r
+ /**\r
+ * This function sets the Use Category combo term\r
+ * @param listOfTerms\r
+ * @return\r
+ */\r
+ private List<State> setUseCategoryComboTerms(List<State> listOfTerms) {\r
+ List<State> termsToAdd = new ArrayList<State>();\r
+ for (State term : listOfTerms) {\r
+\r
+ if ((term.getPartOf() != null) && (term.getPartOf().getTitleCache().equals(UsageTermCollection.useCategoryVocabularyLabel))) {\r
+ termsToAdd.add(term);\r
+ }\r
+ else if ((term.getVocabulary() !=null) && (term.getPartOf() == null) && (term.getVocabulary().getTitleCache().equals(UsageTermCollection.useCategoryVocabularyLabel))) {\r
+ termsToAdd.add(term);\r
+ }\r
+ }\r
+ return termsToAdd;\r
+\r
+ }\r
+\r
+ /**\r
+ * This function sets the Use SubCategory combo term\r
+ * @param listOfTerms\r
+ * @param selectedUseCategory\r
+ * @return\r
+ */\r
+ private List<State> setUseCategoryComboTerms(List<State> listOfTerms,\r
+ State selectedUseCategory) {\r
+ List<State> termsToAdd = new ArrayList<State>();\r
+ if (combo_UseCategory.getSelection() != null) {\r
+ \r
+ for (State term : listOfTerms) {\r
+ if ((term.getPartOf() != null) && (term.getPartOf().getTitleCache().equals(selectedUseCategory.getTitleCache()))) {\r
+ termsToAdd.add(term);\r
+ }\r
+ else if ((term.getVocabulary() !=null) && (term.getVocabulary().getTitleCache().equals(selectedUseCategory.getTitleCache()))) {\r
+ termsToAdd.add(term);\r
+ }\r
+ \r
+ }\r
+ }\r
+ else if (!getEntity().getStates().isEmpty()) {\r
+ for (StateData stateData : getEntity().getStates()) {\r
+ if (stateData.getModifyingText().get(CdmStore.getDefaultLanguage()) != null) {\r
+ if ((stateData.getState() != null) && (stateData.getModifyingText().get(CdmStore.getDefaultLanguage()).getText() == UsageTermCollection.useCategoryVocabularyLabel)) {\r
+ for (State term : listOfTerms) {\r
+ if ((term.getPartOf() != null) && (term.getPartOf().getTitleCache().equals(stateData.getState().getTitleCache()))) {\r
+ termsToAdd.add(term);\r
+ } else if ((term.getVocabulary() != null) && (term.getVocabulary().getTitleCache().equals(stateData.getState().getTitleCache()))) {\r
+ termsToAdd.add(term);\r
+ }\r
+ }\r
+ \r
+ }\r
+ }\r
+ }\r
+ \r
+ }\r
+ \r
+ else {\r
+ return null;\r
+ }\r
+\r
+ return termsToAdd;\r
+ }\r
+ \r
+ \r
+ /**\r
+ * This function sets the EthnicGroup combo term\r
+ * @param listOfTerms\r
+ * @param selectedHumangroup\r
+ * @return\r
+ */\r
+ private List<Modifier> setEthnicGroupComboTerms(List<Modifier> listOfTerms,\r
+ Modifier selectedHumangroup) {\r
+ List<Modifier> termsToAdd = new ArrayList<Modifier>();\r
+ if (combo_HumanGroup.getSelection() != null) {\r
+ for (Modifier term : listOfTerms) {\r
+ \r
+ if ((term.getPartOf() != null) && (term.getPartOf().getTitleCache().equals(selectedHumangroup.getTitleCache()))) {\r
+ termsToAdd.add(term);\r
+ }\r
+ else if ((term.getVocabulary() != null) && (term.getVocabulary().getTitleCache().equals(selectedHumangroup.getTitleCache()))) {\r
+ termsToAdd.add(term);\r
+ }\r
+ }\r
+ }\r
+ else if (!getEntity().getModifiers().isEmpty()) {\r
+ for (Modifier modifier : getEntity().getModifiers()) {\r
+ if (modifier.getMarkers() != null) {\r
+ for (Marker marker : modifier.getMarkers()) {\r
+ if(marker.getMarkerType().getTitleCache().equals(UsageTermCollection.humanGroupLabel)) {\r
+ for (Modifier term : listOfTerms) {\r
+ if ((term.getPartOf() != null) && (term.getPartOf().getTitleCache().equals(modifier.getTitleCache()))) {\r
+ termsToAdd.add(modifier);\r
+ } else if ((term.getVocabulary() != null) && (term.getVocabulary().getTitleCache().equals(modifier.getTitleCache()))) {\r
+ termsToAdd.add(modifier);\r
+ }\r
+ }\r
+ \r
+ }\r
+ }\r
+ }\r
+ }\r
+ } else {\r
+ return null;\r
+ }\r
+ \r
+ return termsToAdd;\r
+ }\r
+\r
+ \r
+ /** {@inheritDoc} */\r
+ @Override\r
+ public void handleEvent(Object eventSource) {\r
+ if (eventSource == combo_UseCategory) {\r
+ if (combo_UseCategory.getSelection() != null) {\r
+ boolean isChanged = false;\r
+ boolean isUseCategoryChanged = false;\r
+ if (!getEntity().getStates().isEmpty()) {\r
+ for (StateData useCategoryStateDataCheck : getEntity().getStates()) {\r
+ Map<Language, LanguageString> modText = useCategoryStateDataCheck.getModifyingText();\r
+ if(modText.get(CdmStore.getDefaultLanguage()) != null && modText.get(CdmStore.getDefaultLanguage()).getText().equals(UsageTermCollection.useCategoryVocabularyLabel)) {\r
+ if(!useCategoryStateDataCheck.getState().getTitleCache().equals(combo_UseCategory.getSelection().getTitleCache())) {\r
+ isUseCategoryChanged = true;\r
+ }\r
+ \r
+ }\r
+ }\r
+ ListIterator<StateData> itrExistingStates = getEntity().getStates().listIterator();\r
+ while(itrExistingStates.hasNext()) {\r
+ StateData existingStateData = itrExistingStates.next();\r
+ Map<Language, LanguageString> modifyingText = existingStateData\r
+ .getModifyingText();\r
+ if (modifyingText.get(CdmStore.getDefaultLanguage()) != null) {\r
+ if (modifyingText.get(CdmStore.getDefaultLanguage()).getText().equals(UsageTermCollection.useCategoryVocabularyLabel)) {\r
+ isChanged = true;\r
+ if(!existingStateData.getState().getTitleCache().equals(combo_UseCategory.getSelection().getTitleCache())) {\r
+ itrExistingStates.remove();\r
+ StateData stateData = StateData.NewInstance(combo_UseCategory.getSelection());\r
+ stateData.setState(combo_UseCategory.getSelection());\r
+ stateData.putModifyingText(CdmStore.getDefaultLanguage(),UsageTermCollection.useCategoryVocabularyLabel);\r
+ itrExistingStates.add(stateData);\r
+ \r
+ }\r
+ } else if (modifyingText.get(CdmStore.getDefaultLanguage()).getText().equals(UsageTermCollection.useSubCategoryVocabularyLabel) && isUseCategoryChanged == true) {\r
+ itrExistingStates.remove();\r
+ }\r
+ }\r
+ }\r
+ }\r
+ \r
+ \r
+ if (isChanged == false) {\r
+ StateData stateData = StateData\r
+ .NewInstance(combo_UseCategory.getSelection());\r
+ stateData.setState(combo_UseCategory.getSelection());\r
+ stateData.putModifyingText(CdmStore.getDefaultLanguage(), UsageTermCollection.useCategoryVocabularyLabel);\r
+ getEntity().addState(stateData);\r
+ }\r
+ \r
+ combo_UseSubCategory.setEnabled(true);\r
+ \r
+ }\r
+ else {\r
+ if (!getEntity().getStates().isEmpty()) {\r
+ Iterator<StateData> itr = getEntity().getStates().iterator();\r
+ while(itr.hasNext()) {\r
+ StateData stateToRemove = itr.next();\r
+ itr.remove();\r
+ }\r
+ List<State> termsSubCategory = new ArrayList<State>();\r
+ State emptyState = State.NewInstance();\r
+ termsSubCategory.add(emptyState);\r
+ combo_UseSubCategory.setTerms(termsSubCategory);\r
+ combo_UseSubCategory.setEnabled(false);\r
+ }\r
+ }\r
+ }\r
+ \r
+ if (eventSource == combo_UseSubCategory) {\r
+ if (combo_UseSubCategory.getSelection() != null) {\r
+ boolean isChanged = false;\r
+ if (!getEntity().getStates().isEmpty()) {\r
+ ListIterator<StateData> itrExistingStates = getEntity().getStates().listIterator();\r
+ while(itrExistingStates.hasNext()) {\r
+ StateData existingStateData = itrExistingStates.next();\r
+ Map<Language, LanguageString> modifyingText = existingStateData\r
+ .getModifyingText();\r
+ if (modifyingText.get(CdmStore.getDefaultLanguage()) != null) {\r
+ if (modifyingText.get(CdmStore.getDefaultLanguage()).getText().equals(UsageTermCollection.useSubCategoryVocabularyLabel)) {\r
+ isChanged = true;\r
+ if(!existingStateData.getState().getTitleCache().equals(combo_UseSubCategory.getSelection().getTitleCache())) {\r
+ itrExistingStates.remove();\r
+ StateData stateData = StateData.NewInstance(combo_UseSubCategory.getSelection());\r
+ stateData.setState(combo_UseSubCategory.getSelection());\r
+ stateData.putModifyingText(CdmStore.getDefaultLanguage(),UsageTermCollection.useSubCategoryVocabularyLabel);\r
+ itrExistingStates.add(stateData);\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ \r
+ if (isChanged == false){\r
+ StateData stateData = StateData\r
+ .NewInstance(combo_UseSubCategory.getSelection());\r
+ stateData.setState(combo_UseSubCategory.getSelection());\r
+ stateData.putModifyingText(CdmStore.getDefaultLanguage(), UsageTermCollection.useSubCategoryVocabularyLabel);\r
+ getEntity().addState(stateData);\r
+ }\r
+ \r
+ } else {\r
+ if (!getEntity().getStates().isEmpty()) {\r
+ Iterator<StateData> itrStateData = getEntity().getStates().iterator();\r
+ while(itrStateData.hasNext()) {\r
+ StateData existingStateData = itrStateData.next();\r
+ Map<Language, LanguageString> modifyingText = existingStateData\r
+ .getModifyingText();\r
+\r
+ if (modifyingText.get(CdmStore.getDefaultLanguage()) != null) {\r
+ if (modifyingText.get(CdmStore.getDefaultLanguage()).getText() == UsageTermCollection.useSubCategoryVocabularyLabel) {\r
+ itrStateData.remove();\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ if (eventSource == combo_PlantPart) {\r
+ if (combo_PlantPart.getSelection() != null) {\r
+ Iterator<Modifier> itrExistingModifiers = getEntity().getModifiers().iterator();\r
+ while (itrExistingModifiers.hasNext()) {\r
+ Modifier modifier = itrExistingModifiers.next();\r
+ if(GetVocabularyType(modifier, UsageTermCollection.plantPartLabel)) {\r
+ itrExistingModifiers.remove();\r
+ }\r
+ \r
+ } \r
+ Modifier plantPart = combo_PlantPart.getSelection();\r
+ getEntity().addModifier(plantPart);\r
+ } else {\r
+ Set<Modifier> modifiers = getEntity().getModifiers();\r
+ if(!modifiers.isEmpty()) {\r
+ Iterator<Modifier> itr = modifiers.iterator();\r
+ while (itr.hasNext()) {\r
+ Modifier currentMod = itr.next();\r
+ if(GetVocabularyType(currentMod, UsageTermCollection.plantPartLabel)) {\r
+ itr.remove();\r
+ }\r
+ }\r
+ }\r
+ \r
+ }\r
+ }\r
+ if (eventSource == combo_Country) {\r
+ if (combo_Country.getSelection() != null) {\r
+ Iterator<Modifier> itrExistingModifiers = getEntity().getModifiers().iterator();\r
+ while (itrExistingModifiers.hasNext()) {\r
+ Modifier modifier = itrExistingModifiers.next();\r
+ if(GetVocabularyType(modifier, UsageTermCollection.countryLabel)) {\r
+ itrExistingModifiers.remove();\r
+ }\r
+ \r
+ }\r
+ Modifier country = combo_Country.getSelection();\r
+ getEntity().addModifier(country);\r
+ } else {\r
+ Set<Modifier> modifiers = getEntity().getModifiers();\r
+ if(!modifiers.isEmpty()) {\r
+ Iterator<Modifier> itr = modifiers.iterator();\r
+ while (itr.hasNext()) {\r
+ Modifier currentMod = itr.next();\r
+ if(GetVocabularyType(currentMod, UsageTermCollection.countryLabel)) {\r
+ itr.remove();\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ if (eventSource == combo_HumanGroup) {\r
+ if (combo_HumanGroup.getSelection() != null) {\r
+ boolean isHumanGroupChanged = true;\r
+ for (Modifier modToCheck: getEntity().getModifiers()) {\r
+ if(modToCheck.equals(combo_HumanGroup.getSelection()) && (GetVocabularyType(modToCheck, UsageTermCollection.humanGroupLabel))) {\r
+ isHumanGroupChanged = false;\r
+ }\r
+ \r
+ \r
+ }\r
+ Iterator<Modifier> itrExistingModifiers = getEntity().getModifiers().iterator();\r
+ while (itrExistingModifiers.hasNext()) {\r
+ Modifier modifier = itrExistingModifiers.next();\r
+ if((GetVocabularyType(modifier, UsageTermCollection.humanGroupLabel) || GetVocabularyType(modifier, UsageTermCollection.ethnicGroupLabel)) && isHumanGroupChanged) {\r
+ itrExistingModifiers.remove();\r
+ }\r
+ \r
+ } \r
+ if(isHumanGroupChanged){\r
+ Modifier humanGroup = combo_HumanGroup.getSelection();\r
+ getEntity().addModifier(humanGroup);\r
+ }\r
+ combo_EthnicGroup.setEnabled(true);\r
+ } else {\r
+ Set<Modifier> modifiers = getEntity().getModifiers();\r
+ if(!modifiers.isEmpty()) {\r
+ Iterator<Modifier> itr = modifiers.iterator();\r
+ while (itr.hasNext()) {\r
+ Modifier currentMod = itr.next();\r
+ if(GetVocabularyType(currentMod, UsageTermCollection.humanGroupLabel) || GetVocabularyType(currentMod, UsageTermCollection.ethnicGroupLabel)) {\r
+ itr.remove();\r
+ }\r
+ }\r
+ }\r
+ List<Modifier> emptyListToResetComboBox = new ArrayList<Modifier>();\r
+ Modifier emptyMod = Modifier.NewInstance();\r
+ emptyListToResetComboBox.add(emptyMod);\r
+ combo_EthnicGroup.setTerms(emptyListToResetComboBox);\r
+ combo_EthnicGroup.setEnabled(false);\r
+ \r
+ }\r
+ }\r
+ if (eventSource == combo_EthnicGroup) {\r
+ if (combo_EthnicGroup.getSelection() != null) {\r
+ Iterator<Modifier> itrExistingModifiers = getEntity().getModifiers().iterator();\r
+ while (itrExistingModifiers.hasNext()) {\r
+ Modifier modifier = itrExistingModifiers.next();\r
+ if(GetVocabularyType(modifier, combo_HumanGroup.getSelection().getTitleCache())) {\r
+ itrExistingModifiers.remove();\r
+ }\r
+ \r
+ } \r
+ Modifier ethnicGroup = combo_EthnicGroup.getSelection();\r
+ getEntity().addModifier(ethnicGroup);\r
+ } else {\r
+ Set<Modifier> modifiers = getEntity().getModifiers();\r
+ if(!modifiers.isEmpty()) {\r
+ \r
+ Iterator<Modifier> itr = modifiers.iterator();\r
+ while (itr.hasNext()) {\r
+ Modifier currentMod = itr.next();\r
+ if(GetVocabularyType(currentMod, UsageTermCollection.ethnicGroupLabel)) {\r
+ itr.remove();\r
+ }\r
+ }\r
+ \r
+ }\r
+ }\r
+ }\r
+ }\r
+ \r
+ \r
+\r
+ /**\r
+ * This function Checks the vocabulary type\r
+ * @param term\r
+ * @param vocabularyExpected\r
+ * @return\r
+ */\r
+ private boolean GetVocabularyType(Modifier term, String vocabularyExpected) {\r
+ if ((term.getPartOf() != null) && (term.getPartOf().getTitleCache().equals(vocabularyExpected))) {\r
+ return true;\r
+ }\r
+ else if ((term.getVocabulary() != null) && (term.getPartOf()==null) && (term.getVocabulary().getTitleCache().equals(vocabularyExpected))) {\r
+ return true;\r
+ }\r
+ else if ((vocabularyExpected.equals(UsageTermCollection.ethnicGroupLabel)) && ((term.getPartOf() != null))) {\r
+ return true;\r
+ }\r
+ return false;\r
+ }\r
+ \r
+ \r
+\r
+ /** {@inheritDoc} */\r
+ @Override\r
+ public void setEntity(CategoricalData entity) {\r
+ super.setEntity(entity);\r
+ }\r
+\r
+ /** {@inheritDoc} */\r
+ @Override\r
+ public void widgetSelected(SelectionEvent e) {\r
+ Object eventSource = e.getSource();\r
+ for (Object object: combo_UseCategory.getControls()) {\r
+ if (object == eventSource) {\r
+ State selectedUseCategory = combo_UseCategory.getSelection();\r
+ if (selectedUseCategory != null) {\r
+ combo_UseSubCategory.setTerms(setUseCategoryComboTerms(TermStore.getTerms(State.class, null, false),selectedUseCategory));\r
+ \r
+ if (!getEntity().getStates().isEmpty()) {\r
+ Iterator<StateData> itrExistingState = getEntity().getStates().iterator();\r
+ while(itrExistingState.hasNext()) {\r
+ StateData existingStateData = (StateData) itrExistingState.next();\r
+ Map<Language, LanguageString> modifyingText = existingStateData.getModifyingText();\r
+ if (modifyingText.get(CdmStore.getDefaultLanguage()) != null) {\r
+ if (modifyingText.get(CdmStore.getDefaultLanguage())\r
+ .getText().equals(UsageTermCollection.useSubCategoryVocabularyLabel)) {\r
+ combo_UseSubCategory.setSelection(stateSelection(UsageTermCollection.useSubCategoryVocabularyLabel));\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ for (Object object: combo_HumanGroup.getControls()) {\r
+ if (object == eventSource) {\r
+ Modifier selectedHumanGroup = combo_HumanGroup.getSelection();\r
+ if (selectedHumanGroup != null) {\r
+ combo_EthnicGroup.setTerms(setEthnicGroupComboTerms(TermStore.getTerms(Modifier.class, null, false), selectedHumanGroup));\r
+ if (!getEntity().getModifiers().isEmpty()) {\r
+ Iterator<Modifier> iterModifiers = getEntity().getModifiers().iterator();\r
+ while (iterModifiers.hasNext()) {\r
+ Modifier existingModifier = iterModifiers.next();\r
+ if(GetVocabularyType(existingModifier, UsageTermCollection.ethnicGroupLabel)) {\r
+ combo_EthnicGroup.setSelection(modifierSelection(UsageTermCollection.ethnicGroupLabel));\r
+ }\r
+ }\r
+ }\r
+ \r
+ }\r
+ }\r
+ }\r
+ }\r
+\r
+ /** {@inheritDoc} */\r
+ @Override\r
+ public void widgetDefaultSelected(SelectionEvent e) {\r
+ // TODO Auto-generated method stub\r
+\r
+ }\r
+\r
+}\r
--- /dev/null
+/**\r
+* Copyright (C) 2011 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.ui.section.userecords;\r
+\r
+import org.eclipse.jface.viewers.ISelectionProvider;\r
+\r
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
+import eu.etaxonomy.cdm.model.description.DescriptionElementBase;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;\r
+\r
+/**\r
+ * UseRecordDetailSection Class\r
+ * @author a.theys \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class UseRecordDetailSection extends AbstractCdmDetailSection<DescriptionElementBase> {\r
+ \r
+ /**Constructor for class UseRecordDetailSection\r
+ * \r
+ * @param cdmFormFactory\r
+ * @param conversation\r
+ * @param parentElement\r
+ * @param selectionProvider\r
+ * @param style\r
+ */\r
+ public UseRecordDetailSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation,\r
+ ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {\r
+ super(cdmFormFactory, conversation, parentElement, selectionProvider, style);\r
+ }\r
+ \r
+ /** {@inheritDoc} */\r
+ @Override\r
+ protected DetailType getDetailType() {\r
+ return DetailType.USE_RECORD;\r
+ }\r
+ \r
+ /** {@inheritDoc} */\r
+ @Override\r
+ public String getHeading() {\r
+ return "Use Record";\r
+ }\r
+ \r
+ /** {@inheritDoc} */\r
+ @Override\r
+ protected void setSectionTitle() {\r
+ this.setText(getHeading() + ": " + getEntity().getFeature().getLabel(CdmStore.getDefaultLanguage()));\r
+ setTextClient(createToolbar());\r
+ }\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.ui.section.vocabulary;\r
+\r
+import eu.etaxonomy.cdm.model.common.Representation;\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.TermBasePropertyTester;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;\r
+import eu.etaxonomy.taxeditor.ui.element.UriWithLabelElement;\r
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 20 Dec 2011\r
+ *\r
+ */\r
+public abstract class AbstractTermBaseDetailElement<T extends TermBase> extends AbstractCdmDetailElement<T> {\r
+\r
+ protected TextWithLabelElement text_label;\r
+ protected TextWithLabelElement text_description;\r
+ protected UriWithLabelElement uri_uri;\r
+ protected TextWithLabelElement text_abbreviatedLabel;\r
+ \r
+ /**\r
+ * @param formFactory\r
+ * @param formElement\r
+ */\r
+ public AbstractTermBaseDetailElement(CdmFormFactory formFactory,\r
+ ICdmFormElement formElement) {\r
+ super(formFactory, formElement);\r
+ }\r
+ \r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement#createControls(eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement, java.lang.Object, int)\r
+ */\r
+ @Override\r
+ protected void createControls(ICdmFormElement formElement,\r
+ T entity, int style) {\r
+ Representation representation = getEntity().getRepresentation(CdmStore.getDefaultLanguage());\r
+ \r
+ if(representation == null){\r
+ formFactory.createLabel(formElement, "No represantation for the current default Language");\r
+ return;\r
+ }\r
+ \r
+ text_label = formFactory.createTextWithLabelElement(formElement, "Label", representation.getLabel(), style);\r
+ text_abbreviatedLabel = formFactory.createTextWithLabelElement(formElement, "Abbrev. Label", representation.getAbbreviatedLabel(), style);\r
+ text_description = formFactory.createMultilineTextWithLabel(formElement, "Description", 100, style);\r
+ text_description.setText(representation.getDescription());\r
+ uri_uri = formFactory.createUriWithLabelElement(formElement, "URI", getEntity().getUri(), style);\r
+ \r
+ }\r
+\r
+ @Override\r
+ public void setEntity(T entity) {\r
+ super.setEntity(entity);\r
+ setEnabled(TermBasePropertyTester.isModifiable(entity));\r
+ }\r
+ \r
+ protected void handleRepresentation(Object eventSource){\r
+ Representation representation = getEntity().getRepresentation(CdmStore.getDefaultLanguage());\r
+ \r
+ if (representation == null){\r
+ return;\r
+ }\r
+ \r
+ if (eventSource == text_label){\r
+ representation.setLabel(text_label.getText());\r
+ }else if (eventSource == text_abbreviatedLabel){\r
+ representation.setAbbreviatedLabel(text_abbreviatedLabel.getText());\r
+ }else if (eventSource == text_description){\r
+ representation.setText(text_description.getText());\r
+ }\r
+ }\r
+\r
+ public abstract TermVocabulary getVocabulary();\r
+ \r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.ui.section.vocabulary;\r
+\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 20 Dec 2011\r
+ *\r
+ */\r
+public class DefinedTermDetailElement<T extends DefinedTermBase> extends AbstractTermBaseDetailElement<T> {\r
+ \r
+ /**\r
+ * @param formFactory\r
+ * @param formElement\r
+ */\r
+ public DefinedTermDetailElement(CdmFormFactory formFactory,\r
+ ICdmFormElement formElement) {\r
+ super(formFactory, formElement);\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement#handleEvent(java.lang.Object)\r
+ */\r
+ @Override\r
+ public void handleEvent(Object eventSource) {\r
+ handleRepresentation(eventSource);\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.ui.section.vocabulary.AbstractTermBaseDetailElement#getVocabularyMarkers()\r
+ */\r
+ @Override\r
+ public TermVocabulary getVocabulary() {\r
+ return getEntity() != null ? getEntity().getVocabulary() : null;\r
+ }\r
+\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.ui.section.vocabulary;\r
+\r
+import org.eclipse.jface.viewers.ISelectionProvider;\r
+import org.eclipse.ui.forms.widgets.TableWrapLayout;\r
+\r
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;\r
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 4 Jan 2012\r
+ *\r
+ */\r
+public class DefinedTermDetailSection<T extends DefinedTermBase> extends AbstractCdmDetailSection<T> {\r
+\r
+ /**\r
+ * @param formFactory\r
+ * @param definedTermClass \r
+ * @param conversation\r
+ * @param parentElement\r
+ * @param selectionProvider\r
+ * @param style\r
+ */\r
+ public DefinedTermDetailSection(CdmFormFactory formFactory,\r
+ Class<T> definedTermClass, ConversationHolder conversation, ICdmFormElement parentElement,\r
+ ISelectionProvider selectionProvider, int style) {\r
+ super(formFactory, definedTermClass, conversation, parentElement, selectionProvider, style);\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getDetailType()\r
+ */\r
+ @Override\r
+ protected DetailType getDetailType() {\r
+ return null;\r
+ }\r
+ \r
+ @Override\r
+ protected void createControlsByType(\r
+ AbstractCdmDetailSection<T> abstractCdmDetailSection,\r
+ Class<T> clazz, int style) {\r
+ TableWrapLayout layout = (TableWrapLayout) getLayoutComposite()\r
+ .getLayout();\r
+ layout.topMargin = 10;\r
+ layout.numColumns = 2;\r
+\r
+ getLayoutComposite().setLayout(layout);\r
+ detailElement = formFactory.createDefinedTermDetailElement(clazz,\r
+ abstractCdmDetailSection, style);\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getHeading()\r
+ */\r
+ @Override\r
+ public String getHeading() {\r
+ return "Defined Term: "+ (getEntity() != null ? getEntity().getLabel() : "");\r
+ }\r
+\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.ui.section.vocabulary;\r
+\r
+import java.net.URISyntaxException;\r
+\r
+import eu.etaxonomy.cdm.model.common.Language;\r
+import eu.etaxonomy.cdm.model.common.Representation;\r
+import eu.etaxonomy.cdm.model.location.NamedArea;\r
+import eu.etaxonomy.cdm.model.location.NamedAreaLevel;\r
+import eu.etaxonomy.cdm.model.location.NamedAreaType;\r
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.element.TimePeriodElement;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 20 Dec 2011\r
+ *\r
+ */\r
+public class NamedAreaDetailElement extends DefinedTermDetailElement<NamedArea> {\r
+\r
+ // level\r
+ // type\r
+ private TermComboElement<NamedAreaType> combo_namedAreaType;\r
+ private TermComboElement<NamedAreaLevel> combo_namedAreaLevel;\r
+ // validPeriod\r
+ private TimePeriodElement timePeriod_validPeriod;\r
+ \r
+ /**\r
+ * @param formFactory\r
+ * @param formElement\r
+ */\r
+ public NamedAreaDetailElement(CdmFormFactory formFactory,\r
+ ICdmFormElement formElement) {\r
+ super(formFactory, formElement);\r
+ }\r
+ \r
+ public void createControls(ICdmFormElement formElement, NamedArea entity, int style) {\r
+ super.createControls(formElement, entity, style);\r
+ \r
+ timePeriod_validPeriod = formFactory.createTimePeriodElement(formElement, "Valid Period", getEntity().getValidPeriod(), style);\r
+ combo_namedAreaType = formFactory.createTermComboElement(NamedAreaType.class, formElement, "Named Area Type", getEntity().getType(), style);\r
+ combo_namedAreaLevel = formFactory.createTermComboElement(NamedAreaLevel.class, formElement, "Named Area Level", getEntity().getLevel(), style);\r
+ \r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement#handleEvent(java.lang.Object)\r
+ */\r
+ @Override\r
+ public void handleEvent(Object eventSource) {\r
+ \r
+ if (eventSource == text_label) {\r
+ getEntity().setLabel(text_label.getText());\r
+ getEntity().setTitleCache(null);\r
+ } else if (eventSource == text_description) {\r
+ \r
+ Representation representation = getEntity().getRepresentation(Language.DEFAULT());\r
+ representation.setText(text_description.getText());\r
+ \r
+ } else if (eventSource == uri_uri) {\r
+ \r
+ try {\r
+ getEntity().setUri(uri_uri.getUri());\r
+ } catch (URISyntaxException e) {\r
+ \r
+ e.printStackTrace();\r
+ }\r
+ } else if (eventSource == timePeriod_validPeriod) {\r
+ getEntity().setValidPeriod(timePeriod_validPeriod.getTimePeriod());\r
+ } else if (eventSource == combo_namedAreaType) {\r
+ getEntity().setType(combo_namedAreaType.getSelection());\r
+ } else if (eventSource == combo_namedAreaLevel) {\r
+ getEntity().setLevel(combo_namedAreaLevel.getSelection());\r
+ }\r
+ \r
+ \r
+ }\r
+\r
+ \r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.ui.section.vocabulary;\r
+\r
+import org.eclipse.jface.viewers.ISelectionProvider;\r
+\r
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
+import eu.etaxonomy.cdm.model.location.NamedArea;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;\r
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 20 Dec 2011\r
+ *\r
+ */\r
+public class NamedAreaDetailSection extends AbstractCdmDetailSection<NamedArea> {\r
+\r
+ /**\r
+ * @param formFactory\r
+ * @param conversation\r
+ * @param parentElement\r
+ * @param selectionProvider\r
+ * @param style\r
+ */\r
+ public NamedAreaDetailSection(CdmFormFactory formFactory,\r
+ ConversationHolder conversation, ICdmFormElement parentElement,\r
+ ISelectionProvider selectionProvider, int style) {\r
+ super(formFactory, conversation, parentElement, selectionProvider, style);\r
+\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getDetailType()\r
+ */\r
+ @Override\r
+ protected DetailType getDetailType() {\r
+ \r
+ return DetailType.NAMED_AREA;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getHeading()\r
+ */\r
+ @Override\r
+ public String getHeading() {\r
+ \r
+ return "Defined Term: "+ (getEntity() != null ? getEntity().getLabel() : "");\r
+ }\r
+\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.ui.section.vocabulary;\r
+\r
+import org.eclipse.jface.viewers.ISelectionProvider;\r
+\r
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
+import eu.etaxonomy.cdm.model.location.NamedAreaLevel;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;\r
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 4 Jan 2012\r
+ *\r
+ */\r
+public class NamedAreaLevelDetailSection extends AbstractCdmDetailSection<NamedAreaLevel> {\r
+\r
+ /**\r
+ * @param formFactory\r
+ * @param parentElement\r
+ * @param style\r
+ */\r
+ public NamedAreaLevelDetailSection(CdmFormFactory formFactory,\r
+ ConversationHolder conversation, ICdmFormElement parentElement,\r
+ ISelectionProvider selectionProvider, int style) {\r
+ super(formFactory, conversation, parentElement, selectionProvider, style);\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getDetailType()\r
+ */\r
+ @Override\r
+ protected DetailType getDetailType() {\r
+ \r
+ return DetailType.NAMED_AREA_LEVEL;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getHeading()\r
+ */\r
+ @Override\r
+ public String getHeading() {\r
+ return "Defined Term: "+ (getEntity() != null ? getEntity().getLabel() : "");\r
+ }\r
+\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.ui.section.vocabulary;\r
+\r
+import java.net.URISyntaxException;\r
+\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.element.UriWithLabelElement;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 20 Dec 2011\r
+ *\r
+ */\r
+public class TermVocabularyDetailElement extends AbstractTermBaseDetailElement<TermVocabulary> {\r
+\r
+ private UriWithLabelElement uri_uriTermSource;\r
+ /**\r
+ * @param formFactory\r
+ * @param formElement\r
+ */\r
+ public TermVocabularyDetailElement(CdmFormFactory formFactory,\r
+ ICdmFormElement formElement) {\r
+ super(formFactory, formElement);\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement#createControls(eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement, java.lang.Object, int)\r
+ */\r
+ @Override\r
+ protected void createControls(ICdmFormElement formElement,\r
+ TermVocabulary entity, int style) {\r
+ \r
+ super.createControls(formElement, entity, style);\r
+ uri_uriTermSource = formFactory.createUriWithLabelElement(formElement, "Term Source URI", getEntity().getTermSourceUri(), style);\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement#handleEvent(java.lang.Object)\r
+ */\r
+ @Override\r
+ public void handleEvent(Object eventSource) {\r
+ \r
+ handleRepresentation(eventSource);\r
+ \r
+ if (eventSource == uri_uri) {\r
+ try {\r
+ getEntity().setUri(uri_uri.getUri());\r
+ } catch (URISyntaxException e) {\r
+ StoreUtil.errorDialog("Not a URI", getClass(), "You have to provide a valid URI");\r
+ }\r
+ } else if (eventSource == uri_uriTermSource) {\r
+ try {\r
+ getEntity().setTermSourceUri(uri_uriTermSource.getUri());\r
+ } catch (URISyntaxException e) {\r
+ StoreUtil.errorDialog("Not a URI", getClass(), "You have to provide a valid URI");\r
+ }\r
+ }\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.ui.section.vocabulary.AbstractTermBaseDetailElement#getVocabularyMarkers()\r
+ */\r
+ @Override\r
+ public TermVocabulary getVocabulary() {\r
+ return getEntity();\r
+ }\r
+\r
+}\r
--- /dev/null
+// $Id$\r
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy \r
+* http://www.e-taxonomy.eu\r
+* \r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.ui.section.vocabulary;\r
+\r
+import org.eclipse.jface.viewers.ISelectionProvider;\r
+\r
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;\r
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 20 Dec 2011\r
+ *\r
+ */\r
+public class TermVocabularyDetailSection extends\r
+ AbstractCdmDetailSection<TermVocabulary> {\r
+\r
+ /**\r
+ * @param formFactory\r
+ * @param conversation\r
+ * @param parentElement\r
+ * @param selectionProvider\r
+ * @param style\r
+ */\r
+ public TermVocabularyDetailSection(CdmFormFactory formFactory,\r
+ ConversationHolder conversation, ICdmFormElement parentElement,\r
+ ISelectionProvider selectionProvider, int style) {\r
+ super(formFactory, conversation, parentElement, selectionProvider, style);\r
+ // TODO Auto-generated constructor stub\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getDetailType()\r
+ */\r
+ @Override\r
+ protected DetailType getDetailType() {\r
+ \r
+ return DetailType.TERM_VOCABULARY;\r
+ }\r
+\r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getHeading()\r
+ */\r
+ @Override\r
+ public String getHeading() {\r
+ \r
+ return "Vocabulary: "+ (getEntity() != null ? getEntity().getLabel() : "");\r
+ }\r
+ \r
+ /* (non-Javadoc)\r
+ * @see eu.etaxonomy.taxeditor.section.AbstractCdmDetailSection#setSectionTitle()\r
+ */\r
+ @Override\r
+ protected void setSectionTitle() {\r
+ setText(getHeading());\r
+ }\r
+}\r
+++ /dev/null
-// $Id$
-/**
- * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.agent.AgentBase;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.AgentSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * AgentSelectionElement class.
- * </p>
- *
- * @author n.hoffmann
- * @created Jun 22, 2010
- * @version 1.0
- */
-public class AgentSelectionElement extends AbstractSelectionElement<AgentBase> {
-
- public static final int DEFAULT = EDITABLE | SELECTABLE | DELETABLE;
-
- /**
- * <p>
- * Constructor for AgentSelectionElement.
- * </p>
- *
- * @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
- * object.
- * @param conversation
- * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
- * object.
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
- * object.
- * @param labelString
- * a {@link java.lang.String} object.
- * @param entity
- * a {@link eu.etaxonomy.cdm.model.agent.AgentBase} object.
- * @param style
- * a int.
- */
- public AgentSelectionElement(CdmFormFactory formFactory,
- ConversationHolder conversation, ICdmFormElement parentElement,
- String labelString, AgentBase entity, int mode, int style) {
- super(formFactory, conversation, parentElement, labelString, entity,
- mode, style);
- }
-
- /** {@inheritDoc} */
- @Override
- public void widgetSelected(SelectionEvent e) {
- AgentBase newSelection = AgentSelectionDialog.select(getShell(),
- getConversationHolder(), entity);
- setSelectionInternal(newSelection);
- }
-}
+++ /dev/null
-// $Id$
-/**
- * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.taxon.Classification;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.ClassificationSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * ClassificationSelectionElement class.
- * </p>
- *
- * @author n.hoffmann
- * @created Sep 27, 2010
- * @version 1.0
- */
-public class ClassificationSelectionElement extends
- AbstractSelectionElement<Classification> {
-
- public static final int DEFAULT = DELETABLE;
-
- /**
- * <p>
- * Constructor for ClassificationSelectionElement.
- * </p>
- *
- * @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
- * object.
- * @param conversation
- * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
- * object.
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
- * object.
- * @param labelString
- * a {@link java.lang.String} object.
- * @param entity
- * a {@link eu.etaxonomy.cdm.model.taxon.TaxonomicTree} object.
- * @param style
- * a int.
- */
- public ClassificationSelectionElement(CdmFormFactory formFactory,
- ConversationHolder conversation, ICdmFormElement parentElement,
- String labelString, Classification entity, int mode, int style) {
- super(formFactory, conversation, parentElement, labelString, entity,
- mode, style);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
- * .events.SelectionEvent)
- */
- /** {@inheritDoc} */
- @Override
- public void widgetSelected(SelectionEvent e) {
- Classification newSelection = ClassificationSelectionDialog.select(
- getShell(), getConversationHolder());
- setSelectionInternal(newSelection);
- }
-
-}
+++ /dev/null
-// $Id$
-/**
- * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.occurrence.Collection;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.CollectionSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * CollectionSelectionElement class.
- * </p>
- *
- * @author n.hoffmann
- * @created Oct 13, 2010
- * @version 1.0
- */
-public class CollectionSelectionElement extends
- AbstractSelectionElement<Collection> {
-
- public static final int DEFAULT = EDITABLE | SELECTABLE | DELETABLE;
-
- /**
- * <p>
- * Constructor for CollectionSelectionElement.
- * </p>
- *
- * @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
- * object.
- * @param conversation
- * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
- * object.
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
- * object.
- * @param labelString
- * a {@link java.lang.String} object.
- * @param entity
- * a {@link eu.etaxonomy.cdm.model.occurrence.Collection} object.
- * @param style
- * a int.
- */
- public CollectionSelectionElement(CdmFormFactory formFactory,
- ConversationHolder conversation, ICdmFormElement parentElement,
- String labelString, Collection entity, int mode, int style) {
- super(formFactory, conversation, parentElement, labelString, entity,
- mode, style);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
- * .events.SelectionEvent)
- */
- /** {@inheritDoc} */
- @Override
- public void widgetSelected(SelectionEvent e) {
- Collection newSelection = CollectionSelectionDialog.select(getShell(),
- getConversationHolder(), getEntity());
- setSelectionInternal(newSelection);
- }
-
-}
+++ /dev/null
-// $Id$
-/**
- * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.DerivedUnitSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * DerivedUnitBaseSelectionElement class.
- * </p>
- *
- * @author n.hoffmann
- * @created Jun 17, 2010
- * @version 1.0
- */
-public class DerivedUnitBaseSelectionElement extends
- AbstractSelectionElement<DerivedUnitBase> {
-
- public static final int DEFAULT = EDITABLE | SELECTABLE | DELETABLE;
-
- /**
- * <p>
- * Constructor for DerivedUnitBaseSelectionElement.
- * </p>
- *
- * @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
- * object.
- * @param conversation
- * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
- * object.
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
- * object.
- * @param labelString
- * a {@link java.lang.String} object.
- * @param entity
- * a {@link eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase}
- * object.
- * @param style
- * a int.
- */
- public DerivedUnitBaseSelectionElement(CdmFormFactory formFactory,
- ConversationHolder conversation, ICdmFormElement parentElement,
- String labelString, DerivedUnitBase entity, int mode, int style) {
- super(formFactory, conversation, parentElement, labelString, entity,
- mode, style);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
- * .events.SelectionEvent)
- */
- /** {@inheritDoc} */
- @Override
- public void widgetSelected(SelectionEvent e) {
- DerivedUnitBase newSelection = DerivedUnitSelectionDialog.select(
- getShell(), getConversationHolder(), entity);
- setSelectionInternal(newSelection);
- }
-}
import eu.etaxonomy.cdm.model.occurrence.Collection;
import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
import eu.etaxonomy.cdm.model.reference.Reference;
+import eu.etaxonomy.taxeditor.model.TextHelper;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.section.agent.InstitutionWizardPage;
import eu.etaxonomy.taxeditor.ui.section.agent.PersonWizardPage;
import eu.etaxonomy.taxeditor.ui.section.agent.TeamWizardPage;
public class EditFromSelectionWizard extends Wizard implements
SelectionListener {
- private final AbstractSelectionElement selectionElement;
+ private final EntitySelectionElement selectionElement;
/**
* <p>
*
* @param selectionElement
* a
- * {@link eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement}
+ * {@link eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement}
* object.
*/
- public EditFromSelectionWizard(AbstractSelectionElement selectionElement) {
+ public EditFromSelectionWizard(EntitySelectionElement selectionElement) {
this.selectionElement = selectionElement;
- this.setWindowTitle("Edit Entity");
+ this.setWindowTitle(String.format("Edit %s", TextHelper.deproxyClassName(selectionElement.getEntity().getClass())));
}
/** {@inheritDoc} */
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
import eu.etaxonomy.cdm.common.CdmUtils;
+import eu.etaxonomy.cdm.model.common.ICdmBase;
import eu.etaxonomy.cdm.model.common.IIdentifiableEntity;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.model.ImageResources;
import eu.etaxonomy.taxeditor.preference.Resources;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEnableableFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEntityElement;
-import eu.etaxonomy.taxeditor.ui.forms.ILabeledElement;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectable;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectableElement;
-import eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.SelectionDialogFactory;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEntityElement;
+import eu.etaxonomy.taxeditor.ui.element.ILabeledElement;
+import eu.etaxonomy.taxeditor.ui.element.ISelectable;
+import eu.etaxonomy.taxeditor.ui.element.ISelectableElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator;
/**
* <p>
* @version 1.0
* @param <T>
*/
-public abstract class AbstractSelectionElement<T> extends
+public class EntitySelectionElement<T extends ICdmBase> extends
AbstractCdmFormElement implements SelectionListener,
IEnableableFormElement, ISelectableElement, IEntityElement<T>,
ILabeledElement, IConversationEnabled, ISelectable {
/**
- * bitmask to set
+ * Bitmask for configuring functionality of selection element
*/
public static final int NOTHING = 0; // 000
public static final int EDITABLE = 1 << 0; // 001
public static final int DELETABLE = 1 << 1; // 010
public static final int SELECTABLE = 1 << 2; // 100
- public static final int ALL = (int) Math.pow(2, 3); // 111
+ public static final int ALL = EDITABLE | DELETABLE | SELECTABLE; // 111
protected T entity;
private final boolean isDeletable;
private final ConversationHolder conversation;
+ private Class<T> clazz;
/**
* <p>
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param conversation
* TODO
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param labelString
* a {@link java.lang.String} object.
* @param <T>
* a T object.
*/
- public AbstractSelectionElement(CdmFormFactory formFactory,
+ public EntitySelectionElement(CdmFormFactory formFactory,
ConversationHolder conversation, ICdmFormElement parentElement,
String labelString, T entity, int mode, int style) {
super(formFactory, parentElement);
this.isEditable = (mode & EDITABLE) == EDITABLE;
this.isDeletable = (mode & DELETABLE) == DELETABLE;
-
+ boolean isSelectable = (mode & SELECTABLE) == SELECTABLE;
+
this.labelString = labelString;
this.conversation = conversation;
- if (((mode & SELECTABLE) == SELECTABLE)
- && formFactory.getSelectionProvider() != null) {
+ if (isSelectable && formFactory.getSelectionProvider() != null) {
selectionArbitrator = formFactory.createSelectionArbitrator(this);
}
setEntity(entity);
}
+
+ public EntitySelectionElement(CdmFormFactory formFactory,
+ ConversationHolder conversation, ICdmFormElement parentElement, Class<T> clazz,
+ String labelString, T entity, int mode, int style) {
+ this(formFactory, conversation, parentElement, labelString, entity, mode, style);
+ this.clazz = clazz;
+ }
private void createControls(Composite parent, int style) {
columns += 1;
}
- selectableComposite.setLayout(CdmFormFactory.LAYOUT(columns, false));
- selectableComposite.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+ selectableComposite.setLayout(LayoutConstants.LAYOUT(columns, false));
+ selectableComposite.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
addControl(selectableComposite);
text = formFactory.createLabel(selectableComposite, null, SWT.WRAP);
addControl(text);
- text.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+ text.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
text.setBackground(StoreUtil
.getColor(Resources.COLOR_TEXT_DISABLED_BACKGROUND));
button_selection.setImage(ImageResources
.getImage(ImageResources.BROWSE_ICON));
button_selection.setToolTipText("Browse existing");
+
addControl(button_selection);
button_selection.addSelectionListener(this);
}
}
+ public void widgetSelected(SelectionEvent e) {
+ T selection = SelectionDialogFactory.getSelectionFromDialog(clazz, getShell(), getConversationHolder(), getEntity());
+ setSelectionInternal(selection);
+ }
+
/**
* Return the selected object
*
* Getter for the field <code>selectionArbitrator</code>.
* </p>
*
- * @return a {@link eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator}
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
* object.
*/
@Override
private class DeleteListener extends SelectionAdapter {
- private final AbstractSelectionElement<T> selectionElement;
+ private final EntitySelectionElement<T> selectionElement;
- public DeleteListener(AbstractSelectionElement<T> selectionElement) {
+ public DeleteListener(EntitySelectionElement<T> selectionElement) {
this.selectionElement = selectionElement;
}
private class EditListener extends SelectionAdapter {
- private final AbstractSelectionElement<T> selectionElement;
+ private final EntitySelectionElement<T> selectionElement;
- public EditListener(AbstractSelectionElement<T> selectionElement) {
+ public EditListener(EntitySelectionElement<T> selectionElement) {
this.selectionElement = selectionElement;
}
+++ /dev/null
-// $Id$
-/**
- * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.description.Feature;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.FeatureSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * @author n.hoffmann
- * @created Dec 3, 2010
- * @version 1.0
- */
-public class FeatureSelectionElement extends AbstractSelectionElement<Feature> {
-
- public static final int DEFAULT = EDITABLE | DELETABLE;
-
- /**
- *
- * @param formFactory
- * @param conversation
- * @param parentElement
- * @param labelString
- * @param entity
- * @param style
- */
- public FeatureSelectionElement(CdmFormFactory formFactory,
- ConversationHolder conversation, ICdmFormElement parentElement,
- String labelString, Feature entity, int mode, int style) {
- super(formFactory, conversation, parentElement, labelString, entity,
- mode, style);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
- * .events.SelectionEvent)
- */
- @Override
- public void widgetSelected(SelectionEvent e) {
- Feature newSelection = FeatureSelectionDialog.select(getShell(),
- getConversationHolder(), entity);
- setSelectionInternal(newSelection);
- }
-
-}
+++ /dev/null
-// $Id$
-/**
- * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.description.FeatureTree;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.FeatureTreeSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * FeatureTreeSelectionElement class.
- * </p>
- *
- * @author n.hoffmann
- * @created Sep 17, 2010
- * @version 1.0
- */
-public class FeatureTreeSelectionElement extends
- AbstractSelectionElement<FeatureTree> {
-
- public static final int DEFAULT = DELETABLE;
-
- /**
- * <p>
- * Constructor for FeatureTreeSelectionElement.
- * </p>
- *
- * @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
- * object.
- * @param conversation
- * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
- * object.
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
- * object.
- * @param labelString
- * a {@link java.lang.String} object.
- * @param entity
- * a {@link eu.etaxonomy.cdm.model.description.FeatureTree}
- * object.
- * @param style
- * a int.
- */
- public FeatureTreeSelectionElement(CdmFormFactory formFactory,
- ConversationHolder conversation, ICdmFormElement parentElement,
- String labelString, FeatureTree entity, int mode, int style) {
- super(formFactory, conversation, parentElement, labelString, entity,
- mode, style);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
- * .events.SelectionEvent)
- */
- /** {@inheritDoc} */
- @Override
- public void widgetSelected(SelectionEvent e) {
- FeatureTree newSelection = FeatureTreeSelectionDialog.select(
- getShell(), getConversationHolder(), entity);
- setSelectionInternal(newSelection);
- }
-}
+++ /dev/null
-// $Id$
-/**
- * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.occurrence.FieldObservation;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.FieldObservationSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * FieldObservationSelectionElement class.
- * </p>
- *
- * @author n.hoffmann
- * @created Jun 17, 2010
- * @version 1.0
- */
-public class FieldObservationSelectionElement extends
- AbstractSelectionElement<FieldObservation> {
-
- public static final int DEFAULT = EDITABLE | SELECTABLE | DELETABLE;
-
- /**
- * <p>
- * Constructor for FieldObservationSelectionElement.
- * </p>
- *
- * @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
- * object.
- * @param conversation
- * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
- * object.
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
- * object.
- * @param labelString
- * a {@link java.lang.String} object.
- * @param entity
- * a {@link eu.etaxonomy.cdm.model.occurrence.FieldObservation}
- * object.
- * @param style
- * a int.
- */
- public FieldObservationSelectionElement(CdmFormFactory formFactory,
- ConversationHolder conversation, ICdmFormElement parentElement,
- String labelString, FieldObservation entity, int mode, int style) {
- super(formFactory, conversation, parentElement, labelString, entity,
- mode, style);
- }
-
- /** {@inheritDoc} */
- @Override
- public void widgetSelected(SelectionEvent e) {
- FieldObservation newSelection = FieldObservationSelectionDialog.select(
- getShell(), getConversationHolder(), entity);
- setSelectionInternal(newSelection);
- }
-}
+++ /dev/null
-// $Id$
-/**
- * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.common.Group;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.GroupSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * @author n.hoffmann
- * @created Mar 10, 2011
- * @version 1.0
- */
-public class GroupSelectionElement extends AbstractSelectionElement<Group> {
-
- public static final int DEFAULT = NOTHING;
-
- /**
- * @param formFactory
- * @param conversation
- * @param parentElement
- * @param labelString
- * @param entity
- * @param isEditable
- * @param isSelectable
- * @param isDeletable
- * @param style
- */
- public GroupSelectionElement(CdmFormFactory formFactory,
- ConversationHolder conversation, ICdmFormElement parentElement,
- String labelString, Group entity, int mode, int style) {
- super(formFactory, conversation, parentElement, labelString, entity,
- mode, style);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
- * .events.SelectionEvent)
- */
- @Override
- public void widgetSelected(SelectionEvent e) {
- Group newSelection = GroupSelectionDialog.select(getShell(),
- getConversationHolder(), getEntity());
- setSelectionInternal(newSelection);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement#getTitle()
- */
- @Override
- protected String getTitle() {
- return (getEntity() != null) ? getEntity().getName() : "UNTITLED GROUP";
- }
-
-}
+++ /dev/null
-// $Id$
-/**
- * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.agent.Institution;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.InstitutionSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * InstitutionSelectionElement class.
- * </p>
- *
- * @author n.hoffmann
- * @created Nov 17, 2009
- * @version 1.0
- */
-public class InstitutionSelectionElement extends
- AbstractSelectionElement<Institution> {
-
- public static final int DEFAULT = EDITABLE | SELECTABLE | DELETABLE;
-
- /**
- * <p>
- * Constructor for InstitutionSelectionElement.
- * </p>
- *
- * @param labelString
- * a {@link java.lang.String} object.
- * @param selection
- * a {@link eu.etaxonomy.cdm.model.agent.Institution} object.
- * @param style
- * a int.
- * @param toolkit
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
- * object.
- * @param conversation
- * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
- * object.
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
- * object.
- */
- public InstitutionSelectionElement(CdmFormFactory toolkit,
- ConversationHolder conversation, ICdmFormElement parentElement,
- String labelString, Institution selection, int mode, int style) {
- super(toolkit, conversation, parentElement, labelString, selection,
- mode, style);
- }
-
- /** {@inheritDoc} */
- @Override
- public void widgetSelected(SelectionEvent e) {
- Institution newSelection = InstitutionSelectionDialog.select(
- getShell(), getConversationHolder(), entity);
- setSelectionInternal(newSelection);
- }
-}
+++ /dev/null
-/**
- *
- */
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.name.TaxonNameBase;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.NameSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * NameSelectionElement class.
- * </p>
- *
- * @author nho
- * @version $Id: $
- */
-public class NameSelectionElement extends
- AbstractSelectionElement<TaxonNameBase> {
-
- public static final int DEFAULT = EDITABLE | SELECTABLE | DELETABLE;
-
- /**
- * <p>
- * Constructor for NameSelectionElement.
- * </p>
- *
- * @param labelString
- * a {@link java.lang.String} object.
- * @param selection
- * a {@link eu.etaxonomy.cdm.model.name.TaxonNameBase} object.
- * @param style
- * a int.
- * @param toolkit
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
- * object.
- * @param conversation
- * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
- * object.
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
- * object.
- */
- public NameSelectionElement(CdmFormFactory toolkit,
- ConversationHolder conversation, ICdmFormElement parentElement,
- String labelString, TaxonNameBase selection, int mode, int style) {
- super(toolkit, conversation, parentElement, labelString, selection,
- mode, style);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
- * .events.SelectionEvent)
- */
- /** {@inheritDoc} */
- @Override
- public void widgetSelected(SelectionEvent e) {
- TaxonNameBase newSelection = NameSelectionDialog.select(getShell(),
- getConversationHolder(), entity);
- setSelectionInternal(newSelection);
- }
-
-}
+++ /dev/null
-// $Id$
-/**
- * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.location.NamedArea;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.NamedAreaSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * NamedAreaSelectionElement class.
- * </p>
- *
- * @author n.hoffmann
- * @created May 11, 2010
- * @version 1.0
- */
-public class NamedAreaSelectionElement extends
- AbstractSelectionElement<NamedArea> {
-
- public static final int DEFAULT = NOTHING;
-
- /**
- * <p>
- * Constructor for NamedAreaSelectionElement.
- * </p>
- *
- * @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
- * object.
- * @param conversation
- * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
- * object.
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
- * object.
- * @param labelString
- * a {@link java.lang.String} object.
- * @param entity
- * a {@link eu.etaxonomy.cdm.model.location.NamedArea} object.
- * @param style
- * a int.
- */
- public NamedAreaSelectionElement(CdmFormFactory formFactory,
- ConversationHolder conversation, ICdmFormElement parentElement,
- String labelString, NamedArea entity, int mode, int style) {
- super(formFactory, conversation, parentElement, labelString, entity,
- mode, style);
- }
-
- /** {@inheritDoc} */
- @Override
- public void widgetSelected(SelectionEvent e) {
- NamedArea newSelection = NamedAreaSelectionDialog.select(
- getLayoutComposite().getShell(), getConversationHolder(),
- entity);
- setSelectionInternal(newSelection);
- }
-
- /** {@inheritDoc} */
- @Override
- protected String getTitle() {
- return (entity != null) ? NamedArea.labelWithLevel(entity,
- CdmStore.getDefaultLanguage()) : "";
- }
-}
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.agent.Team;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.NomenclaturalAuthorTeamSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.NomenclaturalAuthorTeamSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
/**
* <p>
* @version 1.0
*/
public class NomenclaturalAuthorTeamSelectionElement extends
- AbstractSelectionElement<Team> {
+ EntitySelectionElement<Team> {
public static final int DEFAULT = EDITABLE | SELECTABLE | DELETABLE;
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param conversation
* a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
* object.
* @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param labelString
* a {@link java.lang.String} object.
+++ /dev/null
-// $Id$
-/**
- * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.agent.Person;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.PersonSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * PersonSelectionElement class.
- * </p>
- *
- * @author n.hoffmann
- * @created May 12, 2010
- * @version 1.0
- */
-public class PersonSelectionElement extends AbstractSelectionElement<Person> {
-
- public static final int DEFAULT = EDITABLE | SELECTABLE;
-
- /**
- * <p>
- * Constructor for PersonSelectionElement.
- * </p>
- *
- * @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
- * object.
- * @param conversation
- * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
- * object.
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
- * object.
- * @param labelString
- * a {@link java.lang.String} object.
- * @param entity
- * a {@link eu.etaxonomy.cdm.model.agent.Person} object.
- * @param style
- * a int.
- */
- public PersonSelectionElement(CdmFormFactory formFactory,
- ConversationHolder conversation, ICdmFormElement parentElement,
- String labelString, Person entity, int mode, int style) {
- super(formFactory, conversation, parentElement, labelString, entity,
- mode, style);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
- * .events.SelectionEvent)
- */
- /** {@inheritDoc} */
- @Override
- public void widgetSelected(SelectionEvent e) {
- Person newSelection = PersonSelectionDialog.select(getShell(),
- getConversationHolder(), entity);
- setSelectionInternal(newSelection);
- }
-}
+++ /dev/null
-// $Id$
-/**
- * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
-import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * @author n.hoffmann
- * @created Dec 3, 2010
- * @version 1.0
- */
-public class PolytomousKeyNodeSelectionElement extends
- AbstractSelectionElement<PolytomousKeyNode> {
-
- public static final int DEFAULT = DELETABLE;
-
- /**
- *
- * @param formFactory
- * @param conversation
- * @param parentElement
- * @param labelString
- * @param entity
- * @param style
- */
- public PolytomousKeyNodeSelectionElement(CdmFormFactory formFactory,
- ConversationHolder conversation, ICdmFormElement parentElement,
- String labelString, PolytomousKeyNode entity, int mode, int style) {
- super(formFactory, conversation, parentElement, labelString, entity,
- mode, style);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
- * .events.SelectionEvent)
- */
- @Override
- public void widgetSelected(SelectionEvent e) {
- StoreUtil.warningDialog("Not implemented yet", getClass(),
- "This functionality is not implemented yet.");
- }
-}
+++ /dev/null
-// $Id$
-/**
- * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.description.PolytomousKey;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.PolytomousKeySelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * @author n.hoffmann
- * @created Dec 3, 2010
- * @version 1.0
- */
-public class PolytomousKeySelectionElement extends
- AbstractSelectionElement<PolytomousKey> {
-
- public static final int DEFAULT = EDITABLE | DELETABLE;
-
- /**
- * @param formFactory
- * @param conversation
- * @param parentElement
- * @param labelString
- * @param entity
- * @param isEditable
- * @param isSelectable
- * @param isDeletable
- * @param style
- */
- public PolytomousKeySelectionElement(CdmFormFactory formFactory,
- ConversationHolder conversation, ICdmFormElement parentElement,
- String labelString, PolytomousKey entity, int mode, int style) {
- super(formFactory, conversation, parentElement, labelString, entity,
- mode, style);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
- * .events.SelectionEvent)
- */
- @Override
- public void widgetSelected(SelectionEvent e) {
- PolytomousKey newSelection = PolytomousKeySelectionDialog.select(
- getShell(), getConversationHolder(), entity);
-
- setSelectionInternal(newSelection);
- }
-
-}
+++ /dev/null
-/**
- *
- */
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.api.service.IReferenceService;
-import eu.etaxonomy.cdm.model.reference.Reference;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.ReferenceSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * ReferenceSelectionElement class.
- * </p>
- *
- * @author n.hofmann
- * @version $Id: $
- */
-public class ReferenceSelectionElement extends
- AbstractSelectionElement<Reference> {
-
- public static final int DEFAULT = EDITABLE | SELECTABLE | DELETABLE;
-
- /**
- * <p>
- * Constructor for ReferenceSelectionElement.
- * </p>
- *
- * @param labelString
- * a {@link java.lang.String} object.
- * @param selection
- * a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase}
- * object.
- * @param style
- * a int.
- * @param toolkit
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
- * object.
- * @param conversation
- * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
- * object.
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
- * object.
- */
- public ReferenceSelectionElement(CdmFormFactory toolkit,
- ConversationHolder conversation, ICdmFormElement parentElement,
- String labelString, Reference selection, int mode, int style) {
- super(toolkit, conversation, parentElement, labelString, selection,
- mode, style);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
- * .events.SelectionEvent)
- */
- /** {@inheritDoc} */
- @Override
- public void widgetSelected(SelectionEvent e) {
- Reference newSelection = ReferenceSelectionDialog.select(getShell(),
- getConversationHolder(), entity);
-
- setSelectionInternal(newSelection);
-
-// Reference freshlyLoadedSelection = null;
-// if (newSelection != null)
-// freshlyLoadedSelection = CdmStore.getService(
-// IReferenceService.class).load(newSelection.getUuid());
-//
-// setSelectionInternal(freshlyLoadedSelection);
- }
-}
+++ /dev/null
-// $Id$
-/**
- * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.taxon.Synonym;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonBaseSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * @author n.hoffmann
- * @created Dec 9, 2010
- * @version 1.0
- */
-public class SynonymSelectionElement extends AbstractSelectionElement<Synonym> {
-
- public static final int DEFAULT = SELECTABLE | DELETABLE;
-
- /**
- * @param formFactory
- * @param conversation
- * @param parentElement
- * @param labelString
- * @param entity
- * @param isEditable
- * @param isSelectable
- * @param isDeletable
- * @param style
- */
- public SynonymSelectionElement(CdmFormFactory formFactory,
- ConversationHolder conversation, ICdmFormElement parentElement,
- String labelString, Synonym entity, int mode, int style) {
- super(formFactory, conversation, parentElement, labelString, entity,
- mode, style);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
- * .events.SelectionEvent)
- */
- @Override
- public void widgetSelected(SelectionEvent e) {
- Synonym newSelection = TaxonBaseSelectionDialog.selectSynonym(
- getShell(), getConversationHolder());
- setSelectionInternal(newSelection);
- }
-
-}
+++ /dev/null
-/**
- *
- */
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonBaseSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * TaxonBaseSelectionElement class.
- * </p>
- *
- * @author nho
- * @version $Id: $
- */
-public class TaxonBaseSelectionElement extends
- AbstractSelectionElement<TaxonBase> {
-
- public static final int DEFAULT = DELETABLE;
-
- /**
- * <p>
- * Constructor for TaxonBaseSelectionElement.
- * </p>
- *
- * @param labelString
- * a {@link java.lang.String} object.
- * @param selection
- * a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.
- * @param style
- * a int.
- * @param toolkit
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
- * object.
- * @param conversation
- * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
- * object.
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
- * object.
- */
- public TaxonBaseSelectionElement(CdmFormFactory toolkit,
- ConversationHolder conversation, ICdmFormElement parentElement,
- String labelString, TaxonBase selection, int mode, int style) {
- super(toolkit, conversation, parentElement, labelString, selection,
- mode, style);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
- * .events.SelectionEvent)
- */
- /** {@inheritDoc} */
- @Override
- public void widgetSelected(SelectionEvent e) {
- TaxonBase newSelection = TaxonBaseSelectionDialog.selectTaxonBase(
- getShell(), getConversationHolder());
- setSelectionInternal(newSelection);
- }
-
-}
// $Id$
/**
- * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-
+* Copyright (C) 2009 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
package eu.etaxonomy.taxeditor.ui.selection;
import org.eclipse.swt.events.SelectionEvent;
import eu.etaxonomy.cdm.common.CdmUtils;
import eu.etaxonomy.cdm.model.taxon.Classification;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonNodeSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
/**
- * <p>
- * TaxonNodeSelectionElement class.
- * </p>
- *
* @author n.hoffmann
- * @created Sep 27, 2010
- * @version 1.0
+ * @date Jan 26, 2012
+ *
*/
-public class TaxonNodeSelectionElement extends
- AbstractSelectionElement<TaxonNode> {
+public class TaxonNodeSelectionElement extends EntitySelectionElement<TaxonNode> {
- public static final int DEFAULT = DELETABLE;
private Classification classification;
-
- /**
- * <p>
- * Constructor for TaxonNodeSelectionElement.
- * </p>
- *
- * @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
- * object.
- * @param conversation
- * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
- * object.
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
- * object.
- * @param labelString
- * a {@link java.lang.String} object.
- * @param entity
- * a {@link eu.etaxonomy.cdm.model.taxon.TaxonNode} object.
- * @param style
- * a int.
- */
+
public TaxonNodeSelectionElement(CdmFormFactory formFactory,
ConversationHolder conversation, ICdmFormElement parentElement,
String labelString, TaxonNode entity, int mode, int style) {
- super(formFactory, conversation, parentElement, labelString, entity,
- mode, style);
+ super(formFactory, conversation, parentElement, labelString, entity, mode,
+ style);
}
-
+
+ /**
+ * @return
+ */
+ public Classification getClassification() {
+ return classification;
+ }
+
+ public void setClassification(Classification classification){
+ this.classification = classification;
+ }
+
/*
* (non-Javadoc)
*
getConversationHolder(), "Select parent taxon", null, null, getClassification());
setSelectionInternal(newSelection);
}
-
- /**
- * @return
- */
- public Classification getClassification() {
- return classification;
- }
- public void setClassification(Classification classification){
- this.classification = classification;
- }
-
/*
* (non-Javadoc)
*
}
return super.getTitle();
}
+
}
+++ /dev/null
-// $Id$
-/**
- * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonBaseSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * @author n.hoffmann
- * @created Dec 9, 2010
- * @version 1.0
- */
-public class TaxonSelectionElement extends AbstractSelectionElement<Taxon> {
-
- public static final int DEFAULT = NOTHING;
-
- /**
- *
- * @param formFactory
- * @param conversation
- * @param parentElement
- * @param labelString
- * @param entity
- * @param mode
- * @param style
- */
- public TaxonSelectionElement(CdmFormFactory formFactory,
- ConversationHolder conversation, ICdmFormElement parentElement,
- String labelString, Taxon entity, int mode, int style) {
- super(formFactory, conversation, parentElement, labelString, entity,
- mode, style);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
- * .events.SelectionEvent)
- */
- @Override
- public void widgetSelected(SelectionEvent e) {
- Taxon newSelection = TaxonBaseSelectionDialog.selectTaxon(getShell(),
- getConversationHolder());
- setSelectionInternal(newSelection);
- }
-
-}
+++ /dev/null
-// $Id$
-/**
- * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.agent.Team;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TeamSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * TeamSelectionElement class.
- * </p>
- *
- * @author n.hoffmann
- * @created Apr 30, 2010
- * @version 1.0
- */
-public class TeamSelectionElement extends AbstractSelectionElement<Team> {
-
- public static final int DEFAULT = EDITABLE | SELECTABLE | DELETABLE;
-
- /**
- * <p>
- * Constructor for TeamSelectionElement.
- * </p>
- *
- * @param toolkit
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
- * object.
- * @param conversation
- * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
- * object.
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
- * object.
- * @param labelString
- * a {@link java.lang.String} object.
- * @param selection
- * a {@link eu.etaxonomy.cdm.model.agent.Team} object.
- * @param style
- * a int.
- */
- public TeamSelectionElement(CdmFormFactory toolkit,
- ConversationHolder conversation, ICdmFormElement parentElement,
- String labelString, Team selection, int mode, int style) {
- super(toolkit, conversation, parentElement, labelString, selection,
- mode, style);
- }
-
- /** {@inheritDoc} */
- @Override
- public void widgetSelected(SelectionEvent e) {
- Team newSelection = TeamSelectionDialog.select(getShell(),
- getConversationHolder(), entity);
- setSelectionInternal(newSelection);
- }
-
-}
+++ /dev/null
-// $Id$
-/**
- * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.UserSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * @author n.hoffmann
- * @created Mar 10, 2011
- * @version 1.0
- */
-public class UserSelectionElement extends AbstractSelectionElement<User> {
-
- public static final int DEFAULT = NOTHING;
-
- /**
- * @param formFactory
- * @param conversation
- * @param parentElement
- * @param labelString
- * @param entity
- * @param isEditable
- * @param isSelectable
- * @param isDeletable
- * @param style
- */
- public UserSelectionElement(CdmFormFactory formFactory,
- ConversationHolder conversation, ICdmFormElement parentElement,
- String labelString, User entity, int mode, int style) {
- super(formFactory, conversation, parentElement, labelString, entity,
- mode, style);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
- * .events.SelectionEvent)
- */
- @Override
- public void widgetSelected(SelectionEvent e) {
- User newSelection = UserSelectionDialog.select(getShell(),
- getConversationHolder(), entity);
- setSelectionInternal(newSelection);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement#getTitle()
- */
- @Override
- protected String getTitle() {
- return (entity != null) ? entity.getUsername() : "NO USER";
- }
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.common.AnnotationType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>AnnotationTypeComboElement class.</p>
- *
- * @author n.hoffmann
- * @created May 12, 2010
- * @version 1.0
- */
-public class AnnotationTypeComboElement extends AbstractTermComboElement<AnnotationType> {
-
- private static final int VISIBLE_ITEMS = 10;
-
- /**
- * <p>Constructor for AnnotationTypeComboElement.</p>
- *
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.common.AnnotationType} object.
- * @param style a int.
- */
- public AnnotationTypeComboElement(CdmFormFactory formFactory,
- ICdmFormElement parentElement, String labelString,
- AnnotationType selection, int style) {
- super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.forms.term.AbstractTermComboElement#preferredTerms()
- */
- /** {@inheritDoc} */
- @Override
- protected List<AnnotationType> preferredTerms() {
- return getTermManager().getPreferredAnnotationTypes();
- }
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.occurrence.DeterminationModifier;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>DeterminationModifierComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Oct 14, 2010
- * @version 1.0
- */
-public class DeterminationModifierComboElement extends AbstractTermComboElement<DeterminationModifier> {
-
- private static final int VISIBLE_ITEMS = 10;
-
- /**
- * <p>Constructor for DeterminationModifierComboElement.</p>
- *
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.occurrence.DeterminationModifier} object.
- * @param style a int.
- */
- public DeterminationModifierComboElement(CdmFormFactory formFactory,
- ICdmFormElement parentElement, String labelString,
- DeterminationModifier selection, int style) {
- super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.forms.term.AbstractTermComboElement#preferredTerms()
- */
- /** {@inheritDoc} */
- @Override
- protected List<DeterminationModifier> preferredTerms() {
- return getTermManager().getPreferredDeterminationModifiers();
- }
-
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.util.PropertyChangeEvent;
-
-import eu.etaxonomy.cdm.model.common.DefinedTermBase;
-import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>EmptyComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Sep 29, 2010
- * @version 1.0
- */
-public class EmptyComboElement<T extends DefinedTermBase> extends AbstractTermComboElement<T> {
-
- private static final int VISIBLE_ITEMS = 20;
-
- private List<T> genericTerms = new ArrayList<T>();
-
- /**
- * <p>Constructor for EmptyComboElement.</p>
- *
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- * @param labelString a {@link java.lang.String} object.
- * @param style a int.
- * @param <T> a T object.
- */
- public EmptyComboElement(CdmFormFactory formFactory,
- ICdmFormElement parentElement, String labelString,
- int style) {
- super(formFactory, parentElement, labelString, null, VISIBLE_ITEMS, style);
- }
-
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.forms.term.AbstractTermComboElement#preferredTerms()
- */
- /** {@inheritDoc} */
- @Override
- protected List<T> preferredTerms() {
- return genericTerms != null ? genericTerms : new ArrayList<T>();
- }
-
-
- /**
- * <p>setTerms</p>
- *
- * @param terms a {@link java.util.List} object.
- */
- public void setTerms(List<T> terms) {
- if(terms == null){
- throw new IllegalArgumentException("List of terms may not be null");
- }
-
- this.genericTerms = terms;
- propertyChange(new PropertyChangeEvent(this, PreferencesUtil.PREFERRED_TERMS_CHANGE, this.genericTerms, terms));
- }
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.common.ExtensionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>ExtensionTypeComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Nov 16, 2009
- * @version 1.0
- */
-public class ExtensionTypeComboElement extends AbstractTermComboElement<ExtensionType> {
-
- private static final int VISIBLE_ITEMS = 10;
-
- /**
- * <p>Constructor for ExtensionTypeComboElement.</p>
- *
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.common.ExtensionType} object.
- * @param style a int.
- * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- */
- public ExtensionTypeComboElement(CdmFormFactory toolkit, ICdmFormElement parentElement, String labelString,
- ExtensionType selection, int style) {
- super(toolkit, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
-
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.forms.termcombos.AbstractTermComboComposite#preferredTerms()
- */
- /** {@inheritDoc} */
- @Override
- protected List<ExtensionType> preferredTerms() {
- return getTermManager().getPreferredExtensionTypes();
- }
-}
+++ /dev/null
-/**
- *
- */
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.common.Language;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>LanguageComboElement class.</p>
- *
- * @author n.hoffmann
- * @version $Id: $
- */
-public class LanguageComboElement extends AbstractTermComboElement<Language> {
-
- private static final int VISIBLE_ITEMS = 20;
-
- /**
- * <p>Constructor for LanguageComboElement.</p>
- *
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.common.Language} object.
- * @param style a int.
- * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- */
- public LanguageComboElement(CdmFormFactory toolkit, ICdmFormElement parentElement, String labelString, Language selection, int style) {
- super(toolkit, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.forms.AbstractTermComboComposite#preferredTerms()
- */
- /** {@inheritDoc} */
- @Override
- protected List<Language> preferredTerms() {
- return getTermManager().getPreferredLanguages();
- }
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.common.MarkerType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>MarkerTypeComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Nov 16, 2009
- * @version 1.0
- */
-public class MarkerTypeComboElement extends AbstractTermComboElement<MarkerType> {
-
- private static final int VISIBLE_ITEMS = 10;
-
- /**
- * <p>Constructor for MarkerTypeComboElement.</p>
- *
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.common.MarkerType} object.
- * @param style a int.
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- */
- public MarkerTypeComboElement(CdmFormFactory formFactory, ICdmFormElement parentElement, String labelString,
- MarkerType selection, int style) {
- super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.forms.termcombos.AbstractTermComboComposite#preferredTerms()
- */
- /** {@inheritDoc} */
- @Override
- protected List<MarkerType> preferredTerms() {
- return getTermManager().getPreferredMarkerTypes();
- }
-}
+++ /dev/null
-/**
- *
- */
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.description.MeasurementUnit;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>MeasurementUnitComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Sep 15, 2010
- * @version 1.0
- */
-public class MeasurementUnitComboElement extends AbstractTermComboElement<MeasurementUnit> {
-
- private static final int VISIBLE_ITEMS = 10;
-
- /**
- * <p>Constructor for MeasurementUnitComboElement.</p>
- *
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.description.MeasurementUnit} object.
- * @param style a int.
- */
- public MeasurementUnitComboElement(CdmFormFactory formFactory,
- ICdmFormElement parentElement, String labelString,
- MeasurementUnit selection, int style) {
- super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.forms.term.AbstractTermComboElement#preferredTerms()
- */
- /** {@inheritDoc} */
- @Override
- protected List<MeasurementUnit> preferredTerms() {
- return getTermManager().getPreferredMeasurementUnits();
- }
-
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.description.Modifier;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>ModifierComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Sep 15, 2010
- * @version 1.0
- */
-public class ModifierComboElement extends AbstractTermComboElement<Modifier> {
-
- private static final int VISIBLE_ITEMS = 10;
-
- /**
- * <p>Constructor for ModifierComboElement.</p>
- *
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.description.Modifier} object.
- * @param style a int.
- */
- public ModifierComboElement(CdmFormFactory formFactory,
- ICdmFormElement parentElement, String labelString,
- Modifier selection, int style) {
- super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
-
- /** {@inheritDoc} */
- @Override
- protected List<Modifier> preferredTerms() {
- return getTermManager().getPreferredModifiers();
- }
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.name.NameRelationshipType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>NameRelationshipTypeComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Mar 19, 2010
- * @version 1.0
- */
-public class NameRelationshipTypeComboElement extends AbstractTermComboElement<NameRelationshipType> {
-
- private static final int VISIBLE_ITEMS = 10;
-
- /**
- * <p>Constructor for NameRelationshipTypeComboElement.</p>
- *
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.name.NameRelationshipType} object.
- * @param style a int.
- */
- public NameRelationshipTypeComboElement(CdmFormFactory formFactory,
- ICdmFormElement parentElement, String labelString, NameRelationshipType selection, int style) {
- super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
-
- /** {@inheritDoc} */
- @Override
- protected List<NameRelationshipType> preferredTerms() {
- return getTermManager().getPreferredNameRelationshipTypes();
- }
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>NameTypeDesignationStatusComboElement class.</p>
- *
- * @author n.hoffmann
- * @created May 17, 2010
- * @version 1.0
- */
-public class NameTypeDesignationStatusComboElement extends
- AbstractTermComboElement<NameTypeDesignationStatus> {
-
- private static final int VISIBLE_ITEMS = 10;
-
- /**
- * <p>Constructor for NameTypeDesignationStatusComboElement.</p>
- *
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus} object.
- * @param style a int.
- */
- public NameTypeDesignationStatusComboElement(CdmFormFactory formFactory,
- ICdmFormElement parentElement, String labelString,
- NameTypeDesignationStatus selection, int style) {
- super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.forms.term.AbstractTermComboElement#preferredTerms()
- */
- /** {@inheritDoc} */
- @Override
- protected List<NameTypeDesignationStatus> preferredTerms() {
- return getTermManager().getPreferredNameTypeDesignationStatus();
- }
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.location.NamedAreaType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>NamedAreaTypeComboElement class.</p>
- *
- * @author n.hoffmann
- * @created May 11, 2010
- * @version 1.0
- */
-public class NamedAreaTypeComboElement extends AbstractTermComboElement<NamedAreaType> {
-
- private static final int VISIBLE_ITEMS = 10;
-
- /**
- * <p>Constructor for NamedAreaTypeComboElement.</p>
- *
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.location.NamedAreaType} object.
- * @param style a int.
- */
- public NamedAreaTypeComboElement(CdmFormFactory formFactory,
- ICdmFormElement parentElement, String labelString,
- NamedAreaType selection, int style) {
- super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
-
- /** {@inheritDoc} */
- @Override
- protected List<NamedAreaType> preferredTerms() {
- return getTermManager().getPreferredNamedAreaTypes();
- }
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>NomenclaturalCodeComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Mar 16, 2010
- * @version 1.0
- */
-public class NomenclaturalCodeComboElement extends AbstractEnumComboElement<NomenclaturalCode> {
-
- /**
- * <p>Constructor for NomenclaturalCodeComboElement.</p>
- *
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- * @param labelString a {@link java.lang.String} object.
- * @param nomenclaturalCode a {@link eu.etaxonomy.cdm.model.name.NomenclaturalCode} object.
- * @param style a int.
- */
- public NomenclaturalCodeComboElement(CdmFormFactory formFactory,
- ICdmFormElement parentElement, String labelString, NomenclaturalCode nomenclaturalCode, int style) {
- super(formFactory, parentElement, labelString);
- }
-
- /**
- * <p>populateTypes</p>
- */
- protected void populateTypes() {
- for(NomenclaturalCode nomenclaturalCode : NomenclaturalCode.values()){
- elementTypeList.add(nomenclaturalCode);
- combo.add(nomenclaturalCode.name());
- }
- }
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>NomenclaturalStatusTypeComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Nov 5, 2009
- * @version 1.0
- */
-public class NomenclaturalStatusTypeComboElement extends
- AbstractTermComboElement<NomenclaturalStatusType> {
-
- private static final int VISIBLE_ITEMS = 10;
-
- /**
- * <p>Constructor for NomenclaturalStatusTypeComboElement.</p>
- *
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.name.NomenclaturalStatusType} object.
- * @param style a int.
- * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- */
- public NomenclaturalStatusTypeComboElement(CdmFormFactory toolkit, ICdmFormElement parentElement,
- String labelString, NomenclaturalStatusType selection, int style) {
- super(toolkit, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.forms.termcombos.AbstractTermComboComposite#preferredTerms()
- */
- /** {@inheritDoc} */
- @Override
- protected List<NomenclaturalStatusType> preferredTerms() {
- return getTermManager().getPreferredNomenclaturalStatusTypes();
- }
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>PresenceAbsenceTermComboElement class.</p>
- *
- * @author n.hoffmann
- * @created May 11, 2010
- * @version 1.0
- */
-public class PresenceAbsenceTermComboElement extends
- AbstractTermComboElement<PresenceAbsenceTermBase> {
-
- private static final int VISIBLE_ITEMS = 10;
-
- /**
- * <p>Constructor for PresenceAbsenceTermComboElement.</p>
- *
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase} object.
- * @param style a int.
- */
- public PresenceAbsenceTermComboElement(CdmFormFactory formFactory,
- ICdmFormElement parentElement, String labelString,
- PresenceAbsenceTermBase selection, int style) {
- super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
-
- /** {@inheritDoc} */
- @Override
- protected List<PresenceAbsenceTermBase> preferredTerms() {
- return getTermManager().getPreferredPresenceAbsenceTerms();
- }
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.occurrence.PreservationMethod;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>PreservationMethodComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Jun 25, 2010
- * @version 1.0
- */
-public class PreservationMethodComboElement extends AbstractTermComboElement<PreservationMethod> {
-
- private static final int VISIBLE_ITEMS = 5;
-
- /**
- * <p>Constructor for PreservationMethodComboElement.</p>
- *
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.occurrence.PreservationMethod} object.
- * @param style a int.
- */
- public PreservationMethodComboElement(CdmFormFactory formFactory,
- ICdmFormElement parentElement, String labelString,
- PreservationMethod selection, int style) {
- super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.forms.term.AbstractTermComboElement#preferredTerms()
- */
- /** {@inheritDoc} */
- @Override
- protected List<PreservationMethod> preferredTerms() {
- return getTermManager().getPreferredPreservationMethods();
- }
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.name.Rank;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>RankComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Nov 5, 2009
- * @version 1.0
- */
-public class RankComboElement extends AbstractTermComboElement<Rank> {
-
- private static final int VISIBLE_ITEMS = 10;
-
- /**
- * <p>Constructor for RankComboElement.</p>
- *
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.name.Rank} object.
- * @param style a int.
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- */
- public RankComboElement(CdmFormFactory formFactory, ICdmFormElement parentElement, String labelString,
- Rank selection, int style) {
- super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
-
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.forms.termcombos.AbstractTermComboComposite#preferredTerms()
- */
- /** {@inheritDoc} */
- @Override
- protected List<Rank> preferredTerms() {
- return getTermManager().getPreferredRanks();
- }
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.location.ReferenceSystem;
-import eu.etaxonomy.taxeditor.store.TermStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>ReferenceSystemComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Oct 15, 2010
- * @version 1.0
- */
-public class ReferenceSystemComboElement extends AbstractTermComboElement<ReferenceSystem> {
-
- private static final int VISIBLE_ITEMS = 10;
-
- /**
- * <p>Constructor for ReferenceSystemComboElement.</p>
- *
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.location.ReferenceSystem} object.
- * @param style a int.
- */
- public ReferenceSystemComboElement(CdmFormFactory formFactory,
- ICdmFormElement parentElement, String labelString,
- ReferenceSystem selection, int style) {
- super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.forms.term.AbstractTermComboElement#preferredTerms()
- */
- /** {@inheritDoc} */
- @Override
- protected List<ReferenceSystem> preferredTerms() {
- return TermStore.getReferenceSystems();
- }
-
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import eu.etaxonomy.cdm.model.reference.ReferenceType;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>ReferenceTypeComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Nov 16, 2009
- * @version 1.0
- */
-public class ReferenceTypeComboElement extends AbstractEnumComboElement<ReferenceType>{
-
- /**
- * <p>Constructor for ReferenceTypeComboElement.</p>
- *
- * @param style a int.
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- * @param labelString a {@link java.lang.String} object.
- * @param referenceType a {@link eu.etaxonomy.cdm.model.reference.ReferenceType} object.
- */
- public ReferenceTypeComboElement(CdmFormFactory formFactory, ICdmFormElement parentElement, String labelString, ReferenceType referenceType, int style) {
- super(formFactory, parentElement, labelString);
- }
-
- /**
- * <p>populateTypes</p>
- */
- protected void populateTypes() {
- for(ReferenceType referenceType : ReferenceType.values()){
- elementTypeList.add(referenceType);
- combo.add(referenceType.getMessage(CdmStore.getDefaultLanguage()));
- }
- }
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.media.RightsTerm;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>RightsTypeComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Nov 16, 2009
- * @version 1.0
- */
-public class RightsTypeComboElement extends AbstractTermComboElement<RightsTerm> {
-
- private static final int VISIBLE_ITEMS = 10;
-
- /**
- * <p>Constructor for RightsTypeComboElement.</p>
- *
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.media.RightsTerm} object.
- * @param style a int.
- * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- */
- public RightsTypeComboElement(CdmFormFactory toolkit, ICdmFormElement parentElement, String labelString,
- RightsTerm selection, int style) {
- super(toolkit, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.forms.termcombos.AbstractTermComboComposite#preferredTerms()
- */
- /** {@inheritDoc} */
- @Override
- protected List<RightsTerm> preferredTerms() {
- return getTermManager().getPreferredRightsTypes();
- }
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.description.Scope;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>ScopeComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Sep 17, 2010
- * @version 1.0
- */
-public class ScopeComboElement extends AbstractTermComboElement<Scope> {
-
- private static final int VISIBLE_ITEMS = 10;
-
- /**
- * <p>Constructor for ScopeComboElement.</p>
- *
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.description.Scope} object.
- * @param style a int.
- */
- public ScopeComboElement(CdmFormFactory formFactory,
- ICdmFormElement parentElement, String labelString, Scope selection,
- int style) {
- super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
-
- /** {@inheritDoc} */
- @Override
- protected List<Scope> preferredTerms() {
- return getTermManager().getPreferredScopes();
- }
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.description.Sex;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>SexComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Jun 24, 2010
- * @version 1.0
- */
-public class SexComboElement extends AbstractTermComboElement<Sex> {
-
- private static final int VISIBLE_ITEMS = 2;
-
- /**
- * <p>Constructor for SexComboElement.</p>
- *
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.description.Sex} object.
- * @param style a int.
- */
- public SexComboElement(CdmFormFactory formFactory,
- ICdmFormElement parentElement, String labelString, Sex selection, int style) {
- super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.forms.term.AbstractTermComboElement#preferredTerms()
- */
- /** {@inheritDoc} */
- @Override
- protected List<Sex> preferredTerms() {
- List<Sex> list = new ArrayList<Sex>();
- list.add(Sex.FEMALE());
- list.add(Sex.MALE());
- return list;
- }
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>SpecimenTypeDesignationStatusComboElement class.</p>
- *
- * @author n.hoffmann
- * @created May 17, 2010
- * @version 1.0
- */
-public class SpecimenTypeDesignationStatusComboElement extends
- AbstractTermComboElement<SpecimenTypeDesignationStatus> {
-
- private static final int VISIBLE_ITEMS = 10;
-
- /**
- * <p>Constructor for SpecimenTypeDesignationStatusComboElement.</p>
- *
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus} object.
- * @param style a int.
- */
- public SpecimenTypeDesignationStatusComboElement(
- CdmFormFactory formFactory, ICdmFormElement parentElement,
- String labelString, SpecimenTypeDesignationStatus selection, int style) {
- super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.forms.term.AbstractTermComboElement#preferredTerms()
- */
- /** {@inheritDoc} */
- @Override
- protected List<SpecimenTypeDesignationStatus> preferredTerms() {
- return getTermManager().getPreferredSpecimenTypeDesignationStatus();
- }
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.description.Stage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>StageComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Jun 25, 2010
- * @version 1.0
- */
-public class StageComboElement extends AbstractTermComboElement<Stage> {
-
- private static final int VISIBLE_ITEMS = 5;
-
- /**
- * <p>Constructor for StageComboElement.</p>
- *
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.description.Stage} object.
- * @param style a int.
- */
- public StageComboElement(CdmFormFactory formFactory,
- ICdmFormElement parentElement, String labelString, Stage selection,
- int style) {
- super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.forms.term.AbstractTermComboElement#preferredTerms()
- */
- /** {@inheritDoc} */
- @Override
- protected List<Stage> preferredTerms() {
- return getTermManager().getPreferredStages();
- }
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.description.State;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>StateComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Sep 15, 2010
- * @version 1.0
- */
-public class StateComboElement extends AbstractTermComboElement<State> {
-
- private static final int VISIBLE_ITEMS = 10;
-
- /**
- * <p>Constructor for StateComboElement.</p>
- *
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.description.State} object.
- * @param style a int.
- */
- public StateComboElement(CdmFormFactory formFactory,
- ICdmFormElement parentElement, String labelString, State selection,
- int style) {
- super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
-
- /** {@inheritDoc} */
- @Override
- protected List<State> preferredTerms() {
- return getTermManager().getPreferredStates();
- }
-}
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.description.StatisticalMeasure;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>StatisticalMeasureComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Sep 15, 2010
- * @version 1.0
- */
-public class StatisticalMeasureComboElement extends AbstractTermComboElement<StatisticalMeasure> {
-
- private static final int VISIBLE_ITEMS = 5;
-
- /**
- * <p>Constructor for StatisticalMeasureComboElement.</p>
- *
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
- * @param labelString a {@link java.lang.String} object.
- * @param selection a {@link eu.etaxonomy.cdm.model.description.StatisticalMeasure} object.
- * @param style a int.
- */
- public StatisticalMeasureComboElement(CdmFormFactory formFactory,
- ICdmFormElement parentElement, String labelString,
- StatisticalMeasure selection, int style) {
- super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
- }
- /** {@inheritDoc} */
- @Override
- protected List<StatisticalMeasure> preferredTerms() {
- return getTermManager().getPreferredStatisticalMeasures();
- }
-}
else if(language.equals(Language.GERMAN())){
return com.google.api.translate.Language.GERMAN;
}
- else if(language.equals(Language.SPANISH_CATALAN())){
+ else if(language.equals(Language.SPANISH_CASTILIAN())){
return com.google.api.translate.Language.SPANISH;
}
else if(language.equals(Language.AFRIKAANS())){
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
/**
* <p>TranslationMetaDataWizardPage class.</p>
public void createControl(Composite parent) {
Composite control = formFactory.createComposite(parent);
// control.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_GREEN));
- control.setLayout(CdmFormFactory.LAYOUT(1, false));
+ control.setLayout(LayoutConstants.LAYOUT(1, false));
SashForm sash = new SashForm(control, SWT.HORIZONTAL);
- sash.setLayoutData(CdmFormFactory.FILL());
+ sash.setLayoutData(LayoutConstants.FILL());
setControl(control);
}
/** {@inheritDoc} */
@Override
public boolean performFinish() {
+ LanguageString languageString = page.getTargetLanguageString();
+
+ if (!languageString.getText().equals("")) {
+ multilanguageText.put(languageString.getLanguage(), languageString);
+ }
+
return true;
}
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import eu.etaxonomy.cdm.model.common.MultilanguageTextHelper;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.LanguageStringWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.MultilanguageTextElement;
-import eu.etaxonomy.taxeditor.ui.forms.RootElement;
-import eu.etaxonomy.taxeditor.ui.term.EmptyComboElement;
-import eu.etaxonomy.taxeditor.ui.term.LanguageComboElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement;
+import eu.etaxonomy.taxeditor.ui.element.RootElement;
/**
* <p>TranslationWizardPage class.</p>
private CdmFormFactory formFactory;
- private EmptyComboElement<Language> combo_sourceLanguage;
+ private TermComboElement<Language> combo_sourceLanguage;
private LanguageStringWithLabelElement text_source;
- private LanguageComboElement combo_targetLanguage;
+ private TermComboElement<Language> combo_targetLanguage;
private LanguageStringWithLabelElement text_target;
setTitle("Add or edit translations.");
this.multilanguageText = multilanguageText;
formFactory = new CdmFormFactory(Display.getCurrent());
+ setPageComplete(false);
}
/* (non-Javadoc)
public void createControl(Composite parent) {
Composite control = formFactory.createComposite(parent);
// control.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_GREEN));
- control.setLayout(CdmFormFactory.LAYOUT(2, true));
+ control.setLayout(LayoutConstants.LAYOUT(2, true));
Composite leftContainer = formFactory.createComposite(control);
- leftContainer.setLayoutData(CdmFormFactory.FILL());
- leftContainer.setLayout(CdmFormFactory.LAYOUT(1, false));
+ leftContainer.setLayoutData(LayoutConstants.FILL());
+ leftContainer.setLayout(LayoutConstants.LAYOUT(1, false));
// leftContainer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_BLUE));
RootElement leftRoot = new RootElement(formFactory, leftContainer);
Composite rightContainer = formFactory.createComposite(control);
- rightContainer.setLayoutData(CdmFormFactory.FILL());
- rightContainer.setLayout(CdmFormFactory.LAYOUT(1, false));
+ rightContainer.setLayoutData(LayoutConstants.FILL());
+ rightContainer.setLayout(LayoutConstants.LAYOUT(1, false));
// rightContainer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
RootElement rightRoot = new RootElement(formFactory, rightContainer);
*/
private void createLeftControls(ICdmFormElement element){
- combo_sourceLanguage = (EmptyComboElement<Language>) formFactory.createTermComboElement(TermComboType.EMPTY, element, null, null, SWT.NULL);
+ combo_sourceLanguage = formFactory.createTermComboElement(Language.class, element, null, null, SWT.NULL);
+
combo_sourceLanguage.setTerms(getLanguages());
combo_sourceLanguage.addSelectionListener(new SelectionAdapter() {
* @param element
*/
private void createRightControls(ICdmFormElement element){
- combo_targetLanguage = (LanguageComboElement) formFactory.createTermComboElement(TermComboType.LANGUAGE, element, null, null, SWT.NULL);
+ combo_targetLanguage = formFactory.createTermComboElement(Language.class, element, null, null, SWT.NULL);
combo_targetLanguage.addSelectionListener(new SelectionAdapter() {
/* (non-Javadoc)
@Override
public void widgetSelected(SelectionEvent e) {
Language language = combo_targetLanguage.getSelection();
+
+ if (language == null){
+ return;
+ }
+
+ setPageComplete(true);
LanguageString languageString;
if(multilanguageText.containsKey(language)){
languageString = multilanguageText.get(language);
}else{
languageString = LanguageString.NewInstance("", language);
- multilanguageText.put(language, languageString);
}
text_target.setLanguageString(languageString);
text_target = formFactory.createLanguageStringWithLabelElement(element, null, null, TEXT_HEIGHT, SWT.NULL);
- Button button_translationService = formFactory.createButton(element.getLayoutComposite(), "Translate", SWT.PUSH);
- button_translationService.addSelectionListener(new SelectionAdapter() {
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
- @Override
- public void widgetSelected(SelectionEvent event) {
- ITranslationServiceWrapper service = new GoogleLanguageApiWrapper();
- String translatedText;
- try {
- String text = text_source.getText();
- Language sourceLanguage = text_source.getLanguageString().getLanguage();
- Language targetLanguage = combo_targetLanguage.getSelection();
-
- translatedText = service.translate(text, sourceLanguage, targetLanguage);
- text_target.setText(translatedText);
- } catch (LanguageNotSupportedException e) {
- StoreUtil.warningDialog("Language not supported", TranslationWizardPage.class, e.getMessage());
- } catch (Exception e){
- StoreUtil.warningDialog("Error translating text", TranslationWizardPage.class, e.getMessage());
- }
-
- }
- });
+ //
+ // The automated translation did rely on the Google Translate API. Unfortunately this service is not free anymore.
+ // See http://code.google.com/apis/language/translate/overview.html
+ //
+// Button button_translationService = formFactory.createButton(element.getLayoutComposite(), "Translate", SWT.PUSH);
+// button_translationService.addSelectionListener(new SelectionAdapter() {
+// /* (non-Javadoc)
+// * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+// */
+// @Override
+// public void widgetSelected(SelectionEvent event) {
+// ITranslationServiceWrapper service = new GoogleLanguageApiWrapper();
+// String translatedText;
+// try {
+// String text = text_source.getText();
+// Language sourceLanguage = text_source.getLanguageString().getLanguage();
+// Language targetLanguage = combo_targetLanguage.getSelection();
+//
+// if(targetLanguage == null){
+// StoreUtil.warningDialog("Please select a target language", TranslationWizardPage.class, "Please select a language from the combo box at the right.");
+// return;
+// }
+//
+// translatedText = service.translate(text, sourceLanguage, targetLanguage);
+// text_target.setText(translatedText);
+// } catch (LanguageNotSupportedException e) {
+// StoreUtil.warningDialog("Language not supported", TranslationWizardPage.class, "The chosen language is not supported by the translation service.");
+// } catch (Exception e){
+// StoreUtil.warningDialog("Error translating text", TranslationWizardPage.class, e.getMessage());
+// }
+//
+// }
+// });
}
private List<Language> getLanguages(){
Set<Language> languageSet = MultilanguageTextHelper.getLanguages(multilanguageText);
- List<Language> languageList = new ArrayList<Language>(languageSet);
+ List<Language> languageList = new ArrayList<Language>();
+ // protect against corrupt language sets
+ for (Language language : languageSet){
+ if (language != null){
+ languageList.add(language);
+ }else{
+ StoreUtil.warningDialog("Empty languages", getClass(), "The multilanguage string contains invalid data. Please contact the administrator of you datasource.");
+ }
+ }
return languageList;
}
public void dispose() {
super.dispose();
}
+
+ /**
+ * @return
+ *
+ */
+ public LanguageString getTargetLanguageString() {
+ return text_target.getLanguageString();
+ }
}
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchPart;
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.model.ContextListenerAdapter;
}
}
- private ConversationHolder conversation;
-
protected TableViewer viewer;
private IContextListener contextListener;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.RootElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.RootElement;
import eu.etaxonomy.taxeditor.view.detail.CdmSectionPart;
/**
body = scrolledForm.getBody();
- body.setLayout(CdmFormFactory.LAYOUT());
+ body.setLayout(LayoutConstants.LAYOUT());
rootElement = new RootElement(formFactory, body);
}
/**
* <p>addPart</p>
*
- * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+ * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
*/
protected void addPart(AbstractFormSection section){
CdmSectionPart sectionPart = new CdmSectionPart(section);
super.createPartControl(parent);
- // show viewer if there is an open editor
- // if(getEditor() != null){
- // showViewer(getEditor(), new StructuredSelection(getInitialInput()));
- // }
}
/**
public void setFocus() {
if(getConversationHolder() != null){
getConversationHolder().bind();
- }
+ }
getViewer().getControl().setFocus();
}
running = dataSource.testConnection();
} catch (Exception e) {
running = false;
+ for(MetaDataPropertyName metaDataPropertyName : MetaDataPropertyName.values()){
+ metaDataMap.put(metaDataPropertyName, DEFAULT_ENTRY);
+ }
}
try {
*/
public boolean isDataSourceCompatible(){
String version = metaDataMap.get(MetaDataPropertyName.DB_SCHEMA_VERSION);
- return version == null ? false : CdmMetaData.isDbSchemaVersionCompatible(version);
+ return version == null || version.equals(DEFAULT_ENTRY) ? false : CdmMetaData.isDbSchemaVersionCompatible(version);
}
/**
* @return a {@link eu.etaxonomy.taxeditor.view.datasource.CdmMetaDataAwareDataSourceContainer} object.
*/
protected CdmMetaDataAwareDataSourceContainer getSelectedDataSourceContainer(ExecutionEvent event){
- ISelection menuSelection = HandlerUtil.getActiveMenuSelection(event);
+ ISelection menuSelection = HandlerUtil.getCurrentSelection(event);
CdmMetaDataAwareDataSourceContainer container = (CdmMetaDataAwareDataSourceContainer) ((StructuredSelection) menuSelection).getFirstElement();
return container;
}
return null;
}
- if(!container.isRunning()){
+ try {
+ container.getDataSource().testConnection();
+ boolean confirmed = StoreUtil.confirmDialog("Confirm Datasource Connection", "Do you really want to connect to this datasource?\n\n"
+ + container.getDataSource().getName());
+
+ if(confirmed){
+ CdmDataSourceRepository.changeDataSource(container.getDataSource());
+ }
+ } catch (Exception e) {
StoreUtil.warningDialog("Chosen datasource is not available", this, "This could mean that either the database server is " +
"not running or the machine is not reachable.\n\n" +
"Please also make sure that you are connected to the network when trying to connect to a remote datasource.");
+ StoreUtil.warn(getClass(), e);
return null;
- }
-
- boolean confirmed = StoreUtil.confirmDialog("Confirm Datasource Connection", "Do you really want to connect to this datasource?\n\n"
- + container.getDataSource().getName());
-
- if(confirmed){
- CdmDataSourceRepository.changeDataSource(container.getDataSource());
- }
+ }
}
return null;
import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.jface.viewers.IStructuredSelection;
-import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
-import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.view.datasource.CdmMetaDataAwareDataSourceContainer;
/**
if(result == IStatus.OK){
CdmDataSourceViewPart view = (CdmDataSourceViewPart) StoreUtil.getView(CdmDataSourceViewPart.ID, false);
if(view != null){
+ container.getMetaDataFromDataSource();
view.getViewer().update(new CdmMetaDataAwareDataSourceContainer[]{container}, null);
+
}
}
import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.IDerivedUnitFacadeDetailSection;
* </p>
*
* @param section
- * a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
* @param <T>
* a T object.
}
formSection.setEntity((T) input);
-
+
return true;
}
// $Id$
/**
- * Copyright (C) 2007 EDIT
+ * Copyright (C) 2011 EDIT
* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
*
package eu.etaxonomy.taxeditor.view.detail;
+import java.util.Set;
+
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.swt.SWT;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException;
+import eu.etaxonomy.cdm.api.service.ITermService;
import eu.etaxonomy.cdm.model.agent.Person;
import eu.etaxonomy.cdm.model.agent.Team;
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;
import eu.etaxonomy.cdm.model.common.Group;
+import eu.etaxonomy.cdm.model.common.Marker;
+import eu.etaxonomy.cdm.model.common.MarkerType;
+import eu.etaxonomy.cdm.model.common.TermVocabulary;
import eu.etaxonomy.cdm.model.common.User;
+import eu.etaxonomy.cdm.model.description.CategoricalData;
import eu.etaxonomy.cdm.model.description.DescriptionBase;
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
import eu.etaxonomy.cdm.model.description.PolytomousKey;
import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
+
+import eu.etaxonomy.taxeditor.editor.UsageTermCollection;
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
-import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
-import eu.etaxonomy.taxeditor.ui.forms.RootElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.ui.element.RootElement;
import eu.etaxonomy.taxeditor.ui.section.agent.PersonDetailSection;
import eu.etaxonomy.taxeditor.ui.section.agent.TeamDetailSection;
import eu.etaxonomy.taxeditor.ui.section.agent.TeamOrPersonBaseDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.common.ReferencedEntityDetailSection;
import eu.etaxonomy.taxeditor.ui.section.description.DescribedSpecimenSection;
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionDetailSection;
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementDetailSection;
import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyNodeDetailSection;
import eu.etaxonomy.taxeditor.ui.section.key.ScopeRestrictionSection;
import eu.etaxonomy.taxeditor.ui.section.key.TaxonomicScopeSection;
-import eu.etaxonomy.taxeditor.ui.section.name.HybridDetailSection;
import eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailSection;
import eu.etaxonomy.taxeditor.ui.section.name.NomenclaturalStatusSection;
import eu.etaxonomy.taxeditor.ui.section.name.NonViralNameDetailSection;
import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailSection;
import eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessagesSection;
import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonBaseDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonRelationshipDetailSection;
import eu.etaxonomy.taxeditor.ui.section.user.GroupsByUserDetailSection;
import eu.etaxonomy.taxeditor.ui.section.user.UserDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.userecords.UseRecordDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailSection;
import eu.etaxonomy.taxeditor.view.AbstractCdmDataViewer;
import eu.etaxonomy.taxeditor.view.AbstractCdmViewPart;
*/
public class DetailsViewer extends AbstractCdmDataViewer {
- private enum VIEW_PART {
- TAXON, NAME, REFEERENCE, TEAM, PERSON, DESCRIPTION, DESCRIPTION_ELEMENT, EMPTY, IMAGE_GALLERY, MEDIA, TEAM_OR_PERSON_BASE, DERIVED_UNIT, FEATURE_DISTRIBUTION, POLYTOMOUS_KEY, POLYTOMOUS_KEY_NODE, USER, GROUP
- }
-
- private VIEW_PART currentViewPart;
-
private ISelection selection;
/**
@Override
protected void showParts() {
if (getInput() instanceof TaxonBase) {
- if (currentViewPart != VIEW_PART.TAXON) {
- createTaxonSections(rootElement);
- currentViewPart = VIEW_PART.TAXON;
-
- // preserve a pointer to the AbstractNameComposite
- // MultiPageTaxonEditor editor =
- // EditorUtil.getActiveMultiPageTaxonEditor();
- // if(editor != null){
- // TaxonNameEditor page = (TaxonNameEditor)
- // editor.getPage(Page.NAME);
- // for(AbstractGroupedContainer container :
- // page.getGroupedContainers()){
- // if(container.getData() == getInput()){
- // sourceContainer = container;
- // }
- // }
- // }
- }
+ createTaxonSections(rootElement);
+
} else if (getInput() instanceof NonViralName) {
- if (currentViewPart != VIEW_PART.NAME) {
- createNameSections(rootElement);
- currentViewPart = VIEW_PART.NAME;
- }
+ createNameSections(rootElement);
+
} else if (getInput() instanceof Reference) {
- if (currentViewPart != VIEW_PART.REFEERENCE) {
- createReferenceSections(rootElement);
- currentViewPart = VIEW_PART.REFEERENCE;
- }
+ createReferenceSections(rootElement);
+
} else if (getInput() instanceof Team) {
- if (currentViewPart != VIEW_PART.TEAM) {
- createTeamDetailSection(rootElement);
- currentViewPart = VIEW_PART.TEAM;
- }
+ createTeamDetailSection(rootElement);
+
} else if (getInput() instanceof Person) {
- if (currentViewPart != VIEW_PART.PERSON) {
- createPersonDetailSection(rootElement);
- currentViewPart = VIEW_PART.PERSON;
- }
+ createPersonDetailSection(rootElement);
+
} else if (getInput() instanceof TeamOrPersonBase) {
- // fallback
- if (currentViewPart != VIEW_PART.TEAM_OR_PERSON_BASE) {
- createTeamOrPersonBaseDetailSection(rootElement);
- currentViewPart = VIEW_PART.TEAM_OR_PERSON_BASE;
- }
+ createTeamOrPersonBaseDetailSection(rootElement);
+
} else if (getInput() instanceof DescriptionBase) {
- if (((DescriptionBase) getInput()).isImageGallery()) {
- if (currentViewPart != VIEW_PART.IMAGE_GALLERY) {
- createImageGallerySection(rootElement);
- currentViewPart = VIEW_PART.IMAGE_GALLERY;
+ Set<Marker> descriptionMarkers = ((DescriptionBase) getInput()).getMarkers();
+ MarkerType useMarkertype = (MarkerType) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseMarkerType);
+ Boolean isUseDescription = false;
+ for (Marker marker : descriptionMarkers) {
+ if (marker.getMarkerType().equals(useMarkertype)) {
+ isUseDescription = true;
}
+ }
+ if (((DescriptionBase) getInput()).isImageGallery()) {
+ createImageGallerySection(rootElement);
+
+ } else if (isUseDescription) {
+ createUseDescriptionSection(rootElement);
} else {
- if (currentViewPart != VIEW_PART.DESCRIPTION) {
- createDescriptionSection(rootElement);
- currentViewPart = VIEW_PART.DESCRIPTION;
- }
+ createDescriptionSection(rootElement);
+
}
} else if (getInput() instanceof DescriptionElementBase) {
- if (currentViewPart != VIEW_PART.DESCRIPTION_ELEMENT) {
+ Set<Marker> descriptionMarkers = ((DescriptionElementBase) getInput()).getInDescription().getMarkers();
+ MarkerType useMarkertype = (MarkerType) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseMarkerType);
+ Boolean isUseDescription = false;
+ for (Marker marker : descriptionMarkers) {
+ if (marker.getMarkerType().equals(useMarkertype)) {
+ isUseDescription = true;
+ }
+ }
+
+ if (isUseDescription == true && getInput() instanceof CategoricalData ) {
+ createUseRecordSection(rootElement);
+ }
+ else {
createDescriptionElementSection(rootElement);
- currentViewPart = VIEW_PART.DESCRIPTION_ELEMENT;
}
+
} else if (getInput() instanceof Media) {
- if (currentViewPart != VIEW_PART.MEDIA) {
- createMediaElementSection(rootElement);
- currentViewPart = VIEW_PART.MEDIA;
- }
+ createMediaElementSection(rootElement);
+
} else if (getInput() instanceof DerivedUnitFacade) {
- if (currentViewPart != VIEW_PART.DERIVED_UNIT) {
- createDerivedUnitBaseElementSection(rootElement);
- currentViewPart = VIEW_PART.DERIVED_UNIT;
- }
+ createDerivedUnitBaseElementSection(rootElement);
+
} else if (getInput() instanceof FeatureNodeContainer) {
- if (currentViewPart != VIEW_PART.FEATURE_DISTRIBUTION) {
- createFeatureDistributionSection(rootElement);
- currentViewPart = VIEW_PART.FEATURE_DISTRIBUTION;
- }
+ createFeatureDistributionSection(rootElement);
+
} else if (getInput() instanceof PolytomousKey) {
- if (currentViewPart != VIEW_PART.POLYTOMOUS_KEY) {
- createPolytomousKeySection(rootElement);
- currentViewPart = VIEW_PART.POLYTOMOUS_KEY;
- }
+ createPolytomousKeySection(rootElement);
+
} else if ((getInput() instanceof PolytomousKeyNode)
|| (getInput() instanceof PolytomousKeyRelationship)) {
- if (currentViewPart != VIEW_PART.POLYTOMOUS_KEY_NODE) {
- createPolytomousKeyNodeSection(rootElement);
- currentViewPart = VIEW_PART.POLYTOMOUS_KEY_NODE;
- }
+ createPolytomousKeyNodeSection(rootElement);
+
} else if (getInput() instanceof User) {
- if (currentViewPart != VIEW_PART.USER) {
- createUserSection(rootElement);
- currentViewPart = VIEW_PART.USER;
- }
+ createUserSection(rootElement);
+
} else if (getInput() instanceof Group) {
- if (currentViewPart != VIEW_PART.GROUP) {
- createGroupSection(rootElement);
- currentViewPart = VIEW_PART.GROUP;
- }
+ createGroupSection(rootElement);
+
+ } else if (getInput() instanceof TaxonRelationship) {
+ createTaxonRelationshipSection(rootElement);
+
+ } else if (getInput() instanceof TermVocabulary) {
+ createTermVocabularySection(rootElement);
+
+ } else if (getInput() instanceof DefinedTermBase) {
+ createDefinedTermSection(rootElement);
} else {
destroySections();
- currentViewPart = VIEW_PART.EMPTY;
}
-
layout();
}
+
/**
* @param rootElement
*/
fireSelectionChanged(selectionChangedEvent);
}
+ /**
+ * createTaxonSections(RootElement parent)
+ * @param parent
+ */
private void createTaxonSections(RootElement parent) {
destroySections();
addPart(parsingMessagesSection);
}
+ /**
+ * createNameSections
+ * @param parent
+ */
private void createNameSections(RootElement parent) {
destroySections();
NonViralNameDetailSection nonViralNameSection = (NonViralNameDetailSection) formFactory
addPart(nameRelationshipSection);
}
+ /**
+ * createReferenceSections
+ * @param parent
+ */
private void createReferenceSections(RootElement parent) {
destroySections();
addPart(referenceDetailSection);
}
+ /**
+ * createTeamOrPersonBaseDetailSection
+ * @param parent
+ */
private void createTeamOrPersonBaseDetailSection(RootElement parent) {
destroySections();
TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection = (TeamOrPersonBaseDetailSection) formFactory
addPart(teamOrPersonBaseDetailSection);
}
+ /**
+ * createTeamDetailSection
+ * @param parent
+ */
private void createTeamDetailSection(RootElement parent) {
destroySections();
TeamDetailSection teamDetailSection = (TeamDetailSection) formFactory
addPart(teamDetailSection);
}
-
+
+ /**
+ * createPersonDetailSection
+ * @param parent
+ */
private void createPersonDetailSection(RootElement parent) {
destroySections();
PersonDetailSection personDetailSection = (PersonDetailSection) formFactory
addPart(personDetailSection);
}
+ /**
+ * createDescriptionElementSection
+ * @param parent
+ */
private void createDescriptionElementSection(RootElement parent) {
destroySections();
addPart(descriptionElementMediaSection);
}
+ /**
+ * createDescriptionSection
+ * @param parent
+ */
private void createDescriptionSection(RootElement parent) {
destroySections();
DescriptionDetailSection descriptionDetailSection = (DescriptionDetailSection) formFactory
addPart(descriptionSourceSection);
addPart(scopeSection);
}
+
+ /**
+ * Creates the use Description section
+ * @param parent
+ */
+ private void createUseDescriptionSection(RootElement parent) {
+ destroySections();
+ DescriptionDetailSection descriptionDetailSection = (DescriptionDetailSection) formFactory
+ .createCdmDetailSection(DetailType.DESCRIPTION,
+ getConversationHolder(), parent, this, Section.TWISTIE
+ | Section.EXPANDED);
+
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+ DescriptionSourceSection descriptionSourceSection = (DescriptionSourceSection) formFactory
+ .createEntityDetailSection(EntityDetailType.DESCRIPTIONSOURCE,
+ getConversationHolder(), parent, Section.TWISTIE
+ | Section.EXPANDED);
+
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+ addPart(descriptionDetailSection);
+ addPart(descriptionSourceSection);
+
+ }
+
/**
* @param rootElement
addPart(descriptionDetailSection);
}
+
+ /**
+ * createMediaElementSection
+ * @param parent
+ */
private void createMediaElementSection(RootElement parent) {
destroySections();
addPart(mediaDetailSection);
}
+ /**
+ * createDerivedUnitBaseElementSection
+ * @param parent
+ */
private void createDerivedUnitBaseElementSection(RootElement parent) {
destroySections();
DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = (DerivedUnitBaseDetailSection) formFactory
.createCdmDetailSection(DetailType.DERIVED_UNIT,
getConversationHolder(), parent, this, Section.TWISTIE);
-
- Object getBoolean;
+
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
+
DeterminationDetailSection determinationDetailSection = (DeterminationDetailSection) formFactory
- .createCdmDetailSection(DetailType.DETERMINATION,
+ .createCdmDetailSection(DetailType.DETERMINATION,
getConversationHolder(), parent, this, Section.TWISTIE);
-
addPart(generalDetailSection);
addPart(gatheringEventDetailSection);
addPart(taxonomicScopeSection);
}
+ /**
+ * createPolytomousKeyNodeSection
+ * @param parent
+ */
private void createPolytomousKeyNodeSection(RootElement parent) {
destroySections();
addPart(polytomousKeyNodeDetailSection);
}
+
+ /**
+ * create the UseRecordSection
+ * @param parent
+ */
+ private void createUseRecordSection(RootElement parent) {
+ destroySections();
+
+ UseRecordDetailSection descriptionUseRecordSection = (UseRecordDetailSection) formFactory
+ .createCdmDetailSection(DetailType.USE_RECORD,
+ getConversationHolder(), parent, this, Section.TWISTIE
+ | Section.EXPANDED);
+
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+ addPart(descriptionUseRecordSection);
+
+
+ }
+ /**
+ * createUserSection
+ * @param parent
+ */
private void createUserSection(RootElement parent) {
destroySections();
addPart(userDetailSection);
addPart(groupByUserDetailSection);
}
+
+ /**
+ * createTaxonRelationshipSection
+ * @param parent
+ */
+ private void createTaxonRelationshipSection(RootElement parent) {
+ destroySections();
+
+ TaxonRelationshipDetailSection taxonRelationshipDetailSection = (TaxonRelationshipDetailSection) formFactory
+ .createCdmDetailSection(DetailType.TAXON_RELATIONSHIP,
+ getConversationHolder(), parent, this, Section.TWISTIE
+ | Section.EXPANDED);
+
+ ReferencedEntityDetailSection referencedEntityBaseDetailSection = (ReferencedEntityDetailSection) formFactory
+ .createCdmDetailSection(DetailType.REFERENCED_ENTITY,
+ getConversationHolder(), parent, this, Section.TWISTIE
+ | Section.EXPANDED);
+ addPart(taxonRelationshipDetailSection);
+ addPart(referencedEntityBaseDetailSection);
+ }
+
+ /**
+ * @param rootElement
+ */
+ private void createTermVocabularySection(RootElement parent) {
+ destroySections();
+
+ TermVocabularyDetailSection termVocabularyDetailSection = (TermVocabularyDetailSection) formFactory
+ .createCdmDetailSection(DetailType.TERM_VOCABULARY,
+ getConversationHolder(), parent, this, Section.TWISTIE
+ | Section.EXPANDED);
+ addPart(termVocabularyDetailSection);
+ }
+
+ /**
+ * createDefinedTermSection
+ * @param parent
+ */
+ private void createDefinedTermSection(RootElement parent) {
+ destroySections();
+
+ AbstractFormSection definedTermDetailSection = formFactory
+ .createDefinedTermDetailSection(getInput().getClass(),
+ getConversationHolder(), parent, this, Section.TWISTIE
+ | Section.EXPANDED);
+ addPart(definedTermDetailSection);
+ }
}
import org.eclipse.ui.forms.widgets.Section;
import eu.etaxonomy.cdm.model.common.AnnotatableEntity;
+import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
import eu.etaxonomy.cdm.model.common.VersionableEntity;
import eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity;
import eu.etaxonomy.taxeditor.model.IElementHasDetails;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.RootElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.RootElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
import eu.etaxonomy.taxeditor.ui.section.media.MediaSection;
import eu.etaxonomy.taxeditor.ui.section.supplemental.AnnotationSection;
+import eu.etaxonomy.taxeditor.ui.section.supplemental.CdmBaseSection;
import eu.etaxonomy.taxeditor.ui.section.supplemental.CreditSection;
import eu.etaxonomy.taxeditor.ui.section.supplemental.ExtensionSection;
import eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection;
*/
public class SupplementalDataViewer extends AbstractCdmDataViewer implements ISelectionChangedListener {
- private enum VIEW_PART{
- VersionableEntity,
- AnnotatableEntity,
- IdentifiableEntity,
- IdentifiableMediaEntity,
- EMPTY;
- }
-
- private VIEW_PART currentViewPart;
+ private boolean showDebug;
/**
@Override
protected void showParts() {
+ showDebug = PreferencesUtil.getPreferenceStore().getBoolean(PreferencesUtil.SHOW_DEBUG_INFORMATION);
+
Object input;
if(getInput() instanceof IElementHasDetails){
input = getInput();
}
- if(input instanceof IdentifiableMediaEntity){
- if(currentViewPart != VIEW_PART.IdentifiableMediaEntity){
- currentViewPart = VIEW_PART.IdentifiableMediaEntity;
- createIdentifiableMediaSections(rootElement);
- }
- }else if(input instanceof IdentifiableEntity){
- if(currentViewPart != VIEW_PART.IdentifiableEntity){
- currentViewPart = VIEW_PART.IdentifiableEntity;
- createIdentifiableSections(rootElement);
- }
- }else if(input instanceof AnnotatableEntity){
- if(currentViewPart != VIEW_PART.AnnotatableEntity){
- currentViewPart = VIEW_PART.AnnotatableEntity;
+ destroySections();
+ //1. Headline
+ createHeadlineSection(rootElement);
+ //2. Annotatable entitiy
+ if(input instanceof AnnotatableEntity){
createAnnotationSections(rootElement);
- }
- }else if(input instanceof VersionableEntity){
- if(currentViewPart != VIEW_PART.VersionableEntity){
- currentViewPart = VIEW_PART.VersionableEntity;
- createHeadlineSection(rootElement);
- }
- }else{
- currentViewPart = VIEW_PART.EMPTY;
+ }
+ //3. Identifiable entity
+ if(input instanceof IdentifiableEntity){
+ createIdentifiableSections(rootElement);
+ }
+ //4. Identifiable media entity
+ if(input instanceof IdentifiableMediaEntity){
+ createIdentifiableMediaSections(rootElement);
+ }
+ //5. Versionable
+ if(input instanceof VersionableEntity){
+ createVersionSection(rootElement);
+ }
+ //6. CdmBase
+ if(showDebug){
+ createCdmBaseSection(rootElement);
}
layout();
}
-
+
+
+
private void createHeadlineSection(RootElement parent){
- destroySections();
HeadlineSection headlineSection = formFactory.createHeadlineSection(parent);
addPart(headlineSection);
-
- if(currentViewPart == VIEW_PART.VersionableEntity){
- createVersionSection(parent);
- }
}
private void createAnnotationSections(RootElement parent){
- createHeadlineSection(parent);
AnnotationSection annotationSection = (AnnotationSection)
formFactory.createEntityDetailSection(EntityDetailType.ANNOTATION, getConversationHolder(), parent, Section.TWISTIE);
addPart(annotationSection);
addPart(markerSection);
-
- if(currentViewPart == VIEW_PART.AnnotatableEntity){
- createVersionSection(parent);
- }
}
- private void createIdentifiableSections(RootElement parent){
- createAnnotationSections(parent);
+ private void createIdentifiableSections(RootElement parent){
CreditSection creditSection = (CreditSection)
formFactory.createEntityDetailSection(EntityDetailType.CREDIT, getConversationHolder(), parent, Section.TWISTIE);
addPart(rightsSection);
addPart(sourceSection);
- if(currentViewPart == VIEW_PART.IdentifiableEntity){
- createVersionSection(parent);
- }
}
private void createIdentifiableMediaSections(RootElement parent){
- createIdentifiableSections(parent);
MediaSection mediaSection = (MediaSection)
formFactory.createEntityDetailSection(EntityDetailType.MEDIA, getConversationHolder(), parent, Section.TWISTIE);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(mediaSection);
-
- if(currentViewPart == VIEW_PART.IdentifiableMediaEntity){
- createVersionSection(parent);
- }
}
private void createVersionSection(RootElement parent){
addPart(versionSection);
}
+ /**
+ * @param rootElement
+ */
+ private void createCdmBaseSection(RootElement parent) {
+
+ CdmBaseSection cdmBaseSection = formFactory.createCdmBaseSection(parent, Section.NO_TITLE | Section.EXPANDED);
+ addPart(cdmBaseSection);
+ }
+
/*
* (non-Javadoc)
* @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
if(event.getSource() instanceof DetailsViewer){
if(event.getSelection() == CdmFormFactory.EMPTY_SELECTION){
setInput(null);
- currentViewPart = VIEW_PART.EMPTY;
return;
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="src" path="src/main/resources"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
-#Thu Mar 31 16:21:36 CEST 2011\r
-eclipse.preferences.version=1\r
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled\r
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5\r
-org.eclipse.jdt.core.compiler.compliance=1.5\r
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error\r
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error\r
-org.eclipse.jdt.core.compiler.source=1.5\r
+#Wed Oct 05 13:31:15 CEST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Bundle-ManifestVersion: 2
Bundle-Name: eu.etaxonomy.taxeditor.test
Bundle-SymbolicName: eu.etaxonomy.taxeditor.test;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 3.0.10.qualifier
Bundle-ActivationPolicy: lazy
Bundle-Vendor: EDIT
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.apache.log4j;bundle-version="1.2.13",
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.apache.log4j,
+ org.eclipse.ui;bundle-version="3.6.2",
org.eclipse.core.runtime;bundle-version="3.6.0",
- org.eclipse.swt;bundle-version="3.6.2",
- org.eclipse.swtbot.eclipse.core;bundle-version="2.0.4",
- org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.4",
- org.eclipse.swtbot.junit4_x;bundle-version="2.0.4",
- org.junit;bundle-version="4.8.1",
- org.eclipse.ui.ide;bundle-version="3.6.2",
- org.hamcrest;bundle-version="1.1.0"
+ org.eclipse.swtbot.eclipse.core;bundle-version="2.0.5",
+ org.eclipse.swtbot.eclipse.finder,
+ org.eclipse.swtbot.junit4_x,
+ org.hamcrest,
+ org.eclipse.ui.ide,
+ org.junit4,
+ eu.etaxonomy.taxeditor.application;bundle-version="3.0.6",
+ eu.etaxonomy.taxeditor.bulkeditor;bundle-version="3.0.6",
+ eu.etaxonomy.taxeditor.cdmlib;bundle-version="3.0.6",
+ eu.etaxonomy.taxeditor.editor;bundle-version="3.0.6",
+ eu.etaxonomy.taxeditor.help;bundle-version="3.0.6",
+ eu.etaxonomy.taxeditor.navigation;bundle-version="3.0.6",
+ eu.etaxonomy.taxeditor.printpublisher;bundle-version="3.0.6",
+ eu.etaxonomy.taxeditor.store;bundle-version="3.0.6"
Eclipse-RegisterBuddy: org.apache.log4j
-source.. = src_/
-output.. = bin/
+source.. = src/test/java/
bin.includes = META-INF/,\
.
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
-<launchConfiguration type="org.eclipse.swtbot.eclipse.ui.launcher.JunitLaunchConfig">\r
-<booleanAttribute key="append.args" value="true"/>\r
-<booleanAttribute key="askclear" value="false"/>\r
-<booleanAttribute key="automaticAdd" value="true"/>\r
-<booleanAttribute key="automaticValidate" value="false"/>\r
-<stringAttribute key="bootstrap" value=""/>\r
-<stringAttribute key="checked" value="[NONE]"/>\r
-<booleanAttribute key="clearConfig" value="true"/>\r
-<booleanAttribute key="clearws" value="true"/>\r
-<booleanAttribute key="clearwslog" value="true"/>\r
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>\r
-<booleanAttribute key="default" value="true"/>\r
-<booleanAttribute key="includeOptional" value="true"/>\r
-<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>\r
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">\r
-<listEntry value="/eu.etaxonomy.taxeditor.test/src/test/java"/>\r
-</listAttribute>\r
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">\r
-<listEntry value="2"/>\r
-</listAttribute>\r
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=eu.etaxonomy.taxeditor.test/src\/test\/java"/>\r
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>\r
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>\r
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>\r
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>\r
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>\r
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="eu.etaxonomy.taxeditor.test"/>\r
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>\r
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms256M -Xmx768M -XX:MaxPermSize=512M"/>\r
-<stringAttribute key="pde.version" value="3.3"/>\r
-<stringAttribute key="product" value="eu.etaxonomy.taxeditor.application.product"/>\r
-<booleanAttribute key="show_selected_only" value="false"/>\r
-<booleanAttribute key="tracing" value="false"/>\r
-<booleanAttribute key="useCustomFeatures" value="false"/>\r
-<booleanAttribute key="useDefaultConfig" value="true"/>\r
-<booleanAttribute key="useDefaultConfigArea" value="false"/>\r
-<booleanAttribute key="useProduct" value="true"/>\r
-</launchConfiguration>\r
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.swtbot.eclipse.ui.launcher.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="true"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/eu.etaxonomy.taxeditor.test/src/test/java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="2"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=eu.etaxonomy.taxeditor.test/src\/test\/java"/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="eu.etaxonomy.taxeditor.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms256M -Xmx768M -XX:MaxPermSize=512M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<project>\r
+\r
+ <parent>\r
+ <groupId>eu.etaxonomy</groupId>\r
+ <artifactId>taxeditor-parent</artifactId>\r
+ <version>3.0.12-SNAPSHOT</version>\r
+ </parent>\r
+ <modelVersion>4.0.0</modelVersion>\r
+ <artifactId>eu.etaxonomy.taxeditor.test</artifactId>\r
+ <packaging>eclipse-test-plugin</packaging>\r
+ <name>UI Test Bundle</name>\r
+ <description>Holds all UI tests for the Taxonomic Editor</description>\r
+ <!-- <repositories> -->\r
+ <!-- <repository> -->\r
+ <!-- <id>ganymede</id> -->\r
+ <!-- <layout>p2</layout> -->\r
+ <!-- <url>http://download.eclipse.org/releases/galileo</url> -->\r
+ <!-- </repository> -->\r
+ <!-- <repository> -->\r
+ <!-- <id>swtbot</id> -->\r
+ <!-- <layout>p2</layout> -->\r
+ <!-- <url>http://download.eclipse.org/technology/swtbot/galileo/dev-build/update-site</url> -->\r
+ <!-- </repository> -->\r
+ <!-- </repositories> -->\r
+\r
+ <build>\r
+ <plugins>\r
+ <plugin>\r
+ <groupId>org.eclipse.tycho</groupId>\r
+ <artifactId>tycho-maven-plugin</artifactId>\r
+ <version>${tycho.version}</version>\r
+ <extensions>true</extensions>\r
+ </plugin>\r
+ <plugin>\r
+ <groupId>org.eclipse.tycho</groupId>\r
+ <artifactId>target-platform-configuration</artifactId>\r
+ <version>${tycho.version}</version>\r
+ <configuration>\r
+ <resolver>p2</resolver>\r
+ </configuration>\r
+ </plugin>\r
+ <plugin>\r
+ <groupId>org.eclipse.tycho</groupId>\r
+ <artifactId>tycho-surefire-plugin</artifactId>\r
+ <version>${tycho.version}</version>\r
+ <configuration>\r
+ <useUIHarness>true</useUIHarness>\r
+ <useUIThread>false</useUIThread>\r
+ <includes>\r
+ <include>**/*Test.java</include>\r
+ </includes>\r
+ <product>eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product</product>\r
+ <application>eu.etaxonomy.taxeditor.application.application</application>\r
+ <!-- <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>eu.etaxonomy.taxeditor.product</artifactId>
+ <version>0.0.0</version>
+ </dependency> -->\r
+ </configuration>\r
+ </plugin>\r
+ <!-- <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>maven-osgi-test-plugin</artifactId>
+ <version>${tycho.version}</version>
+ <configuration>
+ <useUIHarness>true</useUIHarness>
+ <useUIThread>false</useUIThread>
+ <product>eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product</product>
+ <application>org.eclipse.ui.ide.workbench</application>
+ <dependencies>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
+ </configuration>
+ </plugin> -->\r
+ </plugins>\r
+ </build>\r
+</project>
\ No newline at end of file
-package eu.etaxonomy.taxeditor.test;\r
+package eu.etaxonomy.taxeditor.application.menu.general;\r
\r
import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
import org.junit.Test;\r
\r
+import eu.etaxonomy.taxeditor.test.AbstractEditorTest;\r
+\r
/**\r
- * Open all new menus\r
+ * Open all "General -> New" menus\r
* \r
* @author n.hoffmann\r
*\r
@Test\r
public void canOpenNewWizardForTaxon(){\r
openNewWizardFor("Taxon");\r
- cancel();\r
+ utils.cancel();\r
}\r
\r
\r
@Test\r
public void canOpenNewWizardForReference(){\r
openNewWizardFor("Reference");\r
- cancel();\r
+ utils.cancel();\r
}\r
\r
\r
@Test\r
public void canOpenNewWizardForName(){\r
openNewWizardFor("Name");\r
- cancel();\r
+ utils.cancel();\r
}\r
\r
\r
@Test\r
public void canOpenNewWizardForTeam(){\r
openNewWizardFor("Team");\r
- cancel();\r
+ utils.cancel();\r
}\r
\r
\r
@Test\r
public void canOpenNewWizardForPerson(){\r
openNewWizardFor("Person");\r
- cancel();\r
+ utils.cancel();\r
}\r
\r
@Test\r
public void canOpenNewWizardForSpecimen(){\r
openNewWizardFor("Specimen");\r
- cancel();\r
+ utils.cancel();\r
}\r
\r
\r
@Test\r
public void canOpenNewWizardForClassification(){\r
openNewWizardFor("Classification");\r
- cancel();\r
+ utils.cancel();\r
}\r
\r
private void openNewWizardFor(String entity) {\r
/**\r
* \r
*/\r
-package eu.etaxonomy.taxeditor.test;\r
+package eu.etaxonomy.taxeditor.navigation.navigator.contextmenu;\r
\r
import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;\r
import org.junit.Before;\r
import org.junit.Test;\r
\r
+import eu.etaxonomy.taxeditor.test.AbstractEditorTest;\r
+import eu.etaxonomy.taxeditor.test.ContextMenuHelper;\r
+\r
/**\r
* @author n.hoffmann\r
*\r
@Before\r
public void setup() {\r
super.setup();\r
- navigatorView = view("Taxon Navigator");\r
- tree = tree(navigatorView.getWidget());\r
+ navigatorView = utils.view("Taxon Navigator");\r
+ tree = utils.tree(navigatorView.getWidget());\r
}\r
\r
@Test\r
tree.select(0);\r
ContextMenuHelper.clickContextMenu(tree, "Delete");\r
bot.waitUntil(Conditions.shellIsActive("Confirm Deletion"));\r
- bot.button("OK").click();\r
+ utils.ok();\r
}\r
\r
@Test\r
ContextMenuHelper.clickContextMenu(tree, "New", "Classification");\r
bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
bot.textWithLabel("Label").setText("Classification");\r
- bot.button("Finish").click();\r
+ utils.finish();\r
}\r
}\r
--- /dev/null
+/**\r
+ * \r
+ */\r
+package eu.etaxonomy.taxeditor.newWizard;\r
+\r
+import junit.framework.Assert;\r
+\r
+import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;\r
+import org.junit.Test;\r
+\r
+import eu.etaxonomy.taxeditor.test.AbstractEditorTest;\r
+\r
+/**\r
+ * @author n.hoffmann\r
+ *\r
+ */\r
+public class NewTaxonWizardTest extends AbstractEditorTest {\r
+\r
+ @Override\r
+ public void setup() {\r
+ super.setup();\r
+ bot.menu("General").menu("New").menu("Taxon").click();\r
+ bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
+ }\r
+ \r
+ @Test\r
+ public void unalteredDialogCanNotBefinished() {\r
+ boolean finishIsEnabled = bot.button("Finish").isEnabled();\r
+ Assert.assertEquals(false, finishIsEnabled);\r
+ utils.cancel();\r
+ }\r
+ \r
+ @Test\r
+ public void canCreateNewTaxonMinimal(){\r
+ utils.openFilteredSelection(0, "Choose a Classification");\r
+\r
+ SWTBotButton okButton = bot.button(1);\r
+ bot.text(0).setText("?");\r
+ bot.waitUntil(Conditions.widgetIsEnabled(okButton));\r
+ utils.ok();\r
+ bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
+ String newTaxonName = "Test taxon Smartbert";\r
+ bot.textWithLabel("New Taxon").setText(newTaxonName);\r
+ bot.waitUntil(Conditions.widgetIsEnabled(bot.button("Finish")));\r
+ utils.finish();\r
+ \r
+// bot.waitUntil(Conditions.waitForEditor(WithPartId.withPartId(MultiPageTaxonEditor.ID)));\r
+// Assert.assertEquals(newTaxonName, bot.activeEditor().getTitle());\r
+ }\r
+ \r
+ \r
+\r
+ \r
+}\r
*/\r
package eu.etaxonomy.taxeditor.test;\r
\r
-import java.util.List;\r
-\r
-import org.eclipse.swt.widgets.Tree;\r
-import org.eclipse.swt.widgets.Widget;\r
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;\r
-import org.eclipse.swtbot.eclipse.finder.matchers.WidgetMatcherFactory;\r
import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;\r
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;\r
-import org.eclipse.swtbot.swt.finder.finders.ChildrenControlFinder;\r
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;\r
import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;\r
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;\r
import org.junit.Before;\r
import org.junit.runner.RunWith;\r
\r
\r
protected SWTWorkbenchBot bot;\r
\r
+ public SwtBotUtils utils;\r
+ \r
@Before\r
public void setup() {\r
bot = new SWTWorkbenchBot();\r
SWTBotPreferences.TIMEOUT = 300000;\r
+ utils = new SwtBotUtils(bot);\r
+ \r
+ // unfortunately swt bot is not available at the time this is set up\r
+// if("Choose a nomenclatural code".equals(getActiveShellHeadline())){\r
+// ok();\r
+// bot.waitUntil(Conditions.shellIsActive("Nomenclatural code set"));\r
+// ok();\r
+// }\r
\r
- String activeText = bot.activeShell().getText();\r
- if(activeText.equals("Connecting to datasource: cdm")){\r
- bot.waitUntil(Conditions.shellIsActive("Login"));\r
- bot.button("Cancel").click();\r
+ if("Connecting to datasource: cdm".equals(utils.getActiveShellHeadline())){\r
+ performLogin();\r
}\r
}\r
-\r
- \r
- /**\r
- * @return\r
- * @throws WidgetNotFoundException\r
- */\r
- public SWTBotTree tree(Widget widget) throws WidgetNotFoundException {\r
- List<Tree> controls = new ChildrenControlFinder(widget).findControls(WidgetMatcherFactory.widgetOfType(Tree.class));\r
- if (controls.isEmpty())\r
- throw new WidgetNotFoundException("Could not find any tree");\r
- SWTBotTree tree = new SWTBotTree((Tree) controls.get(0));\r
- return tree;\r
- }\r
-\r
- /**\r
- * @return\r
- * @throws WidgetNotFoundException\r
- */\r
- public SWTBotView view(String title) throws WidgetNotFoundException {\r
- return bot.viewByTitle(title);\r
- }\r
\r
- public void cancel() {\r
- clickButton("Cancel");\r
+ private void performLogin(){\r
+ bot.waitUntil(Conditions.shellIsActive("Login"));\r
+ bot.textWithLabel("Username").setText("admin");\r
+ bot.textWithLabel("Password").setText("00000");\r
+ bot.button("OK").click();\r
}\r
\r
- public void ok() {\r
- clickButton("OK");\r
- }\r
+\r
\r
- public void clickButton(String label) {\r
- bot.button(label).click();\r
- }\r
+\r
}\r
* Clicks the context menu matching the text.\r
*\r
* @param text\r
- * the text on the context menu.\r
+ * the text on the context menu.\r
* @throws WidgetNotFoundException\r
- * if the widget is not found.\r
+ * if the widget is not found.\r
*/\r
public static void clickContextMenu(final AbstractSWTBot<?> bot,\r
final String... texts) {\r
+++ /dev/null
-package eu.etaxonomy.taxeditor.test;\r
-\r
-import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
-import org.junit.Test;\r
-\r
-\r
-public class LoginTest extends AbstractEditorTest{\r
- \r
- @Test\r
- public void canLoginAsAdmin() throws Exception {\r
- bot.menu("General").menu("Login").click();\r
- bot.waitUntil(Conditions.shellIsActive("Login"));\r
- bot.textWithLabel("Username").setText("admin");\r
- bot.textWithLabel("Password").setText("0000");\r
- bot.button("Cancel").click();\r
- }\r
- \r
-}\r
+++ /dev/null
-/**\r
- * \r
- */\r
-package eu.etaxonomy.taxeditor.test;\r
-\r
-import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
-import org.junit.After;\r
-import org.junit.Ignore;\r
-import org.junit.Test;\r
-\r
-/**\r
- * @author n.hoffmann\r
- *\r
- */\r
-public class NewTaxonWizardTest extends AbstractEditorTest {\r
-\r
- @Override\r
- public void setup() {\r
- super.setup();\r
- bot.menu("General").menu("New").menu("Taxon").click();\r
- bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
- }\r
- \r
- @Ignore\r
- @Test\r
- public void canSelectClassification() {\r
- bot.button("Browse existing").click();\r
- bot.waitUntil(Conditions.shellIsActive("Choose a Classification"));\r
- }\r
- \r
- @After\r
- public void tearDown() {\r
- clickButton("Finish");\r
- }\r
-}\r
--- /dev/null
+package eu.etaxonomy.taxeditor.test;\r
+\r
+import java.util.List;\r
+\r
+import org.eclipse.osgi.internal.loader.FilteredSourcePackage;\r
+import org.eclipse.swt.widgets.Tree;\r
+import org.eclipse.swt.widgets.Widget;\r
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;\r
+import org.eclipse.swtbot.eclipse.finder.matchers.WidgetMatcherFactory;\r
+import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;\r
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;\r
+import org.eclipse.swtbot.swt.finder.finders.ChildrenControlFinder;\r
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;\r
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;\r
+\r
+public class SwtBotUtils {\r
+ \r
+ private SWTWorkbenchBot bot;\r
+ \r
+ public SwtBotUtils(SWTWorkbenchBot bot) {\r
+ this.bot = bot;\r
+ }\r
+ \r
+ /**\r
+ * @return\r
+ * @throws WidgetNotFoundException\r
+ */\r
+ public SWTBotTree tree(Widget widget) throws WidgetNotFoundException {\r
+ List<Tree> controls = new ChildrenControlFinder(widget).findControls(WidgetMatcherFactory.widgetOfType(Tree.class));\r
+ if (controls.isEmpty())\r
+ throw new WidgetNotFoundException("Could not find any tree");\r
+ SWTBotTree tree = new SWTBotTree((Tree) controls.get(0));\r
+ return tree;\r
+ }\r
+ \r
+ /**\r
+ * \r
+ * @param index the index of the SelectionElement\r
+ * @param dialogName the title of the expected dialog\r
+ */\r
+ public void openFilteredSelection(int index, String dialogName){\r
+ SWTBotButton existing = bot.buttonWithTooltip("Browse existing", index);\r
+ existing.click();\r
+ bot.waitUntil(Conditions.shellIsActive(dialogName));\r
+ }\r
+\r
+ /**\r
+ * @return\r
+ * @throws WidgetNotFoundException\r
+ */\r
+ public SWTBotView view(String title) throws WidgetNotFoundException {\r
+ return getBot().viewByTitle(title);\r
+ }\r
+ \r
+ public void cancel() {\r
+ clickButton("Cancel");\r
+ }\r
+ \r
+ public void ok() {\r
+ clickButton("OK");\r
+ }\r
+ \r
+ public void finish() {\r
+ clickButton("Finish");\r
+ }\r
+ \r
+ public void clickButton(String label) {\r
+ getBot().button(label).click();\r
+ }\r
+ \r
+ public String getActiveShellHeadline(){\r
+ return getBot().activeShell().getText();\r
+ }\r
+\r
+ public SWTWorkbenchBot getBot() {\r
+ return bot;\r
+ }\r
+\r
+ public void setBot(SWTWorkbenchBot bot) {\r
+ this.bot = bot;\r
+ }\r
+}\r
--- /dev/null
+package eu.etaxonomy.taxeditor.ui.dialogs;\r
+\r
+import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.junit.Test;\r
+\r
+import eu.etaxonomy.taxeditor.test.AbstractEditorTest;\r
+\r
+\r
+public class LoginDialogTest extends AbstractEditorTest{\r
+ \r
+ @Test\r
+ public void canLoginAsAdmin() throws Exception {\r
+ bot.menu("General").menu("Login").click();\r
+ bot.waitUntil(Conditions.shellIsActive("Login"));\r
+ bot.textWithLabel("Username").setText("admin");\r
+ bot.textWithLabel("Password").setText("00000");\r
+ utils.ok();\r
+ }\r
+ \r
+ @Test\r
+ public void canCancelLogin() throws Exception {\r
+ bot.menu("General").menu("Login").click();\r
+ bot.waitUntil(Conditions.shellIsActive("Login"));\r
+ utils.cancel();\r
+ }\r
+ \r
+}\r
--- /dev/null
+/**\r
+ * \r
+ */\r
+package eu.etaxonomy.taxeditor.ui.selection;\r
+\r
+import org.junit.After;\r
+\r
+import eu.etaxonomy.taxeditor.test.AbstractEditorTest;\r
+\r
+/**\r
+ * This test will only test the selection element itself. The test may have to start other \r
+ * dialogs open windows before to get at the selection element. Any errors on the way \r
+ * should be handled by different tests.\r
+ * \r
+ * @author n.hoffmann\r
+ *\r
+ */\r
+public abstract class AbstractSelectionElementTest extends AbstractEditorTest{\r
+\r
+ \r
+\r
+ @After\r
+ public void tearDown() {\r
+ utils.cancel();\r
+ }\r
+ \r
+}\r
--- /dev/null
+/**\r
+ * \r
+ */\r
+package eu.etaxonomy.taxeditor.ui.selection;\r
+\r
+import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.junit.Test;\r
+\r
+/**\r
+ * This test will only test the selection element itself. The test may have to start other \r
+ * dialogs open windows before to get at the selection element. Any errors on the way \r
+ * should be handled by different tests.\r
+ * \r
+ * @author n.hoffmann\r
+ *\r
+ */\r
+public class ClassificationSelectionElementTest extends AbstractSelectionElementTest{\r
+ @Override\r
+ public void setup() {\r
+ super.setup();\r
+ bot.menu("General").menu("New").menu("Taxon").click();\r
+ bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
+ }\r
+ \r
+ @Test\r
+ public void canSelectClassification() {\r
+ utils.openFilteredSelection(0, "Choose a Classification");\r
+ utils.cancel();\r
+ }\r
+}\r
--- /dev/null
+/**\r
+ * \r
+ */\r
+package eu.etaxonomy.taxeditor.ui.selection;\r
+\r
+import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.junit.Test;\r
+\r
+/**\r
+ * @author n.hoffmann\r
+ *\r
+ */\r
+public class NameSelectionElementTest extends AbstractSelectionElementTest {\r
+ @Override\r
+ public void setup() {\r
+ super.setup();\r
+ bot.menu("General").menu("New").menu("Taxon").click();\r
+ bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
+ }\r
+ \r
+ @Test\r
+ public void canSelectName() {\r
+ utils.openFilteredSelection(3, "Choose a name");\r
+ utils.cancel();\r
+ }\r
+}\r
--- /dev/null
+/**\r
+ * \r
+ */\r
+package eu.etaxonomy.taxeditor.ui.selection;\r
+\r
+import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.junit.Test;\r
+\r
+/**\r
+ * @author n.hoffmann\r
+ *\r
+ */\r
+public class TaxonNodeSelectionElementTest extends AbstractSelectionElementTest {\r
+ @Override\r
+ public void setup() {\r
+ super.setup();\r
+ bot.menu("General").menu("New").menu("Taxon").click();\r
+ bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
+ }\r
+ \r
+ @Test\r
+ public void canSelectTaxon() {\r
+ utils.openFilteredSelection(1, "Select parent taxon");\r
+ utils.cancel();\r
+ }\r
+ \r
+}\r
--- /dev/null
+/**\r
+ * \r
+ */\r
+package eu.etaxonomy.taxeditor.ui.selection;\r
+\r
+import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.junit.Test;\r
+\r
+/**\r
+ * This test will only test the selection element itself. The test may have to start other \r
+ * dialogs open windows before to get at the selection element. Any errors on the way \r
+ * should be handled by different tests.\r
+ * \r
+ * @author n.hoffmann\r
+ *\r
+ */\r
+public class TaxonSelectionElementTest extends AbstractSelectionElementTest {\r
+ @Override\r
+ public void setup() {\r
+ super.setup();\r
+ bot.menu("General").menu("New").menu("Taxon").click();\r
+ bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
+ }\r
+ \r
+ @Test\r
+ public void canSelectTaxon() {\r
+ utils.openFilteredSelection(2, "Choose a taxon");\r
+ utils.cancel();\r
+ }\r
+}\r
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="EDIT Taxonomic Editor" uid="eu.etaxonomy.taxeditor.product" id="eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product" application="eu.etaxonomy.taxeditor.application.application" version="3.0.6.qualifier" useFeatures="true" includeLaunchers="true">
-
- <aboutInfo>
- <image path="/eu.etaxonomy.taxeditor.application/icons/256color_48x48.gif"/>
- <text>
- %productBlurb
- </text>
- </aboutInfo>
-
- <configIni use="default">
- </configIni>
-
- <launcherArgs>
- <programArgs>-data @user.home/.cdmLibrary -Dserver_port=58080</programArgs>
- <vmArgs>-Xmx512M -XX:MaxPermSize=256M</vmArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
- </launcherArgs>
-
- <windowImages i16="/eu.etaxonomy.taxeditor.application/icons/256color_16x16.gif" i32="/eu.etaxonomy.taxeditor.application/icons/256color_32x32.gif" i48="/eu.etaxonomy.taxeditor.application/icons/256color_48x48.gif"/>
-
- <splash
- location="eu.etaxonomy.taxeditor.application"
- startupProgressRect="5,447,366,15"
- startupMessageRect="7,432,360,20"
- startupForegroundColor="000000" />
- <launcher name="TaxonomicEditor">
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <license>
- <url>http://www.mozilla.org/MPL/</url>
- <text>
+<?xml version="1.0" encoding="UTF-8"?>\r
+<?pde version="3.5"?>\r
+\r
+<product name="EDIT Taxonomic Editor" uid="eu.etaxonomy.taxeditor.product" id="eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product" application="eu.etaxonomy.taxeditor.application.application" version="3.0.12.qualifier" useFeatures="true" includeLaunchers="true">\r
+\r
+ <aboutInfo>\r
+ <image path="/eu.etaxonomy.taxeditor.application/icons/256color_48x48.gif"/>\r
+ <text>\r
+ %productBlurb\r
+ </text>\r
+ </aboutInfo>\r
+\r
+ <configIni use="default">\r
+ </configIni>\r
+\r
+ <launcherArgs>\r
+ <programArgs>-data @user.home/.cdmLibrary -Dserver_port=58080</programArgs>\r
+ <vmArgs>-Xmx512M -XX:MaxPermSize=256M</vmArgs>\r
+ <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>\r
+ </launcherArgs>\r
+\r
+ <windowImages i16="/eu.etaxonomy.taxeditor.application/icons/256color_16x16.gif" i32="/eu.etaxonomy.taxeditor.application/icons/256color_32x32.gif" i48="/eu.etaxonomy.taxeditor.application/icons/256color_48x48.gif"/>\r
+\r
+ <splash\r
+ location="eu.etaxonomy.taxeditor.application"\r
+ startupProgressRect="5,447,366,15"\r
+ startupMessageRect="7,432,360,20"\r
+ startupForegroundColor="000000" />\r
+ <launcher name="TaxonomicEditor">\r
+ <solaris/>\r
+ <win useIco="false">\r
+ <bmp/>\r
+ </win>\r
+ </launcher>\r
+\r
+ <vm>\r
+ </vm>\r
+\r
+ <license>\r
+ <url>http://www.mozilla.org/MPL/</url>\r
+ <text>\r
The contents of this file are subject to the Mozilla Public License Version 1.1 (the &quot;License&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
-Software distributed under the License is distributed on an &quot;AS IS&quot; basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
- </text>
- </license>
-
- <plugins>
- </plugins>
-
- <features>
- <feature id="eu.etaxonomy.taxeditor.feature" version="3.0.6.qualifier"/>
- </features>
-
- <configurations>
- <plugin id="eu.etaxonomy.taxeditor.application" autoStart="true" startLevel="4" />
- </configurations>
-
-</product>
+Software distributed under the License is distributed on an &quot;AS IS&quot; basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.\r
+ </text>\r
+ </license>\r
+\r
+ <plugins>\r
+ </plugins>\r
+\r
+ <features>\r
+ <feature id="eu.etaxonomy.taxeditor.feature"/>\r
+ </features>\r
+\r
+ <configurations>\r
+ <plugin id="eu.etaxonomy.taxeditor.application" autoStart="true" startLevel="4" />\r
+ </configurations>\r
+\r
+</product>\r
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>3.0.6-SNAPSHOT</version>
+ <version>3.0.12-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>eu.etaxonomy.taxeditor</artifactId>
- <!-- packaging>eclipse-application</packaging -->
<packaging>eclipse-repository</packaging>
- <name>EDIT Taxonomic Editor</name>
+ <name>EDIT Taxonomic Editor Product</name>
<description>The EDIT Taxonomic Desktop Editor</description>
<url>http://wp5.e-taxonomy.eu/taxeditor</url>
<build>
<plugins>
- <!-- plugin> <groupId>org.sonatype.tycho</groupId> <artifactId>maven-osgi-packaging-plugin</artifactId>
- <version>${tycho.version}</version> <configuration> <environments> <environment>
- <os>macosx</os> <ws>cocoa</ws> <arch>x86</arch> </environment> <environment>
- <os>linux</os> <ws>gtk</ws> <arch>x86</arch> </environment> <environment>
- <os>win32</os> <ws>win32</ws> <arch>x86</arch> </environment> </environments>
- </configuration> </plugin -->
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-director-plugin</artifactId>
</goals>
</execution>
</executions>
+ <configuration>
+ <products>
+ <product>
+ <id>eu.etaxonomy.taxeditor.product</id>
+ <rootFolder>EDIT Taxonomic Editor</rootFolder>
+ </product>
+ </products>
+ </configuration>
</plugin>
</plugins>
</build>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?pde version="3.6"?>
-<target name="Eclipse Helios Target">
+<target name="Eclipse Indigo Target" sequenceNumber="4">
<locations>
-<location includeAllPlatforms="true" includeMode="slicer" type="InstallableUnit">
-<unit id="org.eclipse.equinox.executable.feature.group" version="3.4.2.R36x_v20110125-7N7K7bF8zk1BAKMh0iz0t94miBLY"/>
-<unit id="org.eclipse.platform.source.feature.group" version="3.6.2.r362_v20110210-9gF78Gs1FrIGnHDHWkEcopoN8AmxeZflGDGKQi"/>
-<unit id="org.eclipse.platform.sdk" version="3.6.2.M20110210-1200"/>
-<unit id="org.eclipse.pde.feature.group" version="3.6.2.r362_v20110203-7b7mFL2FET3dhHalh1iNZtL"/>
-<!--unit id="org.eclipse.rcp.sdk.id" version="3.6.0.M20110210-1200"/-->
-<unit id="org.eclipse.zest.feature.group" version="1.2.0.v20100519-2050-67818yE6F-AA7P4B8I52322"/>
-<repository location="http://download.eclipse.org/releases/helios"/>
-</location>
-<location includeAllPlatforms="true" includeMode="slicer" type="InstallableUnit">
-<unit id="org.eclipse.swtbot.eclipse.feature.group" version="2.0.4.20110304_0338-e5aff47-dev-e36"/>
-<unit id="org.eclipse.swtbot.eclipse.gef.feature.group" version="2.0.4.20110304_0338-e5aff47-dev-e36"/>
-<unit id="org.eclipse.swtbot.ide.feature.group" version="2.0.4.20110304_0338-e5aff47-dev-e36"/>
-<unit id="org.eclipse.swtbot.eclipse.test.junit4.feature.group" version="2.0.4.20110304_0338-e5aff47-dev-e36"/>
+<location includeAllPlatforms="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.swtbot.eclipse.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<unit id="org.eclipse.swtbot.eclipse.gef.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<unit id="org.eclipse.swtbot.ide.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<unit id="org.eclipse.swtbot.eclipse.test.junit4.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
<repository location="http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site"/>
</location>
+<location includeAllPlatforms="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.jdt.feature.group" version="3.7.1.r371_v20110810-0800-7z8gFcoFMLfTabvKsR5Qm9rBGEBK"/>
+<unit id="org.eclipse.pde.source.feature.group" version="3.7.1.r37x_v20110810-0800-7b7qFVtFEx2XnmZ4jlM5mjM"/>
+<unit id="org.eclipse.platform.feature.group" version="3.7.1.r37x_v20110729-9gF7UHOxFtniV7mI3T556iZN9AU8bEZ1lHMcVK"/>
+<unit id="org.eclipse.equinox.executable.feature.group" version="3.5.0.v20110530-7P7NFUFFLWUl76mart"/>
+<unit id="org.eclipse.platform.source.feature.group" version="3.7.1.r37x_v20110729-9gF7UHOxFtniV7mI3T556iZN9AU8bEZ1lHMcVK"/>
+<unit id="org.eclipse.platform.sdk" version="3.7.1.M20110909-1335"/>
+<unit id="org.eclipse.rcp.feature.group" version="3.7.1.r37x_v20110729-9DB5FmNFnFLSFCtLxnRfMqt15A4A"/>
+<unit id="org.eclipse.rcp.source.feature.group" version="3.7.1.r37x_v20110729-9DB5FmNFnFLSFCtLxnRfMqt15A4A"/>
+<unit id="org.eclipse.rcp.sdk.id" version="3.7.1.M20110909-1335"/>
+<unit id="org.eclipse.equinox.sdk.feature.group" version="3.7.1.R37x_v20110907-7M7W8h8eNV4Vrz-hz01A7SL_MhZP"/>
+<unit id="org.eclipse.zest.sdk.feature.group" version="1.3.0.v20110425-2050-67C08COMOGAKRUKGP_ULXbePP8ZT"/>
+<repository location="http://download.eclipse.org/releases/indigo"/>
+</location>
</locations>
</target>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <prerequisites>
- <maven>3.0</maven>
- </prerequisites>
- <groupId>eu.etaxonomy</groupId>
- <artifactId>taxeditor-parent</artifactId>
- <version>3.0.6-SNAPSHOT</version>
- <name>EDIT Taxonomic Editor</name>
- <description>The Taxonomic Editor for EDIT's platform for cybertaxonomy</description>
- <url>http://wp5.e-taxonomy.eu</url>
- <inceptionYear>2007</inceptionYear>
- <packaging>pom</packaging>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <cdmlib.version>3.0.8-SNAPSHOT</cdmlib.version>
- <tycho.version>0.12.0</tycho.version>
- <taxeditor.version>3.0.6-SNAPSHOT</taxeditor.version>
- </properties>
- <modules>
- <module>eu.etaxonomy.taxeditor.cdmlib</module>
- <module>eu.etaxonomy.taxeditor.store</module>
- <module>eu.etaxonomy.taxeditor.navigation</module>
- <module>eu.etaxonomy.taxeditor.editor</module>
- <module>eu.etaxonomy.taxeditor.bulkeditor</module>
- <module>eu.etaxonomy.taxeditor.printpublisher</module>
- <!--module>eu.etaxonomy.taxeditor.annotatedlineeditor</module-->
- <module>eu.etaxonomy.taxeditor.help</module>
- <module>eu.etaxonomy.taxeditor.application</module>
- <module>eu.etaxonomy.taxeditor.feature.platform</module>
- <module>eu.etaxonomy.taxeditor.feature</module>
- <module>eu.etaxonomy.taxeditor</module>
- </modules>
- <scm>
- <connection>scm:svn:http://dev.e-taxonomy.eu/svn/trunk/taxeditor/</connection>
- <developerConnection>scm:svn:https://dev.e-taxonomy.eu/svn/trunk/taxeditor/</developerConnection>
- <url>http://dev.e-taxonomy.eu/websvn/listing.php?repname=EDIT+Taxonomic+Editor</url>
- </scm>
- <mailingLists>
- <mailingList>
- <name>EDIT Taxonomic Editor</name>
- <subscribe>
+ <modelVersion>4.0.0</modelVersion>
+ <prerequisites>
+ <maven>3.0</maven>
+ </prerequisites>
+ <groupId>eu.etaxonomy</groupId>
+ <artifactId>taxeditor-parent</artifactId>
+ <version>3.0.12-SNAPSHOT</version>
+ <name>EDIT Taxonomic Editor</name>
+ <description>The Taxonomic Editor for EDIT's platform for cybertaxonomy</description>
+ <url>http://wp5.e-taxonomy.eu</url>
+ <inceptionYear>2007</inceptionYear>
+ <packaging>pom</packaging>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <cdmlib.version>3.0.12-SNAPSHOT</cdmlib.version><!-- TODO can we use project.version ????? -->
+ <tycho.version>0.14.0</tycho.version>
+ <taxeditor.version>3.0.12-SNAPSHOT</taxeditor.version>
+ </properties>
+ <modules>
+ <module>eu.etaxonomy.taxeditor.cdmlib</module>
+ <module>eu.etaxonomy.taxeditor.store</module>
+ <module>eu.etaxonomy.taxeditor.navigation</module>
+ <module>eu.etaxonomy.taxeditor.editor</module>
+ <module>eu.etaxonomy.taxeditor.bulkeditor</module>
+ <module>eu.etaxonomy.taxeditor.printpublisher</module>
+ <!--module>eu.etaxonomy.taxeditor.annotatedlineeditor</module-->
+ <module>eu.etaxonomy.taxeditor.help</module>
+ <module>eu.etaxonomy.taxeditor.application</module>
+ <module>eu.etaxonomy.taxeditor.feature.platform</module>
+ <module>eu.etaxonomy.taxeditor.feature</module>
+ <module>eu.etaxonomy.taxeditor</module>
+ </modules>
+ <scm>
+ <connection>scm:svn:http://dev.e-taxonomy.eu/svn/trunk/taxeditor/</connection>
+ <developerConnection>scm:svn:https://dev.e-taxonomy.eu/svn/trunk/taxeditor/</developerConnection>
+ <url>http://dev.e-taxonomy.eu/websvn/listing.php?repname=EDIT+Taxonomic+Editor</url>
+ </scm>
+ <mailingLists>
+ <mailingList>
+ <name>EDIT Taxonomic Editor</name>
+ <subscribe>
edit-taxonomic-editor+subscribe@googlegroups.com
</subscribe>
- <unsubscribe>
+ <unsubscribe>
edit-taxonomic-editor+unsubscribe@googlegroups.com
</unsubscribe>
- <post>edit-taxonomic-editor@googlegroups.com</post>
- <archive>http://groups.google.com/group/edit-taxonomic-editor/topics</archive>
- </mailingList>
- </mailingLists>
- <licenses>
- <license>
- <name>Mozilla Public License Version 1.1</name>
- <url>http://www.mozilla.org/MPL/MPL-1.1.html</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
- <developers>
- <developer>
- <!-- your SVN account id please! -->
- <id>n.hoffmann</id>
- <name>
+ <post>edit-taxonomic-editor@googlegroups.com</post>
+ <archive>http://groups.google.com/group/edit-taxonomic-editor/topics</archive>
+ </mailingList>
+ </mailingLists>
+ <licenses>
+ <license>
+ <name>Mozilla Public License Version 1.1</name>
+ <url>http://www.mozilla.org/MPL/MPL-1.1.html</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <developers>
+ <developer>
+ <!-- your SVN account id please! -->
+ <id>n.hoffmann</id>
+ <name>
Niels Hoffmann
</name>
- <email>n.hoffmann [at] bgbm.org</email>
- <organization>
+ <email>n.hoffmann [at] bgbm.org</email>
+ <organization>
Botanic Garden Botanical Museum Berlin
</organization>
- <organizationUrl>http://www.bgbm.org/BioDivInf/</organizationUrl>
- <timezone>+1</timezone>
- <roles>
- <role>Java Developer</role>
- <role>Architect</role>
- </roles>
- <url/>
- </developer>
- </developers>
- <issueManagement>
- <system>Trac</system>
- <url>http://dev.e-taxonomy.eu/trac/</url>
- </issueManagement>
- <ciManagement>
- <system>Jenkins</system>
- <url>http://160.45.63.201/jenkins/view/EDIT%20Taxonomic%20Editor/</url>
- </ciManagement>
- <!-- **** REPOSITORIES **** -->
- <repositories>
- <!-- the cdm internal repository -->
- <repository>
- <id>EditRepository</id>
- <url>http://wp5.e-taxonomy.eu/mavenrepo/</url>
- </repository>
- </repositories>
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-maven-plugin</artifactId>
- <version>${tycho.version}</version>
- <extensions>true</extensions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-packaging-plugin</artifactId>
- <version>${tycho.version}</version>
- <configuration>
- <strictVersions>true</strictVersions>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- <version>${tycho.version}</version>
- <configuration>
- <resolver>p2</resolver>
- <target>
- <artifact>
- <groupId>eu.etaxonomy</groupId>
- <artifactId>eu.etaxonomy.taxeditor</artifactId>
- <version>${taxeditor.version}</version>
- <classifier>rcp</classifier>
- </artifact>
- </target>
- <ignoreTychoRepositories>true</ignoreTychoRepositories>
- <environments>
- <!--environment>
- <os>macosx</os>
- <ws>cocoa</ws>
- <arch>x86_64</arch>
- </environment-->
- <environment>
- <os>win32</os>
- <ws>win32</ws>
- <arch>x86</arch>
- </environment>
- <environment>
- <os>linux</os>
- <ws>gtk</ws>
- <arch>x86</arch>
- </environment>
- <environment>
- <os>linux</os>
- <ws>gtk</ws>
- <arch>x86_64</arch>
- </environment>
- </environments>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.6</version>
- <configuration>
- <includes>
- <include>**/*Test.java</include>
- </includes>
- <systemPropertyVariables>
- <property>
- <name>hibernate.connection.driver_class</name>
- <value>${hibernate.connection.driver_class}</value>
- </property>
- <property>
- <name>hibernate.connection.url</name>
- <value>${hibernate.connection.url}</value>
- </property>
- <property>
- <name>hibernate.connection.username</name>
- <value>${hibernate.connection.username}</value>
- </property>
- <property>
- <name>hibernate.connection.password</name>
- <value>${hibernate.connection.password}</value>
- </property>
- </systemPropertyVariables>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-site-plugin</artifactId>
- <version>3.0</version>
- <configuration>
- <locales>en</locales>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <version>2.1.2</version>
- <executions>
- <execution>
- <id>attach-sources</id>
- <phase>verify</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.7</version>
- <configuration>
- <stylesheet>maven</stylesheet>
- <quiet>true</quiet>
- <detectLinks>true</detectLinks>
- <failOnError>false</failOnError>
- </configuration>
- <executions>
- <execution>
- <id>aggregate</id>
- <goals>
- <goal>aggregate</goal>
- </goals>
- <phase>site</phase>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-eclipse-plugin</artifactId>
- <version>2.8</version>
- <configuration>
- <downloadSources>true</downloadSources>
- <downloadJavadocs>true</downloadJavadocs>
- <additionalProjectnatures>
- <projectnature>org.eclipse.pde.PluginNature</projectnature>
- </additionalProjectnatures>
- </configuration>
- </plugin>
- <!-- ====== DEPLOY ====== -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-release-plugin</artifactId>
- <version>2.2.1</version>
- <configuration>
- <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
- <autoVersionSubmodules>false</autoVersionSubmodules>
- <!--preparationGoals>clean verify install</preparationGoals-->
- <!--goals>deploy</goals-->
- <!-- skipping site-deploy by explicitly configuring the goal here -->
- <tagBase>http://dev.e-taxonomy.eu/svn/tags/taxeditor</tagBase>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>wagon-maven-plugin</artifactId>
- <version>1.0-beta-3</version>
- <!--
+ <organizationUrl>http://www.bgbm.org/BioDivInf/</organizationUrl>
+ <timezone>+1</timezone>
+ <roles>
+ <role>Java Developer</role>
+ <role>Architect</role>
+ </roles>
+ <url/>
+ </developer>
+ </developers>
+ <issueManagement>
+ <system>Trac</system>
+ <url>http://dev.e-taxonomy.eu/trac/</url>
+ </issueManagement>
+ <ciManagement>
+ <system>Jenkins</system>
+ <url>http://160.45.63.201/jenkins/view/EDIT%20Taxonomic%20Editor/</url>
+ </ciManagement>
+ <!-- **** REPOSITORIES **** -->
+ <repositories>
+ <!-- the cdm internal repository -->
+ <repository>
+ <id>EditRepository</id>
+ <url>http://wp5.e-taxonomy.eu/mavenrepo/</url>
+ </repository>
+ <repository>
+ <id>eclipse-indigo</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site/</url>
+ </repository>
+ <repository>
+ <id>eclipse-swtbot</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/releases/indigo</url>
+ </repository>
+ </repositories>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-maven-plugin</artifactId>
+ <version>${tycho.version}</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-packaging-plugin</artifactId>
+ <version>${tycho.version}</version>
+ <configuration>
+ <strictVersions>true</strictVersions>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tycho.version}</version>
+ <configuration>
+ <environments>
+ <environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86_64</arch>
+ </environment>
+ </environments>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.6</version>
+ <configuration>
+ <includes>
+ <include>**/*Test.java</include>
+ </includes>
+ <systemPropertyVariables>
+ <property>
+ <name>hibernate.connection.driver_class</name>
+ <value>${hibernate.connection.driver_class}</value>
+ </property>
+ <property>
+ <name>hibernate.connection.url</name>
+ <value>${hibernate.connection.url}</value>
+ </property>
+ <property>
+ <name>hibernate.connection.username</name>
+ <value>${hibernate.connection.username}</value>
+ </property>
+ <property>
+ <name>hibernate.connection.password</name>
+ <value>${hibernate.connection.password}</value>
+ </property>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>3.0</version>
+ <configuration>
+ <locales>en</locales>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.1.2</version>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.7</version>
+ <configuration>
+ <stylesheet>maven</stylesheet>
+ <quiet>true</quiet>
+ <detectLinks>true</detectLinks>
+ <failOnError>false</failOnError>
+ </configuration>
+ <executions>
+ <execution>
+ <id>aggregate</id>
+ <goals>
+ <goal>aggregate</goal>
+ </goals>
+ <phase>site</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <version>2.8</version>
+ <configuration>
+ <downloadSources>true</downloadSources>
+ <downloadJavadocs>true</downloadJavadocs>
+ <additionalProjectnatures>
+ <projectnature>org.eclipse.pde.PluginNature</projectnature>
+ </additionalProjectnatures>
+ </configuration>
+ </plugin>
+ <!-- ====== DEPLOY ====== -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.2.1</version>
+ <configuration>
+ <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
+ <autoVersionSubmodules>false</autoVersionSubmodules>
+ <!--preparationGoals>clean verify install</preparationGoals-->
+ <!--goals>deploy</goals-->
+ <!-- skipping site-deploy by explicitly configuring the goal here -->
+ <tagBase>http://dev.e-taxonomy.eu/svn/tags/taxeditor</tagBase>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>wagon-maven-plugin</artifactId>
+ <version>1.0-beta-3</version>
+ <!--
Problems with the wagon-maven-plugin have been encounterd on Windows,
it should work properly on linux though.
-->
- <executions>
- <execution>
- <phase>deploy</phase>
- <goals>
- <goal>upload</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <fromDir>eu.etaxonomy.taxeditor/target/products</fromDir>
- <includes>*.zip</includes>
- <url>scpexe://wp5.e-taxonomy.eu/var/www/download/taxeditor/${project.version}</url>
- <serverId>wp5.e-taxonomy.eu</serverId>
- </configuration>
- </plugin>
- </plugins>
- <!--pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.3.1</version>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>wagon-maven-plugin</artifactId>
- <version>1.0-beta-3</version>
- </plugin-->
- <!--plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-packaging-plugin</artifactId>
- <version>${tycho.version}</version-->
- <!--executions>
- <execution>
- <id>timestamp</id>
- <phase>validate</phase>
- <goals>
- <goal>timestamp</goal>
- </goals>
- </execution>
- </executions-->
- <!-- for some reason configuration won't work here, have to define
- in each module -->
- <!--configuration>
- <archive>
- <addMavenDescriptor>false</addMavenDescriptor>
- </archive>
- <environments>
- <environment>
- <os>macosx</os>
- <ws>cocoa</ws>
- <arch>x86</arch>
- </environment>
- </environments>
- </configuration>
- </plugin-->
- <!--/plugins>
- </pluginManagement-->
- <extensions>
- <extension>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-scm</artifactId>
- <version>1.0-alpha-5</version>
- </extension>
- <extension>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-ssh</artifactId>
- <version>1.0-beta-7</version>
- </extension>
- <extension>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-ssh-external</artifactId>
- <version>1.0-beta-6</version>
- </extension>
- <extension>
- <groupId>org.apache.maven.scm</groupId>
- <artifactId>maven-scm-manager-plexus</artifactId>
- <version>1.0</version>
- </extension>
- <extension>
- <groupId>org.apache.maven.scm</groupId>
- <artifactId>maven-scm-provider-svnexe</artifactId>
- <version>1.0</version>
- </extension>
- <!-- WebDAV plugin to upload snapshots -->
- <extension>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-webdav</artifactId>
- <version>1.0-beta-2</version>
- </extension>
- </extensions>
- </build>
- <reporting>
- <plugins>
- <plugin>
- <!-- you will want to start by publishing your classes' Javadocs -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.7</version>
- <configuration>
- <detectLinks>true</detectLinks>
- </configuration>
- </plugin>
- <plugin>
- <!-- this will generate an indexed and cross-referenced HTML version of your source code -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jxr-plugin</artifactId>
- <version>2.2</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-changes-plugin</artifactId>
- <version>2.3</version>
- <configuration>
- <issueLinkTemplatePerSystem>
- <default>%URL%/ticket/%ISSUE%</default>
- </issueLinkTemplatePerSystem>
- </configuration>
- <reportSets>
- <reportSet>
- <reports>
- <report>changes-report</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
- </plugins>
- </reporting>
- <!-- DISTRIBUTION MANAGEMENT -->
- <distributionManagement>
- <site>
- <id>wp5.e-taxonomy.eu</id>
- <name>EDIT Taxonomic Editor</name>
- <url>scpexe://160.45.63.151/var/www/wp5.e-taxonomy.eu/taxeditor/</url>
- </site>
- <repository>
- <uniqueVersion>false</uniqueVersion>
- <id>wp5.e-taxonomy.eu</id>
- <name>Edit Maven Repository</name>
- <url>scpexe://160.45.63.151/var/www/wp5.e-taxonomy.eu/mavenrepo/</url>
- </repository>
- </distributionManagement>
+ <executions>
+ <execution>
+ <phase>deploy</phase>
+ <goals>
+ <goal>upload</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <fromDir>eu.etaxonomy.taxeditor/target/products</fromDir>
+ <includes>*.zip</includes>
+ <url>scpexe://wp5.e-taxonomy.eu/var/www/download/taxeditor/${project.version}</url>
+ <serverId>wp5.e-taxonomy.eu</serverId>
+ </configuration>
+ </plugin>
+ </plugins>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-scm</artifactId>
+ <version>1.0-alpha-5</version>
+ </extension>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-ssh</artifactId>
+ <version>1.0-beta-7</version>
+ </extension>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-ssh-external</artifactId>
+ <version>1.0-beta-6</version>
+ </extension>
+ <extension>
+ <groupId>org.apache.maven.scm</groupId>
+ <artifactId>maven-scm-manager-plexus</artifactId>
+ <version>1.0</version>
+ </extension>
+ <extension>
+ <groupId>org.apache.maven.scm</groupId>
+ <artifactId>maven-scm-provider-svnexe</artifactId>
+ <version>1.0</version>
+ </extension>
+ <!-- WebDAV plugin to upload snapshots -->
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav</artifactId>
+ <version>1.0-beta-2</version>
+ </extension>
+ </extensions>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.7</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <!-- you will want to start by publishing your classes' Javadocs -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.7</version>
+ <configuration>
+ <detectLinks>true</detectLinks>
+ </configuration>
+ </plugin>
+ <plugin>
+ <!-- this will generate an indexed and cross-referenced HTML version of your source code -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-changes-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <issueLinkTemplatePerSystem>
+ <default>%URL%/ticket/%ISSUE%</default>
+ </issueLinkTemplatePerSystem>
+ </configuration>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>changes-report</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ </plugins>
+ </reporting>
+ <!-- DISTRIBUTION MANAGEMENT -->
+ <distributionManagement>
+ <site>
+ <id>wp5.e-taxonomy.eu</id>
+ <name>EDIT Taxonomic Editor</name>
+ <url>scpexe://wp5.e-taxonomy.eu/var/www/wp5.e-taxonomy.eu/taxeditor/</url>
+ </site>
+ <repository>
+ <uniqueVersion>false</uniqueVersion>
+ <id>wp5.e-taxonomy.eu</id>
+ <name>Edit Maven Repository</name>
+ <url>scpexe://wp5.e-taxonomy.eu/var/www/wp5.e-taxonomy.eu/mavenrepo/</url>
+ </repository>
+ </distributionManagement>
</project>
The Taxonomic Editor uses <maven 3> for convenient configuration and automation of common tasks,
such as resolving dependencies and automating builds.
- The <<<trunk>>> branch of the Taxonomic Editor is programmed against the latest
+ The <<<latest snapshot branch>>> of the Taxonomic Editor is programmed against the latest
SNAPSHOT version of the cdmlibrary. Because that dependency will change quickly, we
do not imclude it with the other dependencies but rather install it with maven.
- In order to do that you have to run <<<mvn validate>>> in your <<<taxeditor/>>> directory.
+ In order to do that you have to run <<<mvn validate>>> in your <<<taxeditor/eu.etaxonomy.taxeditor.cdmlib>>> directory.
---
-$ cd taxeditor/
+$ cd taxeditor/eu.etaxonomy.taxeditor.cdmlib/
$ mvn validate
---