Fixed #1113 - name the nomenclatural citation 'original citation' in zoological names
authorp.ciardelli <p.ciardelli@localhost>
Tue, 29 Sep 2009 09:22:39 +0000 (09:22 +0000)
committerp.ciardelli <p.ciardelli@localhost>
Tue, 29 Sep 2009 09:22:39 +0000 (09:22 +0000)
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/name/ZoologicalNamePropertySource.java

index 7884c221da20c8fe1a945200755e10c1e9cf18fc..e203a40b580e409694cdfeef8342cb7cbae1f4c1 100644 (file)
@@ -9,6 +9,8 @@
 \r
 package eu.etaxonomy.taxeditor.propertysheet.name;\r
 \r
+import org.eclipse.ui.views.properties.PropertyDescriptor;\r
+\r
 import eu.etaxonomy.cdm.model.name.ZoologicalName;\r
 \r
 /**\r
@@ -21,9 +23,25 @@ import eu.etaxonomy.cdm.model.name.ZoologicalName;
 public class ZoologicalNamePropertySource extends NonViralNamePropertySource {\r
 \r
        private ZoologicalName zoologicalName;\r
+       \r
+       public static final String P_NOMENCLATURAL_REF = "Original Reference";\r
                \r
        public ZoologicalNamePropertySource(ZoologicalName name) {\r
                super(name);\r
                this.zoologicalName = name;\r
        }\r
+       \r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.propertysheet.name.NonViralNamePropertySource#addDescriptor(java.lang.String)\r
+        */\r
+       @Override\r
+       protected void addDescriptor(String id) {\r
+               // Nomenclatural reference\r
+               if (id.equals(P_ID_NOMENCLATURAL_REF)) {\r
+                       descriptors.addElement(\r
+                                       new PropertyDescriptor(P_ID_NOMENCLATURAL_REF,P_NOMENCLATURAL_REF));\r
+                       return;\r
+               }\r
+               super.addDescriptor(id);\r
+       }\r
 }
\ No newline at end of file