ref #8233 Add barcode and catalog number to clone type functionality
authorPatrick Plitzner <p.plitzner@bgbm.org>
Wed, 10 Apr 2019 15:41:51 +0000 (17:41 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Wed, 10 Apr 2019 15:41:51 +0000 (17:41 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/type/CloneTypeWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/type/CloneTypeWizardComposite.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/type/CloneTypeWizardPage.java

index a6f53fb991e6b0e35273cef08c2c048ae4c2c3a4..2ccfe1f0bd3cb45d521e9f6f440d283fd7f23e18 100644 (file)
@@ -34,6 +34,10 @@ public class CloneTypeWizard extends Wizard{
 
     private String accessionNumber;
 
+    private String barcode;
+
+    private String catalogNumber;
+
     private eu.etaxonomy.cdm.model.occurrence.Collection collection;
 
     private SpecimenTypeDesignationStatus typeStatus;
@@ -56,6 +60,8 @@ public class CloneTypeWizard extends Wizard{
     public boolean performFinish() {
         this.baseTypeDesignation = page.getBaseTypeDesignation();
         this.accessionNumber = page.getAccessionNumber();
+        this.barcode = page.getBarcode();
+        this.catalogNumber = page.getCatalogNumber();
         this.collection = page.getCollection();
         this.typeStatus = page.getTypeStatus();
         return true;
@@ -73,6 +79,14 @@ public class CloneTypeWizard extends Wizard{
         return accessionNumber;
     }
 
+    public String getBarcode() {
+        return barcode;
+    }
+
+    public String getCatalogNumber() {
+        return catalogNumber;
+    }
+
     public eu.etaxonomy.cdm.model.occurrence.Collection getCollection() {
         return collection;
     }
index faf2a7e2003800d145a12d87267ece176d89d687..7246780b3532cbb251dece239aaaa98ad62161f3 100644 (file)
@@ -1,11 +1,11 @@
 /**
-* Copyright (C) 2019 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) 2019 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.name.type;
 
 import org.eclipse.jface.viewers.ComboViewer;
@@ -33,6 +33,8 @@ public class CloneTypeWizardComposite extends Composite {
     private Button btnBrowseCollection;
     private TermUuidComboViewer comboTypeStatus;
     private ComboViewer comboViewerBaseType;
+    private Text textBarcode;
+    private Text textCatalogNumber;
 
     /**
      * Create the composite.
@@ -51,16 +53,16 @@ public class CloneTypeWizardComposite extends Composite {
         Combo combo = comboViewerBaseType.getCombo();
         combo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
 
-                Label lblNewLabel_2 = new Label(this, SWT.NONE);
-                lblNewLabel_2.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
-                lblNewLabel_2.setText("Collection");
+        Label lblNewLabel_2 = new Label(this, SWT.NONE);
+        lblNewLabel_2.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+        lblNewLabel_2.setText("Collection");
 
-                txtCollection = new Text(this, SWT.BORDER);
-                txtCollection.setEnabled(false);
-                txtCollection.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
+        txtCollection = new Text(this, SWT.BORDER);
+        txtCollection.setEnabled(false);
+        txtCollection.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
 
-                btnBrowseCollection = new Button(this, SWT.NONE);
-                btnBrowseCollection.setImage(ImageResources.getImage(ImageResources.BROWSE_ICON));
+        btnBrowseCollection = new Button(this, SWT.NONE);
+        btnBrowseCollection.setImage(ImageResources.getImage(ImageResources.BROWSE_ICON));
 
         Label lblNewLabel = new Label(this, SWT.NONE);
         lblNewLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
@@ -69,13 +71,27 @@ public class CloneTypeWizardComposite extends Composite {
         txtAccNumber = new Text(this, SWT.BORDER);
         txtAccNumber.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
 
-                Label lblNewLabel_1 = new Label(this, SWT.NONE);
-                lblNewLabel_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
-                lblNewLabel_1.setText("Type Status");
+        Label lblNewLabel_4 = new Label(this, SWT.NONE);
+        lblNewLabel_4.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+        lblNewLabel_4.setText("Barcode");
+
+        textBarcode = new Text(this, SWT.BORDER);
+        textBarcode.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
+
+        Label lblNewLabel_5 = new Label(this, SWT.NONE);
+        lblNewLabel_5.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+        lblNewLabel_5.setText("Catalog Number");
 
-                comboTypeStatus = new TermUuidComboViewer(this, SWT.NONE);
-                comboTypeStatus.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
-                comboTypeStatus.setInput(TermType.SpecimenTypeDesignationStatus);
+        textCatalogNumber = new Text(this, SWT.BORDER);
+        textCatalogNumber.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
+
+        Label lblNewLabel_1 = new Label(this, SWT.NONE);
+        lblNewLabel_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+        lblNewLabel_1.setText("Type Status");
+
+        comboTypeStatus = new TermUuidComboViewer(this, SWT.NONE);
+        comboTypeStatus.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
+        comboTypeStatus.setInput(TermType.SpecimenTypeDesignationStatus);
 
     }
 
@@ -99,4 +115,10 @@ public class CloneTypeWizardComposite extends Composite {
     public Text getTxtAccNumber() {
         return txtAccNumber;
     }
+    public Text getTextBarcode() {
+        return textBarcode;
+    }
+    public Text getTextCatalogNumber() {
+        return textCatalogNumber;
+    }
 }
index 9eabb15767aeeb8859059d1765db3250739d1f5f..872feba22427562f76990c23469bddc44385a549 100644 (file)
@@ -117,6 +117,14 @@ public class CloneTypeWizardPage extends WizardPage implements ISelectionChanged
         return composite.getTxtAccNumber().getText();
     }
 
+    public String getBarcode() {
+        return composite.getTextBarcode().getText();
+    }
+
+    public String getCatalogNumber() {
+        return composite.getTextCatalogNumber().getText();
+    }
+
     public eu.etaxonomy.cdm.model.occurrence.Collection getCollection() {
         return selectedCollection;
     }