rename FieldObservation -> FieldUnit #3566
authorAndreas Müller <a.mueller@bgbm.org>
Wed, 30 Oct 2013 13:00:49 +0000 (13:00 +0000)
committerAndreas Müller <a.mueller@bgbm.org>
Wed, 30 Oct 2013 13:00:49 +0000 (13:00 +0000)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewFieldUnitWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/IPreferenceKeys.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TaxonomicEditorGeneralPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/SearchManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FieldUnitSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DerivedUnitFacadeDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/FieldUnitDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/FieldUnitWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java

index 9dfc7ec20b629bf76be4bb332b195c781296429e..a93e8f18541aa099c634f4d0492858ca5375eef6 100644 (file)
@@ -15,7 +15,7 @@ import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
- * <p>NewFieldObservationWizard class.</p>
+ * <p>NewFieldUnitWizard class.</p>
  *
  * @author n.hoffmann
  * @created Jun 17, 2010
index 7254819d9880116e879ac70dbe829eaf4f4cf69a..0545633720267c1c95b2687e067e4c8db5f04acb 100644 (file)
@@ -11,6 +11,7 @@
 package eu.etaxonomy.taxeditor.preference;
 
 import eu.etaxonomy.cdm.model.common.IDefinedTerm;
+import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
 
 /**
  * <p>IPreferenceKeys interface.</p>
@@ -109,9 +110,9 @@ public interface IPreferenceKeys {
        public static final String OPENURL_IMAGE_MAX_HEIGHT = "eu.etaxonomy.taxeditor.openUrlImageMaxHeight";
 
        /**
-        * Whether the occurrence bulk editor should show {@link FieldObservation} objects
+        * Whether the occurrence bulk editor should show {@link FieldUnit} objects
         */
-       public static final String BULK_EDITOR_OCCURRENCE_SHOW_FIELD_OBSERVATIONS = "eu.etaxonomy.taxeditor.bulkeditor.occurrence.showFieldObservations";
+       public static final String BULK_EDITOR_OCCURRENCE_SHOW_FIELD_UNITS = "eu.etaxonomy.taxeditor.bulkeditor.occurrence.showFieldUnits";
 
        public static final String SEARCH_OPEN_RESULTS_IN_SEPARATE_WINDOWS = "eu.etaxonomy.taxeditor.navigation.search.openResultInSeparateWindows";
 
index 60de9c9d6265b7c87ce547dfc433468a10afd342..8140ee64a6aee0d94af001aad8b0d12db9c1fb77 100644 (file)
@@ -54,8 +54,8 @@ public class TaxonomicEditorGeneralPreferences extends
                addField(new BooleanFieldEditor(
                                IPreferenceKeys.SHOW_EXPERIMENTAL_FEATURES,
                                "Show experimental features", getFieldEditorParent()));
-               addField(new BooleanFieldEditor(IPreferenceKeys.BULK_EDITOR_OCCURRENCE_SHOW_FIELD_OBSERVATIONS,
-                               "Show FieldObservations in Bulk Editor.",
+               addField(new BooleanFieldEditor(IPreferenceKeys.BULK_EDITOR_OCCURRENCE_SHOW_FIELD_UNITS,
+                               "Show Field Units in Bulk Editor.",
                                getFieldEditorParent()));
                addField(new BooleanFieldEditor(IPreferenceKeys.SEARCH_OPEN_RESULTS_IN_SEPARATE_WINDOWS,
                                "Open search results in separate windows", 
index 59a5c9feb5b316223897db45fadf6b85e7b447de..28c6cc18e0a37a772941f6e4b92e34536fffdc58 100644 (file)
@@ -148,7 +148,7 @@ public class SearchManager {
         */
        public List<SpecimenOrObservationBase> findOccurrences(IIdentifiableEntityServiceConfigurator configurator){
                // by default we do not show field units. This may be configured via preferences
-               boolean showFieldUnits = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.BULK_EDITOR_OCCURRENCE_SHOW_FIELD_OBSERVATIONS);
+               boolean showFieldUnits = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.BULK_EDITOR_OCCURRENCE_SHOW_FIELD_UNITS);
                if(! showFieldUnits){
                        configurator.setClazz(DerivedUnit.class);
                }
index faba5a4e2435c86cb57684f9b0d4c38d4057a4b1..49acf9441303461c827d54d6d515569ac599bd77 100644 (file)
@@ -25,7 +25,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
 
 /**
- * <p>FilteredFieldObservationSelectionDialog class.</p>
+ * <p>FilteredFieldUnitSelectionDialog class.</p>
  *
  * @author n.hoffmann
  * @created Jun 17, 2010
@@ -49,14 +49,14 @@ public class FieldUnitSelectionDialog extends
        }
 
        /**
-        * <p>Constructor for FilteredFieldObservationSelectionDialog.</p>
+        * <p>Constructor for FilteredFieldUnitSelectionDialog.</p>
         *
         * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         * @param title a {@link java.lang.String} object.
         * @param multi a boolean.
         * @param settings a {@link java.lang.String} object.
-        * @param cdmObject a {@link eu.etaxonomy.cdm.model.occurrence.FieldObservation} object.
+        * @param cdmObject a {@link eu.etaxonomy.cdm.model.occurrence.FieldUnit} object.
         */
        protected FieldUnitSelectionDialog(Shell shell, ConversationHolder conversation,
                        String title, boolean multi, String settings,
index fabdc0a45d5a1823d1420d78db4b18468b0e5aa1..adaf493bce497aeba791497636da69a95a0815a1 100644 (file)
@@ -1502,7 +1502,7 @@ public class CdmFormFactory extends FormToolkit {
         return section;
     }
 
-    public FieldUnitDetailSection createFieldObservationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+    public FieldUnitDetailSection createFieldUnitDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
         FieldUnitDetailSection section = new FieldUnitDetailSection(this, conversation, parentElement, selectionProvider, style);
         addAndAdaptSection(parentElement, section);
         return section;
@@ -1835,7 +1835,7 @@ public class CdmFormFactory extends FormToolkit {
         return element;
                }
 
-    public FieldUnitDetailElement createFieldObservationDetailElement(ICdmFormElement parentElement) {
+    public FieldUnitDetailElement createFieldUnitDetailElement(ICdmFormElement parentElement) {
         FieldUnitDetailElement element = new FieldUnitDetailElement(this, parentElement);
         addAndAdaptElement(parentElement, element);
         return element;
index 5a70186e13463151da8cc9dd51cccfcff9bc0570..56ddc533c283dbdc9c7deeb79fbf09f115c12e7c 100644 (file)
@@ -39,7 +39,7 @@ public class DerivedUnitFacadeDetailElement extends AbstractCdmDetailElement<Der
        private GeneralDetailSection section_general;
        private GatheringEventDetailSection section_gatheringEvent;
        private DerivedUnitBaseDetailSection section_derivedUnitBase;
-       private FieldUnitDetailSection section_fieldObservation;
+       private FieldUnitDetailSection section_fieldUnit;
 
        /**
         * <p>Constructor for DerivedUnitFacadeDetailElement.</p>
@@ -65,7 +65,7 @@ public class DerivedUnitFacadeDetailElement extends AbstractCdmDetailElement<Der
                        section_general.setEntity(facade);
                        section_derivedUnitBase.setEntity(facade);
                        section_gatheringEvent.setEntity(facade);
-                       section_fieldObservation.setEntity(facade);
+                       section_fieldUnit.setEntity(facade);
 
                } catch (DerivedUnitFacadeNotSupportedException e) {
                        AbstractUtility.errorDialog("Error", this, "SpecimenFacadeNotSupportedException while inititating SpecimenFacade", e);
@@ -91,10 +91,10 @@ public class DerivedUnitFacadeDetailElement extends AbstractCdmDetailElement<Der
                        section_gatheringEvent.dispose();
                        section_gatheringEvent = null;
                }
-               if(section_fieldObservation != null){
-                       removeControl(section_fieldObservation);
-                       section_fieldObservation.dispose();
-                       section_fieldObservation = null;
+               if(section_fieldUnit != null){
+                       removeControl(section_fieldUnit);
+                       section_fieldUnit.dispose();
+                       section_fieldUnit = null;
                }
        }
 
@@ -128,10 +128,10 @@ public class DerivedUnitFacadeDetailElement extends AbstractCdmDetailElement<Der
                addControl(section_gatheringEvent);
                addElement(section_gatheringEvent);
 
-               section_fieldObservation = formFactory.createFieldObservationDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE);
-               section_fieldObservation.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
-               addControl(section_fieldObservation);
-               addElement(section_fieldObservation);
+               section_fieldUnit = formFactory.createFieldObservationDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE);
+               section_fieldUnit.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+               addControl(section_fieldUnit);
+               addElement(section_fieldUnit);
 
                section_derivedUnitBase = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE);
                section_derivedUnitBase.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
@@ -142,7 +142,7 @@ public class DerivedUnitFacadeDetailElement extends AbstractCdmDetailElement<Der
        /** {@inheritDoc} */
        @Override
        public void handleEvent(Object eventSource) {
-               if(eventSource == section_derivedUnitBase || eventSource == section_gatheringEvent || eventSource == section_fieldObservation){
+               if(eventSource == section_derivedUnitBase || eventSource == section_gatheringEvent || eventSource == section_fieldUnit){
                        if(getParentElement() instanceof AbstractCdmDetailSection) {
                 ((AbstractCdmDetailSection) getParentElement()).updateTitle();
             }
index 2af5827b94531f7f8a865d737a4e75e7017ba26c..f1f43d42b4ef3fc40b2e9a7b4dd5f353a756ee00 100644 (file)
@@ -20,7 +20,7 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
 /**
- * <p>FieldObservationDetailSection class.</p>
+ * <p>FieldUnitDetailSection class.</p>
  *
  * @author n.hoffmann
  * @created Jun 17, 2010
@@ -28,7 +28,7 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 public class FieldUnitDetailSection extends AbstractCdmDetailSection<DerivedUnitFacade> implements IDerivedUnitFacadeDetailSection{
 
        /**
-        * <p>Constructor for FieldObservationDetailSection.</p>
+        * <p>Constructor for FieldUnitDetailSection.</p>
         *
         * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
@@ -53,6 +53,6 @@ public class FieldUnitDetailSection extends AbstractCdmDetailSection<DerivedUnit
         */
        @Override
        protected AbstractCdmDetailElement<DerivedUnitFacade> createCdmDetailElement(AbstractCdmDetailSection<DerivedUnitFacade> parentElement, int style) {
-           return formFactory.createFieldObservationDetailElement(parentElement);
+           return formFactory.createFieldUnitDetailElement(parentElement);
        }
 }
index 2f6021d6df3cd2a35a01d29262e6adef8b2b5ee7..5d2624b7a1dcd82cb6dd201ff6033200ee001e8b 100644 (file)
@@ -49,7 +49,7 @@ public class FieldUnitWizardPage extends AbstractCdmEntityWizardPage<DerivedUnit
         */
        @Override
        public AbstractCdmDetailElement<DerivedUnitFacade> createElement(ICdmFormElement rootElement) {
-               FieldUnitDetailElement detailElement = formFactory.createFieldObservationDetailElement(rootElement);
+               FieldUnitDetailElement detailElement = formFactory.createFieldUnitDetailElement(rootElement);
                detailElement.setEntity(getEntity());
                return detailElement;
        }
index 4ababe55e00113c18b590a4ac1cbdb0e022aaaac..7eaf0dc4620806a165d21694b4474da123759c96 100644 (file)
@@ -555,7 +555,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldObservationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+        FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);