cleanup and generics for ICdmEntitySessionEnabled
authorAndreas Müller <a.mueller@bgbm.org>
Mon, 18 Jan 2021 15:11:53 +0000 (16:11 +0100)
committerAndreas Müller <a.mueller@bgbm.org>
Mon, 18 Jan 2021 15:11:53 +0000 (16:11 +0100)
49 files changed:
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/perspective/ChecklistPerspective.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/IEntityContainer.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/IEntityCreator.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/IEntityPersistenceService.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/command/BulkEditorPropertyTester.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/BulkEditorSearchE4.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/defaultHandler/OpenBulkEditorForIdentifiableEntityE4.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AbstractBulkEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AgentEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/GroupEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/TaxonEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/UserEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/entitycreator/UserCreator.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/sortprovider/AbstractDateComparator.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/sortprovider/AbstractSortProvider.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/sortprovider/CdmBaseSortProvider.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/sortprovider/IdentifiableEntitySortProvider.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/sortprovider/ReferenceSortProvider.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySessionEnabled.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/DescriptiveDataSetEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/DescriptiveDataSetNavigator.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/character/CharacterEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrixPart.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/e4/TaxonEditorInputE4.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/group/authority/CdmAuthorityEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/AbstractIdentificationEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/ChecklistEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/DistributionEditorPart.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateView.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/FactualDataPartE4.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/e4/UsesViewPartE4.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/AlignmentEditorInput.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/e4/PolytomousKeyViewPartE4.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/TaxonNavigatorE4.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/CdmEntitySessionInput.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/AbstractDefinedTermEditorInput.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/TermEditorInput.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/ICharacterEditor.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/ITermTreeEditor.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/TermTreeEditor.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/ITaxonBaseDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/EditTaxonNodeWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EditFromSelectionWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EntitySelectionElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/CdmSectionPart.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/AbstractCdmEditorPartE4.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/MockSessionOwner.java

index f46354e15dbfed7ae2cb4a85fda4a6cce8affc1a..f80f3e7281cce1c3eb912a0355ef40076f9e5f61 100644 (file)
@@ -6,7 +6,6 @@
  * 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.perspective;
 
 import org.eclipse.ui.IFolderLayout;
@@ -17,17 +16,9 @@ import eu.etaxonomy.taxeditor.editor.AppModelId;
 /**
  * @author a.oppermann
  * @created Nov 18, 2014
- * @version 1.0
  */
 public class ChecklistPerspective extends Default {
 
-       /*
-        * (non-Javadoc)
-        *
-        * @see
-        * org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui
-        * .IPageLayout)
-        */
        @Override
        public void createInitialLayout(IPageLayout layout) {
                IFolderLayout navigationFolder = layout.createFolder("navigation",
@@ -49,6 +40,5 @@ public class ChecklistPerspective extends Default {
         layout.addPlaceholder(MEDIA_VIEW, IPageLayout.RIGHT, 0.5f, FACTUAL_DATA_VIEW);
 
         createAdditionalFolder(layout, layout.getEditorArea());
-
        }
-}
+}
\ No newline at end of file
index bfa3825607f8aea23febb6ff6ea6547ee03493e3..e4776f2edbb211cbaf1e4e8e6d290c66bc28762b 100644 (file)
@@ -15,16 +15,12 @@ import java.util.Set;
  *
  * @author p.ciardelli
  * @created 25.06.2009
- * @version 1.0
  * @param <T>
  */
 public interface IEntityContainer<T> {
 
        /**
         * <p>getEntity</p>
-        *
-        * @param <T> a T object.
-        * @return a T object.
         */
        T getEntity();
 
@@ -32,22 +28,16 @@ public interface IEntityContainer<T> {
 
        /**
         * <p>getEditableText</p>
-        *
-        * @return a {@link java.lang.String} object.
         */
        String getEditableText();
 
        /**
         * <p>getAttachedEntities</p>
-        *
-        * @return a {@link java.util.Set} object.
         */
        Set<T> getAttachedEntities();
 
        /**
         * <p>markAsMerged</p>
-        *
-        * @param mergeTarget a T object.
         */
        void markAsMerged(T mergeTarget);
 
@@ -86,8 +76,6 @@ public interface IEntityContainer<T> {
 
        /**
         * <p>setText</p>
-        *
-        * @param text a {@link java.lang.String} object.
         */
        void setText(String text);
 
index 4601d246c6a6d98e379b16fa7ded4710d4e5031a..f48ab36cf150203cbf8a30971ea58aaad6d9336a 100644 (file)
@@ -6,18 +6,15 @@
 * 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.annotatedlineeditor;
 
 import java.util.Map;
 
-
 /**
  * <p>IEntityCreator interface.</p>
  *
  * @author p.ciardelli
  * @created 03.07.2009
- * @version 1.0
  */
 public interface IEntityCreator<T> {
 
@@ -25,10 +22,9 @@ public interface IEntityCreator<T> {
         * <p>createEntity</p>
         *
         * @param text a {@link java.lang.String} object.
-        * @param <T> a T object.
         * @return a T object.
         */
-       T createEntity(String text);
+       public T createEntity(String text);
 
        /**
         * <p>createEntity</p>
@@ -37,7 +33,7 @@ public interface IEntityCreator<T> {
         * @param text a {@link java.lang.String} object.
         * @return a T object.
         */
-       T createEntity(Object key, String text);
+       public T createEntity(Object key, String text);
 
        /**
         * Get a map of keys for all objects that can be created by this entity creator
@@ -45,14 +41,12 @@ public interface IEntityCreator<T> {
         *
         * @return a {@link java.util.Map} object.
         */
-       Map<? extends Object, String> getKeyLabelPairs();
+       public Map<? extends Object, String> getKeyLabelPairs();
 
        /**
         * Return a flag indicating whether this creator also saves the entities
         *
         * @return true or false
         */
-       boolean savesEntity();
-
-
-}
+       public boolean savesEntity();
+}
\ No newline at end of file
index 4f058352884d2ed86ed523361c7f5aaeb7a3d394..73d43d55e7d8a5d2fe485d8653cad8fa72b97c6e 100644 (file)
@@ -6,13 +6,11 @@
 * 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.annotatedlineeditor;
 
 import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase;
 import eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException;
 
-
 /**
  * Performs the retrieving and saving of a list of entities edited by a <code>ListEditor</code>,
  * interacting with the persistence layer.
@@ -21,17 +19,14 @@ import eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableExcepti
  *
  * @author p.ciardelli
  * @created 07.07.2009
- * @version 1.0
  */
 public interface IEntityPersistenceService<T> {
 
        /**
         * <p>create</p>
-        *
-        * @param entity a {@link java.lang.Object} object.
         * @return a boolean.
         */
-       T create(T entity);
+       public T create(T entity);
 
        /**
         * <p>save</p>
@@ -39,7 +34,7 @@ public interface IEntityPersistenceService<T> {
         * @param entity a {@link java.lang.Object} object.
         * @return a boolean.
         */
-       T save(T entity);
+       public T save(T entity);
 
        /**
         * <p>merge</p>
@@ -48,7 +43,7 @@ public interface IEntityPersistenceService<T> {
         * @param mergeTarget a {@link java.lang.Object} object.
         * @return a boolean.
         */
-       boolean merge(T entity, T mergeTarget);
+       public boolean merge(T entity, T mergeTarget);
 
        /**
         * <p>delete</p>
@@ -57,5 +52,5 @@ public interface IEntityPersistenceService<T> {
         * @return a boolean.
         * @throws ReferencedObjectUndeletableException
         */
-       boolean delete(T entity, DeleteConfiguratorBase config) throws ReferencedObjectUndeletableException;
-}
+       public boolean delete(T entity, DeleteConfiguratorBase config) throws ReferencedObjectUndeletableException;
+}
\ No newline at end of file
index 9f05028976a19bf9aee5d290c4b031b0a0ca0a85..eed74188bf7ae0e0b9af700be5eabcd4933563e1 100644 (file)
@@ -6,7 +6,6 @@
 * 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.bulkeditor.command;
 
 import org.apache.log4j.Logger;
@@ -22,13 +21,11 @@ import eu.etaxonomy.taxeditor.bulkeditor.input.TaxonEditorInput;
 /**
  * @author p.ciardelli
  * @created 21.09.2009
- * @version 1.0
  */
 public class BulkEditorPropertyTester extends PropertyTester {
 
     @SuppressWarnings("unused")
-    private static final Logger logger = Logger
-                       .getLogger(BulkEditorPropertyTester.class);
+    private static final Logger logger = Logger.getLogger(BulkEditorPropertyTester.class);
 
        private static final String IS_MERGING_ENABLED = "isMergingEnabled";
 
@@ -68,4 +65,4 @@ public class BulkEditorPropertyTester extends PropertyTester {
         }
                return false;
        }
-}
+}
\ No newline at end of file
index 9dd79c2685e82127a0ec8af4a380b7f9c5bb3182..522fd932c0e1b92e7cdc71475e76061d8e8afe10 100644 (file)
@@ -6,7 +6,6 @@
 * 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.bulkeditor.e4;
 
 import java.io.File;
@@ -47,7 +46,6 @@ import eu.etaxonomy.taxeditor.workbench.WorkbenchUtility;
  * @author e.-m.lee
  * @author n.hoffmann
  * @created 17.08.2009
- * @version 1.0
  */
 public class BulkEditorSearchE4 {
 
@@ -67,7 +65,6 @@ public class BulkEditorSearchE4 {
 
        private Button btnManageState;
 
-
        public Object ORDER_BY = new Object();
 
        public BulkEditorSearchE4(BulkEditorE4Composite editor, Composite parent, int style) {
@@ -149,7 +146,6 @@ public class BulkEditorSearchE4 {
                }
        }
 
-
        /**
         * Creates the search textfield.
         */
@@ -223,4 +219,4 @@ public class BulkEditorSearchE4 {
                        text.setFocus();
                }
        }
-}
+}
\ No newline at end of file
index 912d00d3cf5c659b3eff668a8f362d70ee6a57ee..794b58642d354cbead4748f181c23ff3336fde45 100644 (file)
@@ -1,3 +1,11 @@
+/**
+* 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.bulkeditor.handler.defaultHandler;
 
 import org.eclipse.e4.ui.workbench.modeling.EPartService;
@@ -17,17 +25,11 @@ import eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenHandlerBaseE4
 
 public class OpenBulkEditorForIdentifiableEntityE4 extends DefaultOpenHandlerBaseE4<Object>{
 
-    /**
-     * {@inheritDoc}
-     */
 //    @Override
 //    protected IdentifiableEntity getEntity(UUID uuid) {
 //        return CdmStore.getCommonService().find(IdentifiableEntity.class, uuid);
 //    }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     protected void open(Object entity, Shell shell, EPartService partService) {
         @SuppressWarnings("rawtypes")
@@ -40,9 +42,6 @@ public class OpenBulkEditorForIdentifiableEntityE4 extends DefaultOpenHandlerBas
         BulkEditorUtil.openBulkEditor(input, modelService, partService, application);
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     protected boolean canExecute(Object entity) {
         if (entity instanceof UuidAndTitleCache){
index 747dc3df644b3d366599870eb49a169cda42dc6f..13c811b6f382cf300f573974acda1cd6edcacc66 100644 (file)
@@ -55,10 +55,9 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @created 25.06.2009
  */
 public abstract class AbstractBulkEditorInput<T extends CdmBase>
-        extends CdmEntitySessionInput
+        extends CdmEntitySessionInput<T>
         implements IEntityPersistenceService<T> {
 
-
     private static final String PROPERTY_PROTECTED_TITLECACHE = "Protect TitleCache";
     private static final String TYPE_PROPERTY = Messages.BulkEditorE4_TYPE;
     private static final String ID_PROPERTY = "Id"; //$NON-NLS-1$
@@ -91,12 +90,12 @@ public abstract class AbstractBulkEditorInput<T extends CdmBase>
            this.conversation = CdmStore.createConversation();
        }
 
-       static public AbstractBulkEditorInput NewInstance(BulkEditorInputType inputType) {
+       static public AbstractBulkEditorInput<?> NewInstance(BulkEditorInputType inputType) {
 
                return BulkEditorInputType.getInput(inputType);
        }
 
-       public static AbstractBulkEditorInput NewInstance(IdentifiableEntity entity) {
+       public static AbstractBulkEditorInput<?> NewInstance(IdentifiableEntity entity) {
 
                BulkEditorInputType inputType = BulkEditorInputType.getByType(entity.getClass());
 
@@ -107,7 +106,7 @@ public abstract class AbstractBulkEditorInput<T extends CdmBase>
                return editorInput;
        }
 
-       public static AbstractBulkEditorInput NewInstance(Class clazz, UUID uuid) {
+       public static AbstractBulkEditorInput<?> NewInstance(Class clazz, UUID uuid) {
 
         BulkEditorInputType inputType = BulkEditorInputType.getByType(clazz);
 
@@ -463,7 +462,6 @@ public abstract class AbstractBulkEditorInput<T extends CdmBase>
         return getModel();
     }
 
-
     @Override
     public Map<Object, List<String>> getPropertyPathsMap() {
         // TODO Auto-generated method stub
index d35b6b31447c43baee1a3e93b2d396c3e36e4458..d0248e045cffad43d2925dd4940b56e1b67fe847 100644 (file)
@@ -35,16 +35,12 @@ import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
-
 /**
  * @author p.ciardelli
  * @created 25.06.2009
- * @version 1.0
  */
 public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase> {
 
-       private static final long serialVersionUID = 3387950621617078479L;
-
        public static final String ID = "bulkeditor.input.author";
 
        private static AgentEditorInput instance;
index c1c7623bc621ee76bbefa32d9345f32bf194da43..1ea0722c7d0c19aa4471074f6a9a6695f4b20898 100644 (file)
@@ -6,7 +6,6 @@
 * 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.bulkeditor.input;
 
 import java.util.ArrayList;
@@ -39,7 +38,6 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 /**
  * @author n.hoffmann
  * @created Mar 9, 2011
- * @version 1.0
  */
 public class GroupEditorInput extends AbstractBulkEditorInput<Group> {
 
@@ -75,7 +73,6 @@ public class GroupEditorInput extends AbstractBulkEditorInput<Group> {
                    MessagingUtils.messageDialog(Messages.GROUP_CREATOR_Name_not_accepted, getClass(), Messages.GROUP_CREATOR_Name_not_accepted_message);
                    return null;
                }
-
        }
 
        @Override
@@ -142,6 +139,4 @@ public class GroupEditorInput extends AbstractBulkEditorInput<Group> {
     public void setSaveUserCandidates(Set<User> saveUserCandidates) {
         this.saveUserCandidates = saveUserCandidates;
     }
-
-
-}
+}
\ No newline at end of file
index f71a0e2ea9ab065bb621c112f7290faa111c126d..d63ea8629e2c9039833f55470e4881d70e575b3b 100644 (file)
@@ -1,3 +1,11 @@
+/**\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.bulkeditor.input;\r
 \r
 import java.util.ArrayList;\r
index 08465a8e2e183baf506fafee5950b0cc8078069a..589e7869e4cf9c930cf6330b9d6c98bb00a90e95 100644 (file)
@@ -6,7 +6,6 @@
 * 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.bulkeditor.input;
 
 import java.util.ArrayList;
@@ -30,7 +29,6 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 /**
  * @author n.hoffmann
  * @created Mar 9, 2011
- * @version 1.0
  */
 public class UserEditorInput extends AbstractBulkEditorInput<User> {
 
@@ -79,7 +77,6 @@ public class UserEditorInput extends AbstractBulkEditorInput<User> {
                return CdmStore.getSearchManager().findUsers(configurator);
        }
 
-
        @Override
        protected IEntityCreator<User> createEntityCreator() {
                return new UserCreator();
@@ -105,5 +102,4 @@ public class UserEditorInput extends AbstractBulkEditorInput<User> {
        public Comparator<User> getTitleComparator(){
         return new UserNameComparator();
     }
-
-}
+}
\ No newline at end of file
index 5f0d01cf20ad0124120472e5fadbd8df49f71220..26761d62024df9cdc359d487aa98bde454de60e1 100644 (file)
@@ -6,7 +6,6 @@
 * 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.bulkeditor.input.entitycreator;
 
 import java.util.HashMap;
@@ -28,23 +27,16 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 /**
  * @author n.hoffmann
  * @created Mar 9, 2011
- * @version 1.0
  */
 public class UserCreator  implements IEntityCreator<User>{
 
     public static final String USER = "User"; //$NON-NLS-1$
 
-    /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#createEntity(java.lang.String)
-        */
        @Override
        public User createEntity(String text) {
                return createEntity(null, text);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#createEntity(java.lang.Object, java.lang.String)
-        */
        @Override
        public User createEntity(Object key, String text) {
 
@@ -69,9 +61,6 @@ public class UserCreator  implements IEntityCreator<User>{
 
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#getKeyLabelPairs()
-        */
        @Override
        public Map<Object, String> getKeyLabelPairs() {
                Map<Object, String> result = new HashMap<Object, String>();
@@ -84,5 +73,4 @@ public class UserCreator  implements IEntityCreator<User>{
                // TODO Auto-generated method stub
                return false;
        }
-
-}
+}
\ No newline at end of file
index fd1219a69262d94544814a13d0e9bf0414139eeb..5b835bf3468a1aa0d6d85e3f5b3947d76b923704 100644 (file)
@@ -6,7 +6,6 @@
 * 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.bulkeditor.input.sortprovider;
 
 import java.util.Comparator;
@@ -18,7 +17,6 @@ import eu.etaxonomy.cdm.model.common.ICdmBase;
 /**
  * @author n.hoffmann
  * @created Dec 14, 2010
- * @version 1.0
  */
 public abstract class AbstractDateComparator<T extends ICdmBase> implements Comparator<T>{
 
index f0487bde5263002d4b7bcc1ec63df55c6575739d..edfb6f95db0c9cf342339757dcffe6c7d1c378a0 100644 (file)
@@ -6,7 +6,6 @@
 * 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.bulkeditor.input.sortprovider;
 
 import java.util.Comparator;
@@ -19,34 +18,23 @@ import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider;
 /**
  * @author n.hoffmann
  * @created Dec 14, 2010
- * @version 1.0
  */
 public class AbstractSortProvider<T> implements IBulkEditorSortProvider<T> {
 
-       Map<String, Comparator<T>> comparators = new HashMap<String, Comparator<T>>();
+       protected Map<String, Comparator<T>> comparators = new HashMap<>();
        
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider#getComparators()
-        */
        @Override
        public Map<String, Comparator<T>> getComparators() {
                return comparators;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider#getComparatorNames()
-        */
        @Override
        public Set<String> getComparatorNames() {
                return comparators.keySet();
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider#getComparatorByName(java.lang.String)
-        */
        @Override
        public Comparator<T> getComparatorByName(String name) {
                return comparators.get(name);
        }
-
-}
+}
\ No newline at end of file
index bae9767533388f9b33ab6ce7d92b96fd257a03db..5f0bd7145997953d1bd5bf7aef1fb2283f74e0c1 100644 (file)
@@ -6,7 +6,6 @@
 * 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.bulkeditor.input.sortprovider;
 
 import org.joda.time.DateTime;
@@ -16,26 +15,18 @@ import eu.etaxonomy.cdm.model.common.ICdmBase;
 /**
  * @author n.hoffmann
  * @created Dec 14, 2010
- * @version 1.0
  */
 public class CdmBaseSortProvider<T extends ICdmBase> extends AbstractSortProvider<T> {
 
-       /**
-        * 
-        */
        public CdmBaseSortProvider() {
                comparators.put("Created When", new CreatedDateComparator());
        }
        
        private class CreatedDateComparator extends AbstractDateComparator<T>{
 
-               /* (non-Javadoc)
-                * @see eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider.AbstractDateComparator#getDate(eu.etaxonomy.cdm.model.common.ICdmBase)
-                */
                @Override
                protected DateTime getDate(T object) {
                        return object.getCreated();
-               }
-               
+               }       
        }
-}
+}
\ No newline at end of file
index cdeeeba62a521daf242ea7e1d5a5cce4180a326b..b13e6d974149ea0d9cda3c2ed7599598db976bb3 100644 (file)
@@ -6,7 +6,6 @@
 * 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.bulkeditor.input.sortprovider;
 
 import eu.etaxonomy.cdm.model.common.IIdentifiableEntity;
@@ -14,12 +13,10 @@ import eu.etaxonomy.cdm.model.common.IIdentifiableEntity;
 /**
  * @author n.hoffmann
  * @created Dec 14, 2010
- * @version 1.0
  */
 public class IdentifiableEntitySortProvider<T extends IIdentifiableEntity> extends AbstractSortProvider<T> {
 
        public IdentifiableEntitySortProvider(){
                comparators.put("Title Cache", new TitleCacheComparator<T>());
        }
-       
-}
+}
\ No newline at end of file
index ebdc23b07969a5ee26300ce904b720f0eb777103..b9d0efefead09c20d4d78a739cf638a057fddfdd 100644 (file)
@@ -6,7 +6,6 @@
 * 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.bulkeditor.input.sortprovider;
 
 import java.util.Comparator;
@@ -17,13 +16,9 @@ import eu.etaxonomy.cdm.model.reference.Reference;
 /**
  * @author n.hoffmann
  * @created Dec 14, 2010
- * @version 1.0
  */
 public class ReferenceSortProvider extends AbstractSortProvider<Reference> {
 
-       /**
-        *
-        */
        public ReferenceSortProvider() {
                comparators.put("Type", new ReferenceTypeComparator());
                comparators.put("Year", new ReferenceYearComparator());
@@ -31,18 +26,11 @@ public class ReferenceSortProvider extends AbstractSortProvider<Reference> {
 
        private class ReferenceYearComparator implements Comparator<Reference> {
 
-               /**
-                * @param o1
-                * @return
-                */
                private String getYearString(Reference o) {
                        TimePeriod datePublished = o == null ? null : o.getDatePublished();
                        return datePublished == null? null : datePublished.toString();
                }
 
-               /* (non-Javadoc)
-                * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
-                */
                @Override
         public int compare(Reference o1, Reference o2) {
                        String yearString1 = getYearString(o1);
@@ -63,15 +51,11 @@ public class ReferenceSortProvider extends AbstractSortProvider<Reference> {
 
                        }
                        return returnVal;
-
                }
        }
 
        private class ReferenceTypeComparator implements Comparator<Reference> {
 
-               /* (non-Javadoc)
-                * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
-                */
                @Override
         public int compare(Reference o1, Reference o2) {
                        String typeString1 = o1.getClass().toString();
@@ -95,6 +79,4 @@ public class ReferenceSortProvider extends AbstractSortProvider<Reference> {
                        }
                }
        }
-
-
-}
+}
\ No newline at end of file
index be2e46c7c867f14f8a89b5851200c849ee6ab366..4dfb84a8cf9d1e5fee8c7d1f801e950bf42e0a2a 100644 (file)
@@ -1,3 +1,11 @@
+/**
+* Copyright (C) 2015 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.session;
 
 import java.util.Collection;
@@ -6,11 +14,11 @@ import java.util.Map;
 
 import eu.etaxonomy.cdm.model.common.CdmBase;
 
-public interface ICdmEntitySessionEnabled {
+public interface ICdmEntitySessionEnabled<T extends CdmBase> {
 
     public ICdmEntitySession getCdmEntitySession();
 
-    public <T extends CdmBase> Collection<T> getRootEntities();
+    public Collection<T> getRootEntities();
 
     public Map<Object, List<String>> getPropertyPathsMap();
 
index 38f9dacc96ed719dcd3283412daa7ce6f0f1af54..cd470efc8b799a742801445909b84abba94264fe 100644 (file)
@@ -89,8 +89,9 @@ import eu.etaxonomy.taxeditor.workbench.part.IE4SavablePart;
  * @since Nov 21, 2017
  *
  */
-public class DescriptiveDataSetEditor implements IE4SavablePart, IConversationEnabled, ICdmEntitySessionEnabled,
-IPartContentHasDetails, IPartContentHasSupplementalData, IDirtyMarkable, IDescriptiveDataSetEditor {
+public class DescriptiveDataSetEditor implements IE4SavablePart, IConversationEnabled, 
+               ICdmEntitySessionEnabled<DescriptiveDataSet>, IPartContentHasDetails, 
+               IPartContentHasSupplementalData, IDirtyMarkable, IDescriptiveDataSetEditor {
 
     private DescriptiveDataSetComposite composite;
 
index 167fdddea7500e3dffaadb65cfe30b4e05d30946..59ec521c504f549c8d6b1d19c4c52ebaf46cc055 100644 (file)
@@ -56,7 +56,8 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @date 12.12.2017
  *
  */
-public class DescriptiveDataSetNavigator implements IConversationEnabled, ICdmEntitySessionEnabled, IContextListener{
+public class DescriptiveDataSetNavigator 
+               implements IConversationEnabled, ICdmEntitySessionEnabled<DescriptiveDataSet>, IContextListener{
 
     private ListViewer viewer;
 
@@ -164,40 +165,25 @@ public class DescriptiveDataSetNavigator implements IConversationEnabled, ICdmEn
         refresh();
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void update(CdmDataChangeMap arg0) {
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public ICdmEntitySession getCdmEntitySession() {
         return cdmEntitySession;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
-    public <T extends CdmBase> Collection<T> getRootEntities() {
+    public Collection<DescriptiveDataSet> getRootEntities() {
         return null;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public Map<Object, List<String>> getPropertyPathsMap() {
         return null;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public ConversationHolder getConversationHolder() {
         return conversation;
@@ -229,25 +215,16 @@ public class DescriptiveDataSetNavigator implements IConversationEnabled, ICdmEn
         }
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void contextAboutToStop(IMemento memento, IProgressMonitor monitor) {
         // TODO Auto-generated method stub
 
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void contextStop(IMemento memento, IProgressMonitor monitor) {
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void contextStart(IMemento memento, IProgressMonitor monitor) {
         if(viewer!=null && viewer.getControl()!=null && !viewer.getControl().isDisposed()){
@@ -255,18 +232,11 @@ public class DescriptiveDataSetNavigator implements IConversationEnabled, ICdmEn
         }
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void contextRefresh(IProgressMonitor monitor) {
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void workbenchShutdown(IMemento memento, IProgressMonitor monitor) {
     }
-
-}
+}
\ No newline at end of file
index 5a1c9e5d8f6481053c683cd6ece8f3453b236132..59dadba17f0cfe468da359dd542f942afba77caa 100644 (file)
@@ -1,4 +1,3 @@
-// $Id$
 /**
 * Copyright (C) 2017 EDIT
 * European Distributed Institute of Taxonomy
@@ -112,10 +111,10 @@ import eu.etaxonomy.taxeditor.workbench.part.IE4ViewerPart;
  * Editor for combining structure and property terms to characters.
  * @author pplitzner
  * @date 24.05.2017
- *
  */
 public class CharacterEditor implements ICharacterEditor, IConversationEnabled, ISelectionChangedListener,
-        ModifyListener, IE4ViewerPart, IPartContentHasDetails, IPartContentHasSupplementalData, IDirtyMarkable, IE4SavablePart {
+        ModifyListener, IE4ViewerPart, IPartContentHasDetails, IPartContentHasSupplementalData, 
+        IDirtyMarkable, IE4SavablePart {
 
     private FeatureTreeDtoEditorComposite characterTreeEditorComposite;
     private final FormToolkit formToolkit = new FormToolkit(Display.getDefault());
index b9834db79754cd1d477f106485b6c0755b2200c1..8acf54d5e417aea8a1ccd01a73bd07b0a8be7664 100644 (file)
@@ -69,10 +69,10 @@ import eu.etaxonomy.taxeditor.workbench.part.IE4SavablePart;
  * Character matrix editor for editing specimen/taxon descriptions in a table
  * @author pplitzner
  * @since Nov 26, 2017
- *
  */
 public class CharacterMatrixPart implements IE4SavablePart, IConversationEnabled, IDirtyMarkable,
-ICdmEntitySessionEnabled, IPartContentHasSupplementalData, IPartContentHasDetails{
+               ICdmEntitySessionEnabled<DescriptiveDataSet>, IPartContentHasSupplementalData, 
+               IPartContentHasDetails {
 
     private static final List<String> WS_PROPERTY_PATH = Arrays.asList(new String[] {
             "descriptions", //$NON-NLS-1$
index 484468a317d82bd7010c1cb5e369b994e7ad8b6d..4f6b59aacc94ec45493043e7ab08c8f9772c6bfb 100644 (file)
@@ -6,7 +6,6 @@
  * 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.e4;
 
 import java.util.ArrayList;
@@ -61,12 +60,12 @@ import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
 
-
 /**
  * @author pplitzner
  * @date Aug 24, 2017
  */
-public class TaxonEditorInputE4  extends CdmEntitySessionInput implements IConversationEnabled {
+public class TaxonEditorInputE4  extends CdmEntitySessionInput<TaxonNode> 
+               implements IConversationEnabled {
 
     private static final String INCORRECT_STATE = Messages.TaxonEditorInput_INCORRECT_STATE;
 
index 4410ca481516ca1799481c8ee03423af050896ce..a6edaaa2832c1545e252109e4a61d7b020deb022 100644 (file)
@@ -26,10 +26,11 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  *
  * @author cmathew
  * @created Mar 28, 2013
- *
  */
-
-public class CdmAuthorityEditorInput extends CdmEntitySessionInput implements IConversationEnabled {
+public class CdmAuthorityEditorInput 
+               extends CdmEntitySessionInput<Group> 
+               implements IConversationEnabled {
+       
        private ConversationHolder conversation;
        private Group group;
 
@@ -60,28 +61,21 @@ public class CdmAuthorityEditorInput extends CdmEntitySessionInput implements IC
 
                return null;
        }
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostDataChangeObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap)
-        */
+
        @Override
        public void update(CdmDataChangeMap changeEvents) {
                // TODO Auto-generated method stub
-
        }
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder()
-        */
+
        @Override
        public ConversationHolder getConversationHolder() {
                return this.conversation;
        }
+       
        public String getName() {
                return group.getName();
        }
 
-       /* (non-Javadoc)
-        * @see java.lang.Object#equals(java.lang.Object)
-        */
        @Override
        public boolean equals(Object object) {
                if (object instanceof CdmAuthorityEditorInput
@@ -93,29 +87,17 @@ public class CdmAuthorityEditorInput extends CdmEntitySessionInput implements IC
                return super.equals(object);
        }
 
-       /**
-        * Getter method for group member.
-        *
-        * @return
-        */
        public Group getGroup() {
                return this.group;
        }
-
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
-     */
+       
     @Override
     public Collection<Group> getRootEntities() {
         return Arrays.asList(group);
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
-     */
     @Override
     public void merge() {
         group = CdmStore.getService(IGroupService.class).merge(group, true).getMergedEntity();
-
     }
-}
+}
\ No newline at end of file
index fa36d382f493269d7e55d4c3cfb0356fc9db42c9..bd28dd2e901dd22071e6f1a6ad63f9d430507637 100644 (file)
@@ -1,6 +1,11 @@
 /**
- *
- */
+* 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.key;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
@@ -11,7 +16,6 @@ import eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput;
 
 /**
  * @author n.hoffmann
- *
  */
 public abstract class AbstractIdentificationEditorInput<T extends IIdentificationKey>
                extends CdmEntitySessionInput implements IConversationEnabled {
@@ -34,14 +38,10 @@ public abstract class AbstractIdentificationEditorInput<T extends IIdentificatio
        public void update(CdmDataChangeMap changeEvents) {
        }
 
-       /* (non-Javadoc)
-        * @see java.lang.Object#equals(java.lang.Object)
-        */
        @Override
        public boolean equals(Object obj) {
                // TODO Auto-generated method stub
                boolean result = super.equals(obj);
                return result;
        }
-
-}
+}
\ No newline at end of file
index 8610264132be3f5e758686b67c72c2da6864428a..d0d30b43cd93ce2ae3dc49f588f17592710e4096 100644 (file)
@@ -1,6 +1,11 @@
 /**
- *
- */
+* 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.key.polytomous;
 
 import java.util.ArrayList;
@@ -18,7 +23,6 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
  * @author n.hoffmann
- *
  */
 public class PolytomousKeyEditorInput extends AbstractIdentificationEditorInput<PolytomousKey> {
 
@@ -42,7 +46,6 @@ public class PolytomousKeyEditorInput extends AbstractIdentificationEditorInput<
 //        this.name = name;
 //    }
 
-
     public static PolytomousKeyEditorInput NewInstance(UUID polytomousKeyUuid) throws Exception{
         try{
             ConversationHolder conversation = CdmStore.createConversation();
@@ -52,15 +55,11 @@ public class PolytomousKeyEditorInput extends AbstractIdentificationEditorInput<
         }
     }
 
-
     @Override
     public PolytomousKey getKey() {
         return key;
     }
 
-    /* (non-Javadoc)
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
     @Override
     public boolean equals(Object object) {
         if (object instanceof PolytomousKeyEditorInput
@@ -72,21 +71,14 @@ public class PolytomousKeyEditorInput extends AbstractIdentificationEditorInput<
         return super.equals(object);
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
-     */
     @Override
     public  List<PolytomousKey> getRootEntities() {
         return Arrays.asList(key);
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
-     */
     @Override
     public void merge() {
        key = CdmStore.getService(IPolytomousKeyService.class).merge(key,true).getMergedEntity();
-
     }
 
     @Override
@@ -99,5 +91,4 @@ public class PolytomousKeyEditorInput extends AbstractIdentificationEditorInput<
          propertyPathsMap.put("children", polytomousKeyNodePropertyPaths); //$NON-NLS-1$
          return propertyPathsMap;
     }
-
-}
+}
\ No newline at end of file
index 795b45df28fcb9b6a5e366c2cbdff4d1c61bb313..52712944e8a1fc9ab0fce4d5bd123577749f055b 100644 (file)
@@ -28,25 +28,23 @@ import eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
- *
  * @author a.oppermann
  * @date 25.04.2014
- *
  */
-public class ChecklistEditorInput extends CdmEntitySessionInput implements IPersistable {
+public class ChecklistEditorInput extends CdmEntitySessionInput<TaxonNode> implements IPersistable {
 
     /**
      * The selected classification
      */
     private TaxonNode taxonNode = null;
 
-    private List<TaxonBase> taxa = new ArrayList();
+    private List<TaxonBase> taxa = new ArrayList<>();
 
     private Classification classification = null;
 
     private final ConversationHolder conversation;
 
-    private List<TaxonBase> taxaToSave = new ArrayList();
+    private List<TaxonBase> taxaToSave = new ArrayList<>();
 
 
     /**
@@ -64,10 +62,6 @@ public class ChecklistEditorInput extends CdmEntitySessionInput implements IPers
 
     }
 
-
-    /**
-     * @param taxonNode2
-     */
     private void getChildTaxa(TaxonNode taxonNode2) {
        taxonNode2.removeNullValueFromChildren();
        if (taxonNode2.hasChildNodes()){
@@ -77,8 +71,6 @@ public class ChecklistEditorInput extends CdmEntitySessionInput implements IPers
                getChildTaxa(node);
            }
        }
-
-
     }
 
     /**
@@ -94,8 +86,6 @@ public class ChecklistEditorInput extends CdmEntitySessionInput implements IPers
 
     }
 
-
-
     public List<TaxonBase> getTaxa() {
                return taxa;
        }
@@ -108,33 +98,18 @@ public class ChecklistEditorInput extends CdmEntitySessionInput implements IPers
         }
     }
 
-
-    /**
-     * @return the taxonNode
-     */
     public TaxonNode getTaxonNode() {
         return taxonNode;
     }
 
-    /**
-     * @return classification
-     */
     public Classification getClassification(){
        return classification;
     }
 
-//    /**
-//     * @return the conversationHolder
-//     */
 //    public ConversationHolder getConversationHolder() {
 //        return conversationHolder;
 //    }
 
-
-
-//    /* (non-Javadoc)
-//     * @see java.lang.Object#hashCode()
-//     */
 //    @Override
 //    public int hashCode() {
 //        final int prime = 31;
@@ -144,9 +119,6 @@ public class ChecklistEditorInput extends CdmEntitySessionInput implements IPers
 //        return result;
 //    }
 
-    /* (non-Javadoc)
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
     @Override
     public boolean equals(Object obj) {
         if (this == obj) {
@@ -176,9 +148,6 @@ public class ChecklistEditorInput extends CdmEntitySessionInput implements IPers
         return true;
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.IPersistable#saveState(org.eclipse.ui.IMemento)
-     */
     @Override
     public void saveState(IMemento memento) {
         UUID uuid = classification.getUuid();
@@ -192,17 +161,11 @@ public class ChecklistEditorInput extends CdmEntitySessionInput implements IPers
         CdmStore.getService(ITaxonService.class).merge(taxaToSave, true);
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
-     */
     @Override
     public List<TaxonNode> getRootEntities() {
         return Arrays.asList(taxonNode);
     }
 
-    /**
-     * @return the conversation
-     */
     public ConversationHolder getConversation() {
         return conversation;
     }
@@ -231,13 +194,11 @@ public class ChecklistEditorInput extends CdmEntitySessionInput implements IPers
         return taxonBasePropertyPaths;
     }
 
-
        public void setTaxa(List<TaxonBase> taxonList) {
                this.taxa = taxonList;
 
        }
 
-
     /**
      * @param element
      */
@@ -254,4 +215,4 @@ public class ChecklistEditorInput extends CdmEntitySessionInput implements IPers
 //     super.dispose();
 //    }
 
-}
+}
\ No newline at end of file
index 62a3ce57eaf8c27b8f737b3d2313e22bd23e0ec4..5250c0910f67425cb65f61ceabddbd331aae6dd2 100755 (executable)
@@ -63,7 +63,8 @@ import eu.etaxonomy.taxeditor.workbench.part.IE4SavablePart;
  *
  */
 public class DistributionEditorPart implements IE4SavablePart, IConversationEnabled, IDirtyMarkable,
-ICdmEntitySessionEnabled, IPartContentHasSupplementalData, IPartContentHasDetails, IDistributionEditorPart{
+               ICdmEntitySessionEnabled<DescriptionBase>, IPartContentHasSupplementalData, IPartContentHasDetails, 
+               IDistributionEditorPart {
 
     private static final List<String> TAXONNODE_PROPERTY_PATH = Arrays.asList(new String[] {
             "taxon", //$NON-NLS-1$
@@ -175,14 +176,11 @@ ICdmEntitySessionEnabled, IPartContentHasSupplementalData, IPartContentHasDetail
         return editor;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void update(CdmDataChangeMap changeEvents) {
         // TODO Auto-generated method stub
-
     }
+    
     @PreDestroy
     public void dispose(){
         if (conversation != null) {
@@ -194,16 +192,10 @@ ICdmEntitySessionEnabled, IPartContentHasSupplementalData, IPartContentHasDetail
             cdmEntitySession = null;
         }
         dirty.setDirty(false);
-
     }
 
-
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public ICdmEntitySession getCdmEntitySession() {
-
         return cdmEntitySession;
     }
 
@@ -215,45 +207,29 @@ ICdmEntitySessionEnabled, IPartContentHasSupplementalData, IPartContentHasDetail
         return rootEntities;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public Map<Object, List<String>> getPropertyPathsMap() {
         // TODO Auto-generated method stub
         return null;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void changed(Object element) {
         if (element != null){
             dirty.setDirty(true);
         }
-
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void forceDirty() {
         // TODO Auto-generated method stub
-
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public ConversationHolder getConversationHolder() {
-
         return conversation;
     }
 
-
     @Persist
     @Override
     public void save(IProgressMonitor monitor) {
@@ -262,9 +238,9 @@ ICdmEntitySessionEnabled, IPartContentHasSupplementalData, IPartContentHasDetail
     }
 
     protected void saveDistributions() {
-        Set<TaxonDistributionDTO> coll = new HashSet();
+        Set<TaxonDistributionDTO> coll = new HashSet<>();
         editor.getDescriptionsToSave().forEach(dto->coll.add(dto));
-        Set<TaxonDistributionDTO> removeList = new HashSet();
+        Set<TaxonDistributionDTO> removeList = new HashSet<>();
         for (TaxonDistributionDTO dto: coll){
             Taxon taxon = null;
             for(TaxonDescription desc: dto.getDescriptionsWrapper().getDescriptions()){
@@ -291,9 +267,6 @@ ICdmEntitySessionEnabled, IPartContentHasSupplementalData, IPartContentHasDetail
         editor.getDescriptionsToSave().clear();
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public boolean isDirty() {
         return this.dirty.isDirty();
@@ -302,8 +275,4 @@ ICdmEntitySessionEnabled, IPartContentHasSupplementalData, IPartContentHasDetail
     public void setDirty() {
         this.dirty.setDirty(true);
     }
-
-
-
-
-}
+}
\ No newline at end of file
index ce054a3b5f24355516fee31850e3c7ade44d33da..67afd01052ac6c63840f39311fd26ed958515fc7 100644 (file)
@@ -1,3 +1,11 @@
+/**
+* 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.derivate;
 
 import java.util.ArrayList;
@@ -93,10 +101,9 @@ import eu.etaxonomy.taxeditor.workbench.part.IE4SavablePart;
 
 /**
  * Displays the derivate hierarchy of the specimen specified in the editor input.
- *
  */
 public class DerivateView implements IPartContentHasFactualData, IConversationEnabled,
-        ICdmEntitySessionEnabled, IDirtyMarkable, IPostOperationEnabled, IPartContentHasDetails, IPartContentHasSupplementalData, IPartContentHasMedia,
+        ICdmEntitySessionEnabled<SpecimenOrObservationBase<?>>, IDirtyMarkable, IPostOperationEnabled, IPartContentHasDetails, IPartContentHasSupplementalData, IPartContentHasMedia,
         IContextListener, IE4SavablePart, ICollapsableExpandable {
 
     private static final String SPECIMEN_EDITOR = Messages.DerivateView_SPECIMEN_EDITOR;
@@ -181,9 +188,6 @@ public class DerivateView implements IPartContentHasFactualData, IConversationEn
     public DerivateView() {
     }
 
-    /**
-     * {@inheritDoc}
-     */
     public void init(DerivateViewEditorInput editorInput){
         this.derivateToRootEntityMap = new HashMap<>();
         this.rootElements = new HashSet<>();
@@ -292,13 +296,12 @@ public class DerivateView implements IPartContentHasFactualData, IConversationEn
         }
     }
 
-
     public void updateRootEntities(List<SpecimenOrObservationBase> derivates) {
         if(derivates!=null){
             eventBroker.post(WorkbenchEventConstants.CURRENT_ACTIVE_EDITOR, null);
             this.derivateToRootEntityMap = new HashMap<>();
             this.rootElements = new HashSet<>();
-            for (SpecimenOrObservationBase derivate : derivates) {
+            for (SpecimenOrObservationBase<?> derivate : derivates) {
 
                 if(derivate instanceof FieldUnit){
                     derivateToRootEntityMap.put(derivate, derivate);
@@ -320,15 +323,14 @@ public class DerivateView implements IPartContentHasFactualData, IConversationEn
         labelProvider.updateLabelCache(rootElements);
         viewer.setInput(rootElements);
         viewer.setComparator(new ViewerComparator() {
-               @Override
-               @SuppressWarnings("unchecked")
-               public int compare(Viewer testViewer, Object e1, Object e2) {
-                       if (((TreeNode)e1).getValue() instanceof SpecimenOrObservationBase){
-                               return ((SpecimenOrObservationBase)((TreeNode)e1).getValue()).getTitleCache().compareTo(((SpecimenOrObservationBase)((TreeNode)e2).getValue()).getTitleCache());
-                       }else{
-                               return e1.toString().compareTo(e2.toString());
-                       }
-                       //return (((SpecimenOrObservationBase) e1).getTitleCache()).compareTo(((SpecimenOrObservationBase) e2).getTitleCache());
+               @Override
+            public int compare(Viewer testViewer, Object e1, Object e2) {
+                       if (((TreeNode)e1).getValue() instanceof SpecimenOrObservationBase){
+                               return ((SpecimenOrObservationBase)((TreeNode)e1).getValue()).getTitleCache().compareTo(((SpecimenOrObservationBase)((TreeNode)e2).getValue()).getTitleCache());
+                       }else{
+                               return e1.toString().compareTo(e2.toString());
+                       }
+                       //return (((SpecimenOrObservationBase) e1).getTitleCache()).compareTo(((SpecimenOrObservationBase) e2).getTitleCache());
                }
        });
 
@@ -513,7 +515,7 @@ public class DerivateView implements IPartContentHasFactualData, IConversationEn
             obj = ((TreeNode)obj).getValue();
         }
         rootElements.remove(obj);
-        Object o = this.derivateToRootEntityMap.remove(obj);
+        this.derivateToRootEntityMap.remove(obj);
         viewer.setInput(rootElements);
     }
 
@@ -594,7 +596,7 @@ public class DerivateView implements IPartContentHasFactualData, IConversationEn
             else if(selection != null){
                 Object selectedElement = selection.getFirstElement();
                 if(selectedElement instanceof TaxonNodeDto){
-                    TaxonBase taxonBase = CdmStore.getService(ITaxonService.class).load(((TaxonNodeDto)selectedElement).getTaxonUuid());
+                    TaxonBase<?> taxonBase = CdmStore.getService(ITaxonService.class).load(((TaxonNodeDto)selectedElement).getTaxonUuid());
                     if(HibernateProxyHelper.isInstanceOf(taxonBase, Taxon.class)){
                         selectedTaxon = HibernateProxyHelper.deproxy(taxonBase, Taxon.class);
                     }
@@ -609,7 +611,7 @@ public class DerivateView implements IPartContentHasFactualData, IConversationEn
             if(selectedTaxon!=null){
                 Collection<SpecimenOrObservationBase> fieldUnits = CdmStore.getService(IOccurrenceService.class).listFieldUnitsByAssociatedTaxon(selectedTaxon, null, null);
                 Collection<UUID> uuids = new HashSet<>();
-                for (SpecimenOrObservationBase specimenOrObservationBase : fieldUnits) {
+                for (SpecimenOrObservationBase<?> specimenOrObservationBase : fieldUnits) {
                     uuids.add(specimenOrObservationBase.getUuid());
                 }
                 checkWarnThreshold(uuids);
@@ -634,9 +636,6 @@ public class DerivateView implements IPartContentHasFactualData, IConversationEn
         return viewer;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public List<SpecimenOrObservationBase<?>> getRootEntities() {
         return new ArrayList<>(rootElements);
@@ -658,16 +657,10 @@ public class DerivateView implements IPartContentHasFactualData, IConversationEn
         return listenToSelectionChange;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void contextAboutToStop(IMemento memento, IProgressMonitor monitor) {
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void contextStop(IMemento memento, IProgressMonitor monitor) {
         //close view when workbench closes
@@ -678,29 +671,19 @@ public class DerivateView implements IPartContentHasFactualData, IConversationEn
             //nothing
         }
     }
-
-    /**
-     * {@inheritDoc}
-     */
+    
     @Override
     public void contextStart(IMemento memento, IProgressMonitor monitor) {
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void contextRefresh(IProgressMonitor monitor) {
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void workbenchShutdown(IMemento memento, IProgressMonitor monitor) {
     }
 
-
     @Override
     public boolean isDirty() {
         return dirty.isDirty();
@@ -715,5 +698,4 @@ public class DerivateView implements IPartContentHasFactualData, IConversationEn
     public void expand() {
         viewer.expandAll();
     }
-
-}
+}
\ No newline at end of file
index 0407f5bb288c820749d03204afaf7bb8b3014332..33dee1f4b7c83fda5f2364a15773804d8250a7ec 100644 (file)
@@ -1,4 +1,3 @@
-// $Id$
 /**
 * Copyright (C) 2017 EDIT
 * European Distributed Institute of Taxonomy
@@ -73,14 +72,14 @@ import eu.etaxonomy.taxeditor.workbench.part.ICollapsableExpandable;
  * @date 15.08.2017
  */
 public class FactualDataPartE4 extends AbstractCdmEditorPartE4
-        implements IPartContentHasDetails, IPartContentHasSupplementalData, ICdmEntitySessionEnabled,
-        ICollapsableExpandable {
+        implements IPartContentHasDetails, IPartContentHasSupplementalData, 
+               ICdmEntitySessionEnabled<CdmBase>, ICollapsableExpandable {
 
     /**
      * Maps {@link FeatureNodeContainerTree} to their corresponding {@link TaxonDescritpion}.<br>
      * This serves as input for the {@link ITreeContentProvider} of the {@link TreeViewer}
      */
-    protected Map<DescriptionBase<?>, FeatureNodeContainerTree> featureNodeContainerCache = new HashMap<DescriptionBase<?>, FeatureNodeContainerTree>();
+    protected Map<DescriptionBase<?>, FeatureNodeContainerTree> featureNodeContainerCache = new HashMap<>();
 
     protected int dndOperations = DND.DROP_COPY | DND.DROP_MOVE;
 
@@ -273,13 +272,13 @@ public class FactualDataPartE4 extends AbstractCdmEditorPartE4
     @Override
     public ICdmEntitySession getCdmEntitySession() {
         if(selectionProvidingPart != null && selectionProvidingPart instanceof ICdmEntitySessionEnabled) {
-            return ((ICdmEntitySessionEnabled) selectionProvidingPart).getCdmEntitySession();
+            return ((ICdmEntitySessionEnabled<?>) selectionProvidingPart).getCdmEntitySession();
         }
         return null;
     }
 
     @Override
-    public  List<? extends CdmBase> getRootEntities() {
+    public  List<CdmBase> getRootEntities() {
         return Arrays.asList((CdmBase)getViewer().getInput());
     }
     @Override
@@ -300,7 +299,4 @@ public class FactualDataPartE4 extends AbstractCdmEditorPartE4
             ((TreeViewer)this.viewer).setExpandedElements(expandedObjects);
         }
     }
-
-
-
 }
\ No newline at end of file
index dd85ee44cb44504c7151eec2598677495b84e30a..4076b6ba2b852ffb4ca8183c86ef499a6351423b 100644 (file)
@@ -30,10 +30,8 @@ import eu.etaxonomy.taxeditor.editor.view.uses.UsesLabelProvider;
 
 
 /**
- *
  * @author pplitzner
  * @since Sep 8, 2017
- *
  */
 public class UsesViewPartE4 extends FactualDataPartE4 {
 
@@ -60,8 +58,6 @@ public class UsesViewPartE4 extends FactualDataPartE4 {
         treeViewer.addDropSupport(dndOperations, transfers,
                 dropListener);
 
-
-
         // Propagate selection from viewer
         selectionChangedListener = (event -> selService.setSelection(event.getSelection()));
         treeViewer.addSelectionChangedListener(selectionChangedListener);
@@ -77,11 +73,9 @@ public class UsesViewPartE4 extends FactualDataPartE4 {
         return Messages.UsesViewPart_VIEWER_NAME;
     }
 
-    /** {@inheritDoc} */
     @Override
     public boolean postOperation(Object objectAffectedByOperation) {
         viewer.refresh();
         return super.postOperation(objectAffectedByOperation);
     }
-
-}
+}
\ No newline at end of file
index 76c26380d137634780944d7067ce24d572851791..bde5da9c940036f1c03790d2a2c2d24d15539e11 100644 (file)
@@ -22,7 +22,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @author Ben Stöver
  * @date 04.08.2014
  */
-public class AlignmentEditorInput extends CdmEntitySessionInput {
+public class AlignmentEditorInput extends CdmEntitySessionInput<Sequence> {
 
     private final UUID sequenceNodeUuid;
     private Sequence sequenceNode;
@@ -78,7 +78,7 @@ public class AlignmentEditorInput extends CdmEntitySessionInput {
            this.sequenceNode = sequenceNode;
        }
 
-    @Override
+       @Override
     public List<Sequence> getRootEntities() {
         return Arrays.asList(sequenceNode);
     }
index 1b37170eb317d78154830cd44afc7aa3de495720..f3ade0f40e85d1820cb6787c7105b0d7c3d39381 100644 (file)
@@ -1,6 +1,11 @@
 /**
- *
- */
+* 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.navigation.key.polytomous.e4;
 
 import java.util.List;
@@ -62,14 +67,12 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 
 /**
- *
  * @author pplitzner
  * @since Sep 28, 2017
- *
  */
 public class PolytomousKeyViewPartE4 implements
-IConversationEnabled, ICdmEntitySessionEnabled, IPostOperationEnabled,
-ICdmChangeListener {
+               IConversationEnabled, ICdmEntitySessionEnabled<PolytomousKey>, IPostOperationEnabled,
+               ICdmChangeListener {
 
     private class FilterModifyListener implements ModifyListener{
         @Override
@@ -96,7 +99,6 @@ ICdmChangeListener {
         }
     }
 
-
     public static final String ID = "eu.etaxonomy.taxeditor.navigation.key.polytomous.polytomousKeyViewPart"; //$NON-NLS-1$
 
     public static final String OPEN_COMMAND_ID = "eu.etaxonomy.taxeditor.navigation.key.polytomous.editNodes"; //$NON-NLS-1$
@@ -175,8 +177,6 @@ ICdmChangeListener {
             }
         });
 
-
-
         //propagate selection
         selectionChangedListener = (event -> selService.setSelection(event.getSelection()));
         viewer.addSelectionChangedListener(selectionChangedListener);
@@ -302,12 +302,10 @@ ICdmChangeListener {
         if(event.getAction() == Action.Delete && PolytomousKey.class.equals(event.getEntityType())) {
             refresh();
         }
-
     }
 
     @Override
     public Map<Object, List<String>> getPropertyPathsMap() {
         return null;
     }
-
-}
+}
\ No newline at end of file
index 07ac8d69c12bf29d5accd2744fa5c524ff4965a4..c9e0bfa075f3368fd4eb50b2bad5f63165272b7d 100644 (file)
@@ -101,10 +101,8 @@ import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 import eu.etaxonomy.taxeditor.workbench.part.ICollapsableExpandable;
 
 /**
- *
  * @author pplitzner
  * @since Sep 7, 2017
- *
  */
 public class TaxonNavigatorE4 implements
                IPostOperationEnabled, IConversationEnabled, Observer,
@@ -604,25 +602,16 @@ public class TaxonNavigatorE4 implements
         return propertyPathsMap;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void contextAboutToStop(IMemento memento, IProgressMonitor monitor) {
         // TODO Auto-generated method stub
 
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void contextStop(IMemento memento, IProgressMonitor monitor) {
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void contextStart(IMemento memento, IProgressMonitor monitor) {
         if(viewer!=null && viewer.getControl()!=null && !viewer.getControl().isDisposed()){
@@ -630,17 +619,11 @@ public class TaxonNavigatorE4 implements
         }
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void contextRefresh(IProgressMonitor monitor) {
 //        viewer.refresh();
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void workbenchShutdown(IMemento memento, IProgressMonitor monitor) {
     }
index 45b3c7c713a10e7c7ef6070c959b0e5df03ab631..11268ed260e2d2c2a7a1bcc9494ef2caba172f34 100644 (file)
@@ -11,6 +11,7 @@ package eu.etaxonomy.taxeditor.editor;
 import java.util.List;
 import java.util.Map;
 
+import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
 import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -19,7 +20,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @author cmathew
  * @date 5 Feb 2015
  */
-public abstract class CdmEntitySessionInput implements ICdmEntitySessionEnabled {
+public abstract class CdmEntitySessionInput<T extends CdmBase> implements ICdmEntitySessionEnabled<T> {
 
     private ICdmEntitySession cdmEntitySession;
 
index 5719511193797bef00baaf62b24e23a56d703268..31bcef73587fc30a3d7d251cdb82b6b052f47380 100644 (file)
@@ -16,21 +16,12 @@ import eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput;
 /**\r
  * @author l.morris\r
  * @date 3 Jan 2012\r
- *\r
  */\r
 public abstract class AbstractDefinedTermEditorInput<T extends DefinedTermBase> extends CdmEntitySessionInput {\r
 \r
-       /**\r
-        *\r
-        */\r
        public AbstractDefinedTermEditorInput() {\r
                super(true);\r
        }\r
 \r
-       /**\r
-        * @return\r
-        */\r
        public abstract List<String> getTermClasses();\r
-\r
-\r
-}
+}
\ No newline at end of file
index 8c9887a050c92c8601fec79c8cf08367790713ec..1f01db1ea8c7b3c1344815123ad0e46d38fe1583 100644 (file)
@@ -26,12 +26,9 @@ import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.TermStore;
 
-
-
 /**
  * @author n.hoffmann
  * @date Jan 24, 2012
- *
  */
 public class TermEditorInput extends AbstractDefinedTermEditorInput<DefinedTerm> {
 
@@ -49,7 +46,7 @@ public class TermEditorInput extends AbstractDefinedTermEditorInput<DefinedTerm>
 
        public TermEditorInput(TermType termType) {
                this.termType = termType;
-               vocabularies = new HashSet<TermVocabularyDto>();
+               vocabularies = new HashSet<>();
                initialiseVocabularies();
        }
        public String getName() {
@@ -134,25 +131,17 @@ public class TermEditorInput extends AbstractDefinedTermEditorInput<DefinedTerm>
 //            defaultNameFeatureTree = TermTree.NewInstance(nameFeatures);
         }
         return defaultNameFeatureTree;
-
     }
 
     public static void resetDefaultNameFeatureTree(){
         defaultNameFeatureTree = null;
     }
 
-    /**
-     * @return
-     */
     public static TermTree<?> getPreferredNameFeatureTree(boolean createNew) {
-
         return PreferencesUtil.getPreferredFeatureTreeForNameDescription(createNew);
-
     }
 
     public static TermTree<?> getPreferredTaxonFeatureTree(boolean createNew) {
-
         return PreferencesUtil.getPreferredFeatureTreeForTaxonDescription(createNew);
-
     }
 }
index 5503471fafe9d92f596e683287a1279c0944cdcb..0d04772b5e4ba609223da71cb98f710756393950 100755 (executable)
@@ -17,5 +17,4 @@ import eu.etaxonomy.cdm.model.description.Character;
  */
 public interface ICharacterEditor extends ITermTreeEditor<Character> {
 
-
 }
index 34ed36a0fb78d4b927a47bb6f2e2125ba3721fb9..d2e0c690a5c69a49aa4ee9b2ccf887c833a2b111 100644 (file)
@@ -26,7 +26,8 @@ import eu.etaxonomy.taxeditor.workbench.part.IE4SavablePart;
  * @author pplitzner
  * @since Nov 22, 2018
  */
-public interface ITermTreeEditor<T extends DefinedTermBase> extends IPostOperationEnabled, IE4SavablePart, ICdmEntitySessionEnabled {
+public interface ITermTreeEditor<T extends DefinedTermBase> 
+               extends IPostOperationEnabled, IE4SavablePart, ICdmEntitySessionEnabled {
 
     public TermType getTermType();
 
@@ -43,6 +44,4 @@ public interface ITermTreeEditor<T extends DefinedTermBase> extends IPostOperati
 
     public TreeViewer getViewer();
     public void refresh();
-
-
-}
+}
\ No newline at end of file
index ccdbb0a7d5a4aad41bfaf138fb3f69cd42e10237..d046120463166193eb8b0e40e3b2d6d82a697d7d 100644 (file)
@@ -85,9 +85,10 @@ import eu.etaxonomy.taxeditor.workbench.part.IE4ViewerPart;
  * @date 06.06.2017
  *
  */
-public class TermTreeEditor<T extends DefinedTermBase> implements ITermTreeEditor, ISelectionChangedListener,
-        IE4ViewerPart, IPartContentHasDetails, IPartContentHasSupplementalData,
-        IContextListener, IConversationEnabled, IDirtyMarkable {
+public class TermTreeEditor<T extends DefinedTermBase> 
+               implements ITermTreeEditor, ISelectionChangedListener,
+               IE4ViewerPart, IPartContentHasDetails, IPartContentHasSupplementalData,
+               IContextListener, IConversationEnabled, IDirtyMarkable {
 
     public static final List<String> TREE_PROPERTY_PATH = Arrays.asList(new String[] {
             "root", //$NON-NLS-1$
index 8ccac28ac11022976831d98b4fd7f129f4cdf1f8..69a7ee6b25ed7dedf492d4b273f272d3a8679359 100644 (file)
@@ -14,7 +14,7 @@ public interface ITaxonBaseDetailSection{
         *
         * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.
         */
-       public abstract void setTaxonBase(TaxonBase taxon);
+       public abstract void setTaxonBase(TaxonBase<?> taxon);
 
-       public abstract TaxonBase getTaxonBase();
+       public abstract TaxonBase<?> getTaxonBase();
 }
index aa492df7b91d93ec5dba26ebd3ac31b4aca872f4..550e8d50ebf7dc1d7fa535b66608f0587482c925 100644 (file)
@@ -26,9 +26,10 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 /**
  * @author k.luther
  * @date 23.03.2016
- *
  */
-public class EditTaxonNodeWizard extends AbstractEditWizard<TaxonNode> implements ICdmEntitySessionEnabled{
+public class EditTaxonNodeWizard 
+               extends AbstractEditWizard<TaxonNode> 
+               implements ICdmEntitySessionEnabled<TaxonNode>{
 
     private TaxonNodeWizardPage taxonNodePage;
     private IWizardPageListener wizardPageListener;
@@ -41,17 +42,11 @@ public class EditTaxonNodeWizard extends AbstractEditWizard<TaxonNode> implement
 //        conversation = CdmStore.createConversation();
 //    }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.ui.section.classification.AbstractEditWizard#getEntityName()
-     */
     @Override
     protected String getEntityName() {
         return "taxon node";
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.ui.section.classification.AbstractEditWizard#saveEntity()
-     */
     @Override
     protected void saveEntity() {
         getConversationHolder().bind();
@@ -74,9 +69,6 @@ public class EditTaxonNodeWizard extends AbstractEditWizard<TaxonNode> implement
         this.wizardPageListener = wizardPageListener;
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard#setEntity(java.lang.Object)
-     */
     @Override
     public void setEntity(TaxonNode entity) {
         setWindowTitle(String.format("Edit %s", getEntityName()));
@@ -89,26 +81,16 @@ public class EditTaxonNodeWizard extends AbstractEditWizard<TaxonNode> implement
         super.setEntity(entity);
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public ICdmEntitySession getCdmEntitySession() {
-
         return cdmEntitySession;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public Collection<TaxonNode> getRootEntities() {
         return Collections.singleton(this.getEntity());
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public Map<Object, List<String>> getPropertyPathsMap() {
         // TODO Auto-generated method stub
@@ -120,8 +102,4 @@ public class EditTaxonNodeWizard extends AbstractEditWizard<TaxonNode> implement
         cdmEntitySession.dispose();
         super.dispose();
     }
-
-
-
-
-}
+}
\ No newline at end of file
index c16c00729e265e2439b66e8082601d7e75d7a1a6..c3b352a5490bf825ce0d07958b52e3f5a7866082 100644 (file)
@@ -6,7 +6,6 @@
 * 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;
 
 import org.eclipse.jface.viewers.ISelectionProvider;
@@ -27,9 +26,11 @@ import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
  * @author n.hoffmann
  * @created 05.06.2009
  */
-public class NameDetailSection extends AbstractCdmDetailSection<INonViralName> implements ITaxonBaseDetailSection{
+public class NameDetailSection 
+               extends AbstractCdmDetailSection<INonViralName> 
+               implements ITaxonBaseDetailSection{
 
-       private TaxonBase taxonBase;
+       private TaxonBase<?> taxonBase;
 
        /**
         * <p>Constructor for NameDetailSection.</p>
@@ -45,7 +46,6 @@ public class NameDetailSection extends AbstractCdmDetailSection<INonViralName> i
                super(cdmFormFactory, conversation, parentElement, selectionProvider, style);
        }
 
-       /** {@inheritDoc} */
        @Override
     public void setTaxonBase(TaxonBase entity) {
                this.taxonBase = entity;
@@ -53,13 +53,11 @@ public class NameDetailSection extends AbstractCdmDetailSection<INonViralName> i
                setEntity(name);
        }
 
-       /** {@inheritDoc} */
        @Override
        public String getHeading() {
                return "Scientific Name";
        }
 
-       /** {@inheritDoc} */
        @Override
        protected void setSectionTitle() {
                if(!isDisposed()){
@@ -72,7 +70,7 @@ public class NameDetailSection extends AbstractCdmDetailSection<INonViralName> i
        }
 
        @Override
-       public TaxonBase getTaxonBase() {
+       public TaxonBase<?> getTaxonBase() {
                return taxonBase;
        }
 
index 2a1e846d1cd13032826a72f2dea2c61e39193360..0479bff0d48ddcdb247937d712a34bb3264e6cbb 100644 (file)
@@ -6,7 +6,6 @@
  * 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 java.util.Collections;
@@ -65,14 +64,13 @@ import eu.etaxonomy.taxeditor.ui.section.user.UserDetailWizardPage;
 /**
  * @author n.hoffmann
  * @created Jun 1, 2010
- * @version 1.0
  */
 public class EditFromSelectionWizard extends Wizard implements
-               SelectionListener, ICdmEntitySessionEnabled {
+               SelectionListener, ICdmEntitySessionEnabled<CdmBase> {
 
     private ICdmEntitySession cdmEntitySession;
     private ICdmEntitySession previousCdmEntitySession;
-       private final EntitySelectionElement selectionElement;
+       private final EntitySelectionElement<CdmBase> selectionElement;
        private CdmBase rootElement;
 
        public EditFromSelectionWizard(EntitySelectionElement selectionElement) {
@@ -85,7 +83,6 @@ public class EditFromSelectionWizard extends Wizard implements
                this.setWindowTitle(String.format("Edit %s", TextHelper.deproxyClassName(selectionElement.getEntity().getClass())));
        }
 
-       /** {@inheritDoc} */
        @Override
        public void addPages() {
 
@@ -179,10 +176,8 @@ public class EditFromSelectionWizard extends Wizard implements
                        MessagingUtils.warningDialog("Missing interface", this,
                                        "No detail element for current selection");
                }
-
        }
 
-       /** {@inheritDoc} */
        @Override
        public boolean performFinish() {
            IService<CdmBase> service = CdmStore.getService(rootElement);
@@ -199,7 +194,6 @@ public class EditFromSelectionWizard extends Wizard implements
                return true;
        }
 
-       /** {@inheritDoc} */
        @Override
        public void widgetSelected(SelectionEvent e) {
                WizardDialog dialog = new WizardDialog(selectionElement.getShell(),
@@ -209,7 +203,6 @@ public class EditFromSelectionWizard extends Wizard implements
                }
        }
 
-       /** {@inheritDoc} */
        @Override
        public void widgetDefaultSelected(SelectionEvent e) {
        }
index 2e974d144e4141b4bc43573a9f82cf3a5aceda37..97d622099e1c35d464d1fadd036ed71be238adc1 100644 (file)
@@ -1,5 +1,10 @@
 /**\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.ui.selection;\r
 \r
@@ -55,7 +60,6 @@ import eu.etaxonomy.taxeditor.ui.section.grantedAuthority.GrantedAuthorityLabelT
 /**\r
  * @author n.hoffmann\r
  * @created Nov 17, 2009\r
- * @version 1.0\r
  * @param <T>\r
  */\r
 public class EntitySelectionElement<T extends CdmBase> extends\r
index 3bbc184f893c9d37054a3ceb843075f2d3ec8377..788b3507cf01b0597c9d4a8f52fb552c6fcb6741 100644 (file)
@@ -6,7 +6,6 @@
  * 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.view.detail;
 
 import java.util.EventObject;
@@ -50,7 +49,6 @@ import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonDetailSection;
  *
  * @author n.hoffmann
  * @created Feb 8, 2010
- * @version 1.0
  */
 public class CdmSectionPart<T> extends SectionPart implements
                IPropertyChangeListener {
@@ -81,7 +79,6 @@ public class CdmSectionPart<T> extends SectionPart implements
                formSection = section;
        }
 
-       /** {@inheritDoc} */
        @Override
        public boolean setFormInput(Object input) {
            this.rootInput = input;
@@ -96,7 +93,7 @@ public class CdmSectionPart<T> extends SectionPart implements
                if ((input instanceof TaxonBase)
                                && (formSection instanceof ITaxonBaseDetailSection)) {
                        ((ITaxonBaseDetailSection) formSection)
-                                       .setTaxonBase((TaxonBase) input);
+                                       .setTaxonBase((TaxonBase<?>) input);
                        return true;
                }
                else if (input.getClass().equals(DerivedUnit.class)
@@ -174,20 +171,11 @@ public class CdmSectionPart<T> extends SectionPart implements
 //        return true;
 //    }
 
-
                formSection.setEntity((T) input);
 
                return true;
        }
 
-       /*
-        * (non-Javadoc)
-        *
-        * @see
-        * org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse
-        * .jface.util.PropertyChangeEvent)
-        */
-       /** {@inheritDoc} */
        @Override
        public void propertyChange(PropertyChangeEvent event) {
                if (event != null) {
@@ -222,5 +210,4 @@ public class CdmSectionPart<T> extends SectionPart implements
            super.expansionStateChanged(expanded);
            PreferencesUtil.setStringValue(StoreUtil.getPrefKey(formSection.getClass(), rootInput.getClass().getCanonicalName()), expanded?EXPANDED:COLLAPSED);
        }
-
-}
+}
\ No newline at end of file
index 14e654915a441c15fc6c9d164dacfe89e3f83f0b..1bab66967d43dea093442eeb1978c184312812db 100644 (file)
@@ -62,14 +62,15 @@ import eu.etaxonomy.taxeditor.workbench.part.ISelectionElementEditingPart;
 public abstract class AbstractCdmEditorPartE4
         implements IConversationEnabled, IDirtyMarkable, ISelectionElementEditingPart, IPostOperationEnabled{
 
-    private DelaySelection delaySelection = null;
+       private static final Logger logger = Logger.getLogger(AbstractCdmEditorPartE4.class);
+
+       private DelaySelection delaySelection = null;
     /**
      * This is the monitor for the DelaySelection runnable.
      * If it is <code>true</code> then it is currently delaying a selection.
      */
     private boolean isInDelay;
     private boolean isEnabled = true;
-    private static final Logger logger = Logger.getLogger(AbstractCdmEditorPartE4.class);
 
     /**
      * This class invokes internal_selectionChanged() in a separate thread.
index 965c36730f2f4039abf6a5a86b94b63ba398e821..c74cebf40a087e762bb8e49b2326ef95d12e0a15 100644 (file)
@@ -13,7 +13,7 @@ import eu.etaxonomy.cdm.api.application.ICdmChangeListener;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 
 public class MockSessionOwner<T extends CdmBase> 
-               implements ICdmEntitySessionEnabled, ICdmChangeListener {
+               implements ICdmEntitySessionEnabled<T>, ICdmChangeListener {
 
     private static final Logger logger = Logger.getLogger(MockSessionOwner.class);
 
@@ -69,9 +69,7 @@ public class MockSessionOwner<T extends CdmBase>
     public Set<? extends CdmBase> getEventUpdatedObjects() {
         return eventUpdatedObjects;
     }
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.cdm.api.application.ICdmChangeListener#onChange(eu.etaxonomy.cdm.api.application.CdmChangeEvent)
-     */
+
     @Override
     public void onChange(CdmChangeEvent event) {
         eventUpdatedObjects = event.getChangedObjects();
@@ -83,13 +81,9 @@ public class MockSessionOwner<T extends CdmBase>
 
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getPropertyPathsMap()
-     */
     @Override
     public Map<Object, List<String>> getPropertyPathsMap() {
         // TODO Auto-generated method stub
         return null;
     }
-
-}
+}
\ No newline at end of file