ref #5974 Remove synonym relationships (rename synRelType to synRel and others)
authorAndreas Müller <a.mueller@bgbm.org>
Thu, 13 Oct 2016 12:09:23 +0000 (14:09 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Thu, 10 Nov 2016 12:50:42 +0000 (13:50 +0100)
22 files changed:
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeHomotypicGroupOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeSynonymToMisapplicationOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteSynonymOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/SwapSynonymAndAcceptedOperation.java
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeSynonymToConceptOperationTest.java
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeSynonymToMisapplicationOperationTest.java
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/CreateSynonymInExisitingHomotypicalGroupOperationTest.java
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteSynonymOperationTest.java
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/SwapSynonymAndAcceptedOperationTest.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/IterableSynonymyList.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DescriptionHelper.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/AbstractEntityCollectionElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/SynonymRelationshipDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/SynonymRelationshipDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/SynonymRelationshipWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/SynonymRelationshipWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailElement.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/AbstractLazyInitializerTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/PropertyPathsTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/RemoteLazyLoadingTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/TaxonNameEditorTest.java

index 86dfa56..3f9fd97 100644 (file)
@@ -19,7 +19,7 @@ import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
+import eu.etaxonomy.cdm.model.taxon.SynonymType;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
@@ -92,9 +92,9 @@ public class ChangeHomotypicGroupOperation extends AbstractPostTaxonOperation {
                                acc.removeSynonym(synonym);
                        }
                        
-                       SynonymRelationshipType type = SynonymRelationshipType.HETEROTYPIC_SYNONYM_OF();
+                       SynonymType type = SynonymType.HETEROTYPIC_SYNONYM_OF();
                        if(newHomotypicalGroup.getTypifiedNames().contains(element.getName())){
-                               type = SynonymRelationshipType.HOMOTYPIC_SYNONYM_OF();
+                               type = SynonymType.HOMOTYPIC_SYNONYM_OF();
                        }
 
                        element.addSynonym(synonym, type);
index 2360cef..8a7b354 100644 (file)
@@ -19,7 +19,7 @@ import org.eclipse.core.runtime.IStatus;
 
 import eu.etaxonomy.cdm.api.service.ITaxonService;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
+import eu.etaxonomy.cdm.model.taxon.SynonymType;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
 import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
@@ -38,7 +38,7 @@ public class ChangeSynonymToMisapplicationOperation extends AbstractPostTaxonOpe
 
        private final Synonym synonym;
        private Taxon misapplication;
-       private Set<SynonymRelationshipType> synonymTypes;
+       private Set<SynonymType> synonymTypes;
 
        /**
         * <p>Constructor for ChangeSynonymToMisapplicationOperation.</p>
@@ -69,7 +69,7 @@ public class ChangeSynonymToMisapplicationOperation extends AbstractPostTaxonOpe
                CdmStore.getService(ITaxonService.class).saveOrUpdate(misapplication);
                monitor.worked(20);
 
-               // store synonymRelationshipType for later undo operations
+               // store SynonymType for later undo operations
                synonymTypes = synonym.getRelationType(element);
 
                // remove synonym from taxon
@@ -113,7 +113,7 @@ public class ChangeSynonymToMisapplicationOperation extends AbstractPostTaxonOpe
                element.removeTaxon(misapplication, TaxonRelationshipType.MISAPPLIED_NAME_FOR());
 
                // add synonym to taxon
-               for (SynonymRelationshipType synonymType : synonymTypes){
+               for (SynonymType synonymType : synonymTypes){
                        element.addSynonym(synonym, synonymType);
                }
 
index 33a7c08..f33faf7 100644 (file)
@@ -21,7 +21,7 @@ import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
 import eu.etaxonomy.cdm.api.service.DeleteResult;
 import eu.etaxonomy.cdm.api.service.ITaxonService;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
+import eu.etaxonomy.cdm.model.taxon.SynonymType;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
 import eu.etaxonomy.taxeditor.model.DeleteResultMessagingUtils;
@@ -38,7 +38,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 public class DeleteSynonymOperation extends AbstractPostTaxonOperation {
 
        private final Synonym synonym;
-       private SynonymRelationshipType synonymType;
+       private SynonymType synonymType;
 
        /**
         * <p>Constructor for DeleteSynonymOperation.</p>
@@ -60,7 +60,7 @@ public class DeleteSynonymOperation extends AbstractPostTaxonOperation {
        public IStatus execute(IProgressMonitor monitor, IAdaptable info)
                        throws ExecutionException {
 
-               // Store synonymRelationshipType for later undo operations
+               // Store SynonymType for later undo operations
                synonymType = synonym.getType();
                monitor.worked(20);
 
index 507b2cf..f39e1ac 100644 (file)
@@ -19,7 +19,7 @@ import org.eclipse.core.runtime.IStatus;
 import eu.etaxonomy.cdm.api.service.ITaxonService;
 import eu.etaxonomy.cdm.api.service.UpdateResult;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
+import eu.etaxonomy.cdm.model.taxon.SynonymType;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
@@ -32,13 +32,12 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  *
  * @author n.hoffmann
  * @created 23.04.2009
- * @version 1.0
  */
 public class SwapSynonymAndAcceptedOperation extends AbstractPostTaxonOperation {
 
        private final Synonym synonym;
        // TODO store the old relationship for undo reasons
-       private SynonymRelationshipType synonymRelationshipType;
+       private SynonymType synonymType;
 
        /**
         * <p>Constructor for SwapSynonymAndAcceptedOperation.</p>
@@ -57,9 +56,6 @@ public class SwapSynonymAndAcceptedOperation extends AbstractPostTaxonOperation
                this.synonym = synonym;
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
-        */
        /** {@inheritDoc} */
        @Override
        public IStatus execute(IProgressMonitor monitor, IAdaptable info)
@@ -74,9 +70,6 @@ public class SwapSynonymAndAcceptedOperation extends AbstractPostTaxonOperation
                return postExecute(element);
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
-        */
        /** {@inheritDoc} */
        @Override
        public IStatus redo(IProgressMonitor monitor, IAdaptable info)
@@ -85,9 +78,6 @@ public class SwapSynonymAndAcceptedOperation extends AbstractPostTaxonOperation
                return execute(monitor, info);
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
-        */
        /** {@inheritDoc} */
        @Override
        public IStatus undo(IProgressMonitor monitor, IAdaptable info)
index 096c61a..e4605b6 100644 (file)
 
 package eu.etaxonomy.taxeditor.editor.name.operation;
 
-import junit.framework.Assert;
-
 import org.apache.log4j.Logger;
 import org.eclipse.core.commands.ExecutionException;
+import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
 import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
+import eu.etaxonomy.cdm.model.taxon.SynonymType;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
@@ -51,7 +50,7 @@ public class ChangeSynonymToConceptOperationTest extends AbstractTaxeditorOperat
                synonym = Synonym.NewInstance(NonViralName.NewInstance(null), null);
                taxonRelationshipType = TaxonRelationshipType.CONTRADICTION();
                
-               taxon.addSynonym(synonym, SynonymRelationshipType.SYNONYM_OF());
+               taxon.addSynonym(synonym, SynonymType.SYNONYM_OF());
                
                operation = new ChangeSynonymToConceptOperation("Change Synonym To Concept", null, taxon, synonym, taxonRelationshipType, postOperation);
        }
index 9416926..f7a17d2 100644 (file)
@@ -19,9 +19,8 @@ import org.junit.Test;
 import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
+import eu.etaxonomy.cdm.model.taxon.SynonymType;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.taxeditor.editor.name.operation.ChangeSynonymToMisapplicationOperation;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.store.operations.AbstractTaxeditorOperationTestBase;
 
@@ -40,7 +39,7 @@ public class ChangeSynonymToMisapplicationOperationTest extends AbstractTaxedito
 
        private static AbstractPostOperation operation;
 
-       private static SynonymRelationshipType synonymRelationshipType;
+       private static SynonymType synonymType;
        
        /**
         * @throws java.lang.Exception
@@ -49,8 +48,8 @@ public class ChangeSynonymToMisapplicationOperationTest extends AbstractTaxedito
        public static void setUpBeforeClass() throws Exception {
                taxon = Taxon.NewInstance(null, null);
                synonym = Synonym.NewInstance(NonViralName.NewInstance(null), null);
-               synonymRelationshipType = SynonymRelationshipType.SYNONYM_OF();
-               taxon.addSynonym(synonym, synonymRelationshipType);
+               synonymType = SynonymType.SYNONYM_OF();
+               taxon.addSynonym(synonym, synonymType);
                
                operation = new ChangeSynonymToMisapplicationOperation("Change Synonym To Misapplication", null, taxon, synonym, postOperation);
        }
@@ -79,7 +78,7 @@ public class ChangeSynonymToMisapplicationOperationTest extends AbstractTaxedito
                Assert.assertTrue("Taxon should have synonyms.", taxon.getSynonyms().size() > 0);
                Assert.assertTrue("Taxon should not have taxon relationship.", taxon.getTaxonRelations().size() == 0);
                Assert.assertEquals("Not the expected synonym.", synonym, taxon.getSynonyms().toArray(new Synonym[0])[0]);
-               Assert.assertEquals("SynonymRelationshipType is not the expected.", synonymRelationshipType, taxon.getSynonyms().iterator().next().getType());
+               Assert.assertEquals("SynonymRelationshipType is not the expected.", synonymType, taxon.getSynonyms().iterator().next().getType());
        }
        
        /**
index 04f3d24..be30eb5 100644 (file)
@@ -17,7 +17,7 @@ import org.junit.Test;
 
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
 import eu.etaxonomy.cdm.model.name.NonViralName;
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
+import eu.etaxonomy.cdm.model.taxon.SynonymType;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.store.operations.AbstractTaxeditorOperationTestBase;
 
@@ -81,7 +81,7 @@ public class CreateSynonymInExisitingHomotypicalGroupOperationTest extends Abstr
 
                Assert.assertTrue("Taxon should have a synonym now.", taxon.getSynonyms().size() > 0);
                Assert.assertTrue("Taxon should have a homotypic group", taxon.getHomotypicSynonymyGroups().size() > 0);
-               Assert.assertEquals("Synonym relationship should be heterotypic", SynonymRelationshipType.HETEROTYPIC_SYNONYM_OF(), taxon.getSynonyms().iterator().next().getType());
+               Assert.assertEquals("Synonym relationship should be heterotypic", SynonymType.HETEROTYPIC_SYNONYM_OF(), taxon.getSynonyms().iterator().next().getType());
        }
 
 
@@ -139,7 +139,7 @@ public class CreateSynonymInExisitingHomotypicalGroupOperationTest extends Abstr
 
                Assert.assertTrue("Taxon should have a synonym now.", taxon.getSynonyms().size() > 0);
                Assert.assertTrue("Taxon should have a homotypic group", taxon.getHomotypicSynonymyGroups().size() > 0);
-               Assert.assertEquals("Synonym relationship should be heterotypic", SynonymRelationshipType.HETEROTYPIC_SYNONYM_OF(), taxon.getSynonyms().iterator().next().getType());
+               Assert.assertEquals("Synonym relationship should be heterotypic", SynonymType.HETEROTYPIC_SYNONYM_OF(), taxon.getSynonyms().iterator().next().getType());
 
        }
 }
index 19e794c..c38f85a 100644 (file)
@@ -17,23 +17,22 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 import eu.etaxonomy.cdm.model.taxon.Synonym;
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
+import eu.etaxonomy.cdm.model.taxon.SynonymType;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.taxeditor.editor.name.operation.DeleteSynonymOperation;
 import eu.etaxonomy.taxeditor.store.operations.AbstractTaxeditorOperationTestBase;
 
 /**
  * @author n.hoffmann
  * @created 08.04.2009
- * @version 1.0
  */
 public class DeleteSynonymOperationTest extends AbstractTaxeditorOperationTestBase{
+       @SuppressWarnings("unused")
        private static final Logger logger = Logger
                        .getLogger(DeleteSynonymOperationTest.class);
 
        private static Synonym synonym;
 
-       private static SynonymRelationshipType synonymRelationshipType;
+       private static SynonymType synonymRelationshipType;
        
        /**
         * @throws java.lang.Exception
@@ -42,7 +41,7 @@ public class DeleteSynonymOperationTest extends AbstractTaxeditorOperationTestBa
        public static void setUpBeforeClass() throws Exception {
                taxon = Taxon.NewInstance(null, null);
                synonym = Synonym.NewInstance(null, null);
-               synonymRelationshipType = SynonymRelationshipType.SYNONYM_OF();
+               synonymRelationshipType = SynonymType.SYNONYM_OF();
                
                taxon.addSynonym(synonym, synonymRelationshipType);
                
index c165a82..36a8581 100644 (file)
@@ -21,7 +21,7 @@ import eu.etaxonomy.cdm.model.description.TaxonDescription;
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
+import eu.etaxonomy.cdm.model.taxon.SynonymType;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
@@ -30,7 +30,6 @@ import eu.etaxonomy.taxeditor.store.operations.AbstractTaxeditorOperationTestBas
 /**
  * @author n.hoffmann
  * @created 02.04.2009
- * @version 1.0
  */
 public class SwapSynonymAndAcceptedOperationTest extends AbstractTaxeditorOperationTestBase {
        private static final Logger logger = Logger
@@ -96,7 +95,7 @@ public class SwapSynonymAndAcceptedOperationTest extends AbstractTaxeditorOperat
 //             oldTaxon.addS .addHeterotypicSynonym(oldHeterotypicSynonym, null, null);
                heteroypicalGroup = HomotypicalGroup.NewInstance();
                heteroypicalGroup.addTypifiedName(oldHeterotypicSynonym.getName());
-               taxon.addSynonym(oldHeterotypicSynonym, SynonymRelationshipType.HETEROTYPIC_SYNONYM_OF());
+               taxon.addSynonym(oldHeterotypicSynonym, SynonymType.HETEROTYPIC_SYNONYM_OF());
 
                // Create a misapplication
                misapplication = Taxon.NewInstance(NonViralName.NewInstance(null), null);
index 93d10e7..cbd9453 100644 (file)
@@ -66,7 +66,7 @@ public class IterableSynonymyList implements Iterable<TaxonBase> {
                                for (Synonym synonym : homotypicSynonyms) {
 
                                        // Make sure synonym belongs to the taxon
-                                       if (synonym.getAcceptedTaxa().contains(taxon)) {
+                                       if (synonym.getAcceptedTaxon() != null && synonym.getAcceptedTaxon().equals(taxon)) {
                                                synonymyList.add(synonym);
                                        }
                                }
@@ -82,7 +82,7 @@ public class IterableSynonymyList implements Iterable<TaxonBase> {
                                        for (Synonym synonym : heterotypicSynonyms) {
 
                                                // Make sure synonym belongs to the taxon
-                                               if (synonym.getAcceptedTaxa().contains(taxon)) {
+                                               if (synonym.getAcceptedTaxon() != null && synonym.getAcceptedTaxon().equals(taxon)) {
                                                        synonymyList.add(synonym);
                                                }
                                        }
index e3f3ad5..9a2d86a 100644 (file)
@@ -64,7 +64,6 @@ import eu.etaxonomy.cdm.model.name.TypeDesignationStatusBase;
 import eu.etaxonomy.cdm.model.occurrence.DeterminationEvent;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.model.taxon.Classification;
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
@@ -377,10 +376,7 @@ public class DescriptionHelper {
                RelationshipTermBase<?> type = rel.getType();
                IdentifiableEntity<?> from;
                IdentifiableEntity<?> to;
-               if (rel.isInstanceOf(SynonymRelationship.class)){
-                       from = ((SynonymRelationship)rel).getSynonym();
-                       to = ((SynonymRelationship)rel).getAcceptedTaxon();
-               }else if (rel.isInstanceOf(NameRelationship.class)){
+               if (rel.isInstanceOf(NameRelationship.class)){
                        from = ((NameRelationship)rel).getFromName();
                        to = ((NameRelationship)rel).getToName();
                }else if (rel.isInstanceOf(HybridRelationship.class)){
index 98dd0fc..5d7f945 100644 (file)
@@ -101,7 +101,6 @@ import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
 import eu.etaxonomy.cdm.model.occurrence.DeterminationEvent;
 import eu.etaxonomy.cdm.model.reference.Reference;
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.cdm.model.taxon.TaxonNodeAgentRelation;
@@ -206,8 +205,6 @@ import eu.etaxonomy.taxeditor.ui.section.name.NonViralNameDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.name.ProtologueElement;
 import eu.etaxonomy.taxeditor.ui.section.name.ProtologueSection;
 import eu.etaxonomy.taxeditor.ui.section.name.SpecimenTypeDesignationElement;
-import eu.etaxonomy.taxeditor.ui.section.name.SynonymRelationshipDetailElement;
-import eu.etaxonomy.taxeditor.ui.section.name.SynonymRelationshipDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.name.TypeDesignationSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.CollectingAreasDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.CollectionDetailElement;
@@ -2368,12 +2365,6 @@ public class CdmFormFactory extends FormToolkit {
         return section;
     }
 
-    public SynonymRelationshipDetailSection createSynonymRelationshipDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
-        SynonymRelationshipDetailSection section = new SynonymRelationshipDetailSection(this, conversation, parentElement, style);
-        addAndAdaptSection(parentElement, section);
-        return section;
-    }
-
     public ProtologueSection createProtologueSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
         ProtologueSection section = new ProtologueSection(this, conversation, parentElement, style);
         addAndAdaptSection(parentElement, section);
@@ -2591,7 +2582,7 @@ public class CdmFormFactory extends FormToolkit {
         } else if (entity instanceof ImageFile) {
             element = new ImageFileElement(this, parentElement, (ImageFile) entity, removeListener, style);
         } else if (entity instanceof MediaRepresentationPart) {
-            element = new MediaRepresentationPartElement(this, parentElement, (MediaRepresentationPart) entity,
+            element = new MediaRepresentationPartElement<>(this, parentElement, (MediaRepresentationPart) entity,
                     removeListener, style);
         } else if (entity instanceof NomenclaturalStatus) {
             element = new NomenclaturalStatusElement(this, parentElement, (NomenclaturalStatus) entity, removeListener,
@@ -2641,9 +2632,6 @@ public class CdmFormFactory extends FormToolkit {
         } else if (entity instanceof NameRelationship) {
             element = new NameRelationshipDetailElement(this, parentElement, (NameRelationship) entity, removeListener,
                     style);
-        } else if (entity instanceof SynonymRelationship) {
-            element = new SynonymRelationshipDetailElement(this, parentElement, (SynonymRelationship) entity, removeListener,
-                    style);
         } else if (entity instanceof SpecimenTypeDesignation) {
             if(parentElement instanceof DerivedUnitTypeDesignationSection){
                 element = new DerivedUnitTypeDesignationElement(this, parentElement, (SpecimenTypeDesignation) entity,
index efffb13..52d0434 100644 (file)
@@ -41,7 +41,6 @@ import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
  *
  * @author n.hoffmann
  * @created Nov 16, 2009
- * @version 1.0
  */
 public abstract class AbstractEntityCollectionElement<ENTITY> extends
                AbstractCdmFormElement implements IEntityElement<ENTITY>,
index 81fcb04..ce60b9f 100644 (file)
-// $Id$
-/**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.taxeditor.ui.section.name;
-
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Color;
-
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
-import eu.etaxonomy.taxeditor.model.MessagingUtils;
-import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
-import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.element.LabelElement;
-import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractReferencedEntityElement;
-import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
-
-/**
- * @author pplitzner
- * @date 28.01.2014
- *
- */
-public class SynonymRelationshipDetailElement extends AbstractReferencedEntityElement<SynonymRelationship>{
-
-    private TextWithLabelElement text_ruleConsidered;
-    private LabelElement label;
-    private EntitySelectionElement selection_toName;
-    private TermComboElement<SynonymRelationshipType> combo_relationshipType;
-    private CheckboxElement checkProParte;
-    private CheckboxElement checkPartial;
-
-    /**
-     * <p>Constructor for NameRelationshipDetailElement.</p>
-     *
-     * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
-     * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
-     * @param entity a {@link eu.etaxonomy.cdm.model.name.NameRelationship} object.
-     * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
-     * @param style a int.
-     */
-    public SynonymRelationshipDetailElement(CdmFormFactory cdmFormFactory,
-            AbstractFormSection formElement,
-            SynonymRelationship entity, SelectionListener removeListener, int style) {
-        super(cdmFormFactory, formElement, entity, removeListener, style);
-    }
-
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.forms.entitysections.AbstractEntitySetElementComposite#createControls(org.eclipse.swt.widgets.Composite, int)
-     */
-    /** {@inheritDoc} */
-    @Override
-    public void createControls(ICdmFormElement element, int style) {
-        label = formFactory.createLabel(element, null);
-        checkProParte = formFactory.createCheckbox(element, "Pro Parte Synonym", null, style);
-        checkPartial= formFactory.createCheckbox(element, "Partial Synonym", null, style);
-        super.createControls(element, style);
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setEntity(SynonymRelationship entity) {
-        String text = entity.getSynonym().getTitleCache() + " is " + entity.getType().getLabel() + " " + entity.getAcceptedTaxon().getTitleCache();
-
-        label.setText(text);
-
-        checkPartial.setSelection(entity.isPartial());
-        checkProParte.setSelection(entity.isProParte());
-
-        super.setEntity(entity);
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void handleEvent(Object eventSource) {
-        if(eventSource == combo_relationshipType){
-            getEntity().setType(combo_relationshipType.getSelection());
-        }
-        else if(eventSource == selection_toName){
-            MessagingUtils.error(getClass(), "No API call available.", null);
-        }
-        else if(eventSource == checkPartial){
-            getEntity().setPartial(checkPartial.getSelection());
-        }
-        else if(eventSource == checkProParte){
-            getEntity().setProParte(checkProParte.getSelection());
-        }
-        else if(eventSource == selection_reference){
-            getEntity().setCitation(selection_reference.getSelection());
-        }
-        else if(eventSource == text_referenceDetail){
-            getEntity().setCitationMicroReference(text_referenceDetail.getText());
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setBackground(Color color) {
-        if(label != null) {
-            label.setBackground(color);
-        }
-        super.setBackground(color);
-    }
-
-}
+//// $Id$
+///**
+//* Copyright (C) 2014 EDIT
+//* European Distributed Institute of Taxonomy
+//* http://www.e-taxonomy.eu
+//*
+//* The contents of this file are subject to the Mozilla Public License Version 1.1
+//* See LICENSE.TXT at the top of this package for the full license terms.
+//*/
+//package eu.etaxonomy.taxeditor.ui.section.name;
+//
+//import org.eclipse.swt.events.SelectionListener;
+//import org.eclipse.swt.graphics.Color;
+//
+//import eu.etaxonomy.cdm.model.name.NameRelationship;
+//import eu.etaxonomy.cdm.model.taxon.Synonym;
+//import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
+//import eu.etaxonomy.taxeditor.model.MessagingUtils;
+//import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+//import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+//import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+//import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+//import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+//import eu.etaxonomy.taxeditor.ui.element.LabelElement;
+//import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+//import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractReferencedEntityElement;
+//import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
+//
+///**
+// * @author pplitzner
+// * @date 28.01.2014
+// *
+// */
+//public class SynonymRelationshipDetailElement extends AbstractReferencedEntityElement<Synonym>{
+//
+//    private TextWithLabelElement text_ruleConsidered;
+//    private LabelElement label;
+//    private EntitySelectionElement selection_toName;
+//    private TermComboElement<SynonymRelationshipType> combo_relationshipType;
+//    private CheckboxElement checkProParte;
+//    private CheckboxElement checkPartial;
+//
+//    /**
+//     * <p>Constructor for NameRelationshipDetailElement.</p>
+//     *
+//     * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+//     * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
+//     * @param entity a {@link eu.etaxonomy.cdm.model.name.NameRelationship} object.
+//     * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
+//     * @param style a int.
+//     */
+//    public SynonymRelationshipDetailElement(CdmFormFactory cdmFormFactory,
+//            AbstractFormSection formElement,
+//            Synonym entity, SelectionListener removeListener, int style) {
+//        super(cdmFormFactory, formElement, entity, removeListener, style);
+//    }
+//
+//    /* (non-Javadoc)
+//     * @see eu.etaxonomy.taxeditor.forms.entitysections.AbstractEntitySetElementComposite#createControls(org.eclipse.swt.widgets.Composite, int)
+//     */
+//    /** {@inheritDoc} */
+//    @Override
+//    public void createControls(ICdmFormElement element, int style) {
+//        label = formFactory.createLabel(element, null);
+//        checkProParte = formFactory.createCheckbox(element, "Pro Parte Synonym", null, style);
+//        checkPartial= formFactory.createCheckbox(element, "Partial Synonym", null, style);
+//        super.createControls(element, style);
+//    }
+//
+//    /** {@inheritDoc} */
+//    @Override
+//    public void setEntity(Synonym entity) {
+//        String text = entity.getTitleCache() + " is " + entity.getType().getLabel() + " " + entity.getAcceptedTaxon().getTitleCache();
+//
+//        label.setText(text);
+//
+//        checkPartial.setSelection(entity.isPartial());
+//        checkProParte.setSelection(entity.isProParte());
+//
+//        super.setEntity(entity);
+//    }
+//
+//    /** {@inheritDoc} */
+//    @Override
+//    public void handleEvent(Object eventSource) {
+//        if(eventSource == combo_relationshipType){
+//            getEntity().setType(combo_relationshipType.getSelection());
+//        }
+//        else if(eventSource == selection_toName){
+//            MessagingUtils.error(getClass(), "No API call available.", null);
+//        }
+//        else if(eventSource == checkPartial){
+//            getEntity().setPartial(checkPartial.getSelection());
+//        }
+//        else if(eventSource == checkProParte){
+//            getEntity().setProParte(checkProParte.getSelection());
+//        }
+//        else if(eventSource == selection_reference){
+//            getEntity().setSec(selection_reference.getSelection());
+//        }
+//        else if(eventSource == text_referenceDetail){
+//            getEntity().setSecMicroReference(text_referenceDetail.getText());
+//        }
+//    }
+//
+//    /** {@inheritDoc} */
+//    @Override
+//    public void setBackground(Color color) {
+//        if(label != null) {
+//            label.setBackground(color);
+//        }
+//        super.setBackground(color);
+//    }
+//
+//}
index 5b0d212..cefc22a 100644 (file)
@@ -1,92 +1,90 @@
-// $Id$
-/**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.taxeditor.ui.section.name;
-
-import java.util.Collection;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.wizard.WizardDialog;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.taxon.Synonym;
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
-import eu.etaxonomy.taxeditor.model.AbstractUtility;
-import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
-
-/**
- * @author pplitzner
- * @date 27.01.2014
- *
- */
-public class SynonymRelationshipDetailSection extends AbstractEntityCollectionSection<Synonym, SynonymRelationship> {
-
-    /**
-     * <p>Constructor for NameRelationshipDetailSection.</p>
-     *
-     * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
-     * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-     * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
-     * @param style a int.
-     */
-    public SynonymRelationshipDetailSection(CdmFormFactory formFactory, ConversationHolder conversation,
-            ICdmFormElement parentElement, int style) {
-        super(formFactory, conversation, parentElement, "Synonym Relationship", style);
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void addElement(SynonymRelationship element) {
-        // nothing
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public SynonymRelationship createNewElement() {
-
-        SynonymRelationshipWizard wizard = new SynonymRelationshipWizard(this);
-        WizardDialog dialog = new WizardDialog(StoreUtil.getShell(), wizard);
-        int status = dialog.open();
-
-        if(status == IStatus.OK) {
-            return wizard.getSynonymRelationship();
-        }
-
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public Collection<SynonymRelationship> getCollection(Synonym entity) {
-        Collection<SynonymRelationship> allSynonymRelationships = entity.getSynonymRelations();
-        return allSynonymRelationships;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getEmptyString() {
-        return "No synonym relationships yet.";
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    protected String getTooltipString() {
-        return "Add a new synonym relationship from this name.";
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void removeElement(SynonymRelationship element) {
-        getEntity().removeSynonymRelation(element);
-    }
-
-}
+//// $Id$
+///**
+//* Copyright (C) 2014 EDIT
+//* European Distributed Institute of Taxonomy
+//* http://www.e-taxonomy.eu
+//*
+//* The contents of this file are subject to the Mozilla Public License Version 1.1
+//* See LICENSE.TXT at the top of this package for the full license terms.
+//*/
+//package eu.etaxonomy.taxeditor.ui.section.name;
+//
+//import java.util.Collection;
+//
+//import org.eclipse.core.runtime.IStatus;
+//import org.eclipse.jface.wizard.WizardDialog;
+//
+//import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+//import eu.etaxonomy.cdm.model.taxon.Synonym;
+//import eu.etaxonomy.taxeditor.store.StoreUtil;
+//import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+//import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+//import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
+//
+///**
+// * @author pplitzner
+// * @date 27.01.2014
+// *
+// */
+//public class SynonymRelationshipDetailSection extends AbstractEntityCollectionSection<Synonym, SynonymRelationship> {
+//
+//    /**
+//     * <p>Constructor for NameRelationshipDetailSection.</p>
+//     *
+//     * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+//     * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
+//     * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
+//     * @param style a int.
+//     */
+//    public SynonymRelationshipDetailSection(CdmFormFactory formFactory, ConversationHolder conversation,
+//            ICdmFormElement parentElement, int style) {
+//        super(formFactory, conversation, parentElement, "Synonym Relationship", style);
+//    }
+//
+//    /** {@inheritDoc} */
+//    @Override
+//    public void addElement(Synonym element) {
+//        // nothing
+//    }
+//
+//    /** {@inheritDoc} */
+//    @Override
+//    public SynonymRelationship createNewElement() {
+//
+//        SynonymRelationshipWizard wizard = new SynonymRelationshipWizard(this);
+//        WizardDialog dialog = new WizardDialog(StoreUtil.getShell(), wizard);
+//        int status = dialog.open();
+//
+//        if(status == IStatus.OK) {
+//            return wizard.getSynonymRelationship();
+//        }
+//
+//        return null;
+//    }
+//
+//    /** {@inheritDoc} */
+//    @Override
+//    public Collection<SynonymRelationship> getCollection(Synonym entity) {
+//        Collection<SynonymRelationship> allSynonymRelationships = entity.getSynonymRelations();
+//        return allSynonymRelationships;
+//    }
+//
+//    /** {@inheritDoc} */
+//    @Override
+//    public String getEmptyString() {
+//        return "No synonym relationships yet.";
+//    }
+//
+//    /** {@inheritDoc} */
+//    @Override
+//    protected String getTooltipString() {
+//        return "Add a new synonym relationship from this name.";
+//    }
+//
+//    /** {@inheritDoc} */
+//    @Override
+//    public void removeElement(SynonymRelationship element) {
+//        getEntity().removeSynonymRelation(element);
+//    }
+//
+//}
index cdde3e4..a47df4a 100644 (file)
@@ -1,80 +1,79 @@
-// $Id$
-/**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.taxeditor.ui.section.name;
-
-import org.eclipse.jface.wizard.Wizard;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
-import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
-
-/**
- * @author pplitzner
- * @date 27.01.2014
- *
- */
-public class SynonymRelationshipWizard  extends Wizard implements IConversationEnabled{
-
-    private static SynonymRelationshipDetailSection callingSection;
-
-    /**
-     * <p>Constructor for NameRelationshipWizard.</p>
-     *
-     * @param callingSection a {@link eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailSection} object.
-     */
-    public SynonymRelationshipWizard(SynonymRelationshipDetailSection callingSection) {
-        SynonymRelationshipWizard.callingSection = callingSection;
-    }
-
-    private SynonymRelationshipWizardPage page;
-
-    /** {@inheritDoc} */
-    @Override
-    public void addPages() {
-        page = new SynonymRelationshipWizardPage(callingSection);
-
-        addPage(page);
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.jface.wizard.Wizard#performFinish()
-     */
-    /** {@inheritDoc} */
-    @Override
-    public boolean performFinish() {
-        return page.isPageComplete();
-    }
-
-
-
-    /**
-     * <p>getNameRelationship</p>
-     *
-     * @return a {@link eu.etaxonomy.cdm.model.name.NameRelationship} object.
-     */
-    public SynonymRelationship getSynonymRelationship() {
-        return page.getSynonymRelationship();
-    }
-
-    /**
-     * <p>getConversationHolder</p>
-     *
-     * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-     */
-    @Override
-    public ConversationHolder getConversationHolder() {
-        return callingSection.getConversationHolder();
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void update(CdmDataChangeMap changeEvents) {}
-}
+//// $Id$
+///**
+//* Copyright (C) 2014 EDIT
+//* European Distributed Institute of Taxonomy
+//* http://www.e-taxonomy.eu
+//*
+//* The contents of this file are subject to the Mozilla Public License Version 1.1
+//* See LICENSE.TXT at the top of this package for the full license terms.
+//*/
+//package eu.etaxonomy.taxeditor.ui.section.name;
+//
+//import org.eclipse.jface.wizard.Wizard;
+//
+//import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+//import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
+//import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
+//
+///**
+// * @author pplitzner
+// * @date 27.01.2014
+// *
+// */
+//public class SynonymRelationshipWizard  extends Wizard implements IConversationEnabled{
+//
+//    private static SynonymRelationshipDetailSection callingSection;
+//
+//    /**
+//     * <p>Constructor for NameRelationshipWizard.</p>
+//     *
+//     * @param callingSection a {@link eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailSection} object.
+//     */
+//    public SynonymRelationshipWizard(SynonymRelationshipDetailSection callingSection) {
+//        SynonymRelationshipWizard.callingSection = callingSection;
+//    }
+//
+//    private SynonymRelationshipWizardPage page;
+//
+//    /** {@inheritDoc} */
+//    @Override
+//    public void addPages() {
+//        page = new SynonymRelationshipWizardPage(callingSection);
+//
+//        addPage(page);
+//    }
+//
+//    /* (non-Javadoc)
+//     * @see org.eclipse.jface.wizard.Wizard#performFinish()
+//     */
+//    /** {@inheritDoc} */
+//    @Override
+//    public boolean performFinish() {
+//        return page.isPageComplete();
+//    }
+//
+//
+//
+//    /**
+//     * <p>getNameRelationship</p>
+//     *
+//     * @return a {@link eu.etaxonomy.cdm.model.name.NameRelationship} object.
+//     */
+//    public SynonymRelationship getSynonymRelationship() {
+//        return page.getSynonymRelationship();
+//    }
+//
+//    /**
+//     * <p>getConversationHolder</p>
+//     *
+//     * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
+//     */
+//    @Override
+//    public ConversationHolder getConversationHolder() {
+//        return callingSection.getConversationHolder();
+//    }
+//
+//    /** {@inheritDoc} */
+//    @Override
+//    public void update(CdmDataChangeMap changeEvents) {}
+//}
index e716822..b7b4b35 100644 (file)
-// $Id$
-/**
- * Copyright (C) 2014 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-package eu.etaxonomy.taxeditor.ui.section.name;
-
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-
-import eu.etaxonomy.cdm.model.common.TermType;
-import eu.etaxonomy.cdm.model.taxon.Synonym;
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
-import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.taxeditor.ui.AbstractEntityCollectionElementWizardPage;
-import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
-import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
-
-/**
- * @author pplitzner
- * @date 27.01.2014
- *
- */
-public class SynonymRelationshipWizardPage extends AbstractEntityCollectionElementWizardPage implements IPropertyChangeListener {
-
-
-    private EntitySelectionElement<Taxon> selection_relatedTo;
-
-    private TermComboElement<SynonymRelationshipType> combo_relationshipType;
-
-    private CheckboxElement checkboxProParte;
-
-    private boolean isProParte;
-
-    private CheckboxElement checkboxPartial;
-
-    private boolean isPartial;
-
-    private final Synonym entity;
-
-    private SynonymRelationshipType type;
-
-    private Taxon taxon;
-
-
-    /**
-     * <p>
-     * Constructor for NameRelationshipWizardPage.
-     * </p>
-     *
-     * @param callingSection
-     *            a
-     *            {@link eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailSection}
-     *            object.
-     */
-    protected SynonymRelationshipWizardPage(
-            SynonymRelationshipDetailSection callingSection) {
-        super("SynonymRelationshipWizardPage");
-        setTitle("New Synonym Relationship");
-        setDescription(callingSection.getEntity().getTitleCache());
-        this.entity = callingSection.getEntity();
-        this.formFactory = callingSection.getFormFactory();
-
-        formFactory.addPropertyChangeListener(this);
-    }
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see
-     * org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets
-     * .Composite)
-     */
-    /** {@inheritDoc} */
-    @Override
-    public void createControl(Composite parent) {
-        super.createControl(parent);
-
-        combo_relationshipType = formFactory.createDefinedTermComboElement(TermType.SynonymRelationshipType,
-                rootElement, "Synonym Relationship Type", null, SWT.NULL);
-
-        selection_relatedTo = formFactory
-                .createSelectionElement(Taxon.class,
-                        ((SynonymRelationshipWizard) getWizard())
-                        .getConversationHolder(), rootElement,
-                        "Related to", null, EntitySelectionElement.ALL,
-                        SWT.NULL);
-
-        checkboxProParte = formFactory.createCheckbox(rootElement, "Pro Parte Synonym", null, SWT.NULL);
-
-        checkboxPartial = formFactory.createCheckbox(rootElement, "Partial Synonym", null, SWT.NULL);
-
-    }
-
-    /**
-     * <p>
-     * getNameRelationship
-     * </p>
-     *
-     * @return a {@link eu.etaxonomy.cdm.model.name.NameRelationship} object.
-     */
-    public SynonymRelationship getSynonymRelationship() {
-        SynonymRelationship synonymRelationship = taxon.addSynonym(entity, combo_relationshipType.getSelection());
-        synonymRelationship.setPartial(isPartial);
-        synonymRelationship.setProParte(isProParte);
-        return synonymRelationship;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void propertyChange(PropertyChangeEvent event) {
-        if (event == null) {
-            return;
-        }
-        Object eventSource = event.getSource();
-        if (eventSource == combo_relationshipType) {
-            type = combo_relationshipType.getSelection();
-        } else if (eventSource == selection_relatedTo) {
-            taxon = selection_relatedTo.getEntity();
-        } else if (eventSource == checkboxProParte) {
-            isProParte = checkboxProParte.getSelection();
-        } else if (eventSource == checkboxPartial) {
-            isPartial = checkboxPartial.getSelection();
-        }
-
-        boolean complete = type != null && taxon != null;
-        setPageComplete(complete);
-    }
-
-}
+//// $Id$
+///**
+// * Copyright (C) 2014 EDIT
+// * European Distributed Institute of Taxonomy
+// * http://www.e-taxonomy.eu
+// *
+// * The contents of this file are subject to the Mozilla Public License Version 1.1
+// * See LICENSE.TXT at the top of this package for the full license terms.
+// */
+//package eu.etaxonomy.taxeditor.ui.section.name;
+//
+//import org.eclipse.jface.util.IPropertyChangeListener;
+//import org.eclipse.jface.util.PropertyChangeEvent;
+//import org.eclipse.swt.SWT;
+//import org.eclipse.swt.widgets.Composite;
+//
+//import eu.etaxonomy.cdm.model.common.TermType;
+//import eu.etaxonomy.cdm.model.taxon.Synonym;
+//import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
+//import eu.etaxonomy.cdm.model.taxon.Taxon;
+//import eu.etaxonomy.taxeditor.ui.AbstractEntityCollectionElementWizardPage;
+//import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+//import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+//import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
+//
+///**
+// * @author pplitzner
+// * @date 27.01.2014
+// *
+// */
+//public class SynonymRelationshipWizardPage extends AbstractEntityCollectionElementWizardPage implements IPropertyChangeListener {
+//
+//
+//    private EntitySelectionElement<Taxon> selection_relatedTo;
+//
+//    private TermComboElement<SynonymRelationshipType> combo_relationshipType;
+//
+//    private CheckboxElement checkboxProParte;
+//
+//    private boolean isProParte;
+//
+//    private CheckboxElement checkboxPartial;
+//
+//    private boolean isPartial;
+//
+//    private final Synonym entity;
+//
+//    private SynonymRelationshipType type;
+//
+//    private Taxon taxon;
+//
+//
+//    /**
+//     * <p>
+//     * Constructor for NameRelationshipWizardPage.
+//     * </p>
+//     *
+//     * @param callingSection
+//     *            a
+//     *            {@link eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailSection}
+//     *            object.
+//     */
+//    protected SynonymRelationshipWizardPage(
+//            SynonymRelationshipDetailSection callingSection) {
+//        super("SynonymRelationshipWizardPage");
+//        setTitle("New Synonym Relationship");
+//        setDescription(callingSection.getEntity().getTitleCache());
+//        this.entity = callingSection.getEntity();
+//        this.formFactory = callingSection.getFormFactory();
+//
+//        formFactory.addPropertyChangeListener(this);
+//    }
+//
+//    /*
+//     * (non-Javadoc)
+//     *
+//     * @see
+//     * org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets
+//     * .Composite)
+//     */
+//    /** {@inheritDoc} */
+//    @Override
+//    public void createControl(Composite parent) {
+//        super.createControl(parent);
+//
+//        combo_relationshipType = formFactory.createDefinedTermComboElement(TermType.SynonymRelationshipType,
+//                rootElement, "Synonym Relationship Type", null, SWT.NULL);
+//
+//        selection_relatedTo = formFactory
+//                .createSelectionElement(Taxon.class,
+//                        ((SynonymRelationshipWizard) getWizard())
+//                        .getConversationHolder(), rootElement,
+//                        "Related to", null, EntitySelectionElement.ALL,
+//                        SWT.NULL);
+//
+//        checkboxProParte = formFactory.createCheckbox(rootElement, "Pro Parte Synonym", null, SWT.NULL);
+//
+//        checkboxPartial = formFactory.createCheckbox(rootElement, "Partial Synonym", null, SWT.NULL);
+//
+//    }
+//
+//    /**
+//     * <p>
+//     * getNameRelationship
+//     * </p>
+//     *
+//     * @return a {@link eu.etaxonomy.cdm.model.name.NameRelationship} object.
+//     */
+//    public SynonymRelationship getSynonymRelationship() {
+//        SynonymRelationship synonymRelationship = taxon.addSynonym(entity, combo_relationshipType.getSelection());
+//        synonymRelationship.setPartial(isPartial);
+//        synonymRelationship.setProParte(isProParte);
+//        return synonymRelationship;
+//    }
+//
+//    /** {@inheritDoc} */
+//    @Override
+//    public void propertyChange(PropertyChangeEvent event) {
+//        if (event == null) {
+//            return;
+//        }
+//        Object eventSource = event.getSource();
+//        if (eventSource == combo_relationshipType) {
+//            type = combo_relationshipType.getSelection();
+//        } else if (eventSource == selection_relatedTo) {
+//            taxon = selection_relatedTo.getEntity();
+//        } else if (eventSource == checkboxProParte) {
+//            isProParte = checkboxProParte.getSelection();
+//        } else if (eventSource == checkboxPartial) {
+//            isPartial = checkboxPartial.getSelection();
+//        }
+//
+//        boolean complete = type != null && taxon != null;
+//        setPageComplete(complete);
+//    }
+//
+//}
index 1ef60da..a138896 100644 (file)
@@ -30,7 +30,6 @@ import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
-import eu.etaxonomy.taxeditor.ui.section.name.SynonymRelationshipDetailSection;
 import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
@@ -60,7 +59,7 @@ public class TaxonBaseDetailElement extends AbstractIdentifiableEntityDetailElem
 
        private CheckboxElement checkbox_published;
 
-       private SynonymRelationshipDetailSection sectionSynonymRelationship;
+//     private SynonymRelationshipDetailSection sectionSynonymRelationship;
 
        /**
         * <p>
@@ -130,11 +129,11 @@ public class TaxonBaseDetailElement extends AbstractIdentifiableEntityDetailElem
                }
 
 
-               if(entity instanceof Synonym){
-                   sectionSynonymRelationship = formFactory.createSynonymRelationshipDetailSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE);
-                   sectionSynonymRelationship.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
-                   sectionSynonymRelationship.setEntity((Synonym) entity);
-               }
+//             if(entity instanceof Synonym){
+//                 sectionSynonymRelationship = formFactory.createSynonymRelationshipDetailSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE);
+//                 sectionSynonymRelationship.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+//                 sectionSynonymRelationship.setEntity((Synonym) entity);
+//             }
        }
 
     private void updateCheckboxPublish() {
index ee948ee..2d99180 100644 (file)
@@ -31,9 +31,9 @@ import eu.etaxonomy.cdm.model.name.BotanicalName;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.Classification;
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
 import eu.etaxonomy.taxeditor.httpinvoker.BaseRemotingTest;
 
 
@@ -171,44 +171,44 @@ public class AbstractLazyInitializerTest extends BaseRemotingTest {
 
         @Ignore
         @Test
-        public void testCDMEntitySaveCollection() {
+        public void testCdmEntitySaveCollection() {
             Taxon taxon = (Taxon)taxonService.find(taxonUuid1);
 
-            Set<SynonymRelationship> synRelations = taxon.getSynonymRelations();
+            Set<TaxonRelationship> taxRelations = taxon.getTaxonRelations();
             Set<String> relToTitles = new HashSet<String>();
-            Iterator<SynonymRelationship> srItr = synRelations.iterator();
-            while(srItr.hasNext()) {
-                SynonymRelationship sr = srItr.next();
-                System.out.println("Synonym Title Cache : " + sr.getSynonym().getTitleCache());
-                relToTitles.add(sr.getSynonym().getTitleCache());
-                sr.getSynonym().setTitleCache(sr.getSynonym().getTitleCache() + ":updated");
+            Iterator<TaxonRelationship> trItr = taxRelations.iterator();
+            while(trItr.hasNext()) {
+                TaxonRelationship tr = trItr.next();
+                System.out.println("Synonym Title Cache : " + tr.getFromTaxon().getTitleCache());
+                relToTitles.add(tr.getFromTaxon().getTitleCache());
+                tr.getFromTaxon().setTitleCache(tr.getFromTaxon().getTitleCache() + ":updated");
 
             }
             taxonService.merge(taxon);
 
             Taxon taxonNew = (Taxon)taxonService.find(taxonUuid1);
-            Set<SynonymRelationship> synRelationsNew = taxonNew.getSynonymRelations();
+            Set<TaxonRelationship> taxRelationsNew = taxonNew.getTaxonRelations();
 
-            Iterator<SynonymRelationship> srItrNew = synRelationsNew.iterator();
+            Iterator<TaxonRelationship> trItrNew = taxRelationsNew.iterator();
             Iterator<String> relToTitlesItr = relToTitles.iterator();
-            while(srItrNew.hasNext() && relToTitlesItr.hasNext()) {
-                SynonymRelationship srNew = srItrNew.next();
+            while(trItrNew.hasNext() && relToTitlesItr.hasNext()) {
+                TaxonRelationship trNew = trItrNew.next();
                 String relToTitle = relToTitlesItr.next();
-                System.out.println("New Synonym Title Cache: " + srNew.getSynonym().getTitleCache());
-                Assert.assertTrue("Synonym Title caches should not be equal", srNew.getSynonym().getTitleCache().equals(relToTitle));
-                srNew.getSynonym().setTitleCache(relToTitle);
+                System.out.println("New Synonym Title Cache: " + trNew.getFromTaxon().getTitleCache());
+                Assert.assertTrue("Synonym Title caches should not be equal", trNew.getFromTaxon().getTitleCache().equals(relToTitle));
+                trNew.getFromTaxon().setTitleCache(relToTitle);
             }
 
             Taxon taxonOld = (Taxon)taxonService.find(taxonUuid1);
 
-            Set<SynonymRelationship> synRelationsOld = taxonNew.getSynonymRelations();
-            Iterator<SynonymRelationship> srItrOld = synRelationsOld.iterator();
+            Set<TaxonRelationship> taxRelationsOld = taxonNew.getTaxonRelations();
+            Iterator<TaxonRelationship> trItrOld = taxRelationsOld.iterator();
             relToTitlesItr = relToTitles.iterator();
-            while(srItrOld.hasNext() && relToTitlesItr.hasNext()) {
-                SynonymRelationship srOld = srItrOld.next();
+            while(trItrOld.hasNext() && relToTitlesItr.hasNext()) {
+                TaxonRelationship trOld = trItrOld.next();
                 String relToTitle = relToTitlesItr.next();
-                System.out.println("New Synonym Title Cache: " + srOld.getSynonym().getTitleCache());
-                Assert.assertEquals("Synonym Title caches should be equal", srOld.getSynonym().getTitleCache(), relToTitle);
+                System.out.println("New Synonym Title Cache: " + trOld.getFromTaxon().getTitleCache());
+                Assert.assertEquals("Synonym Title caches should be equal", trOld.getFromTaxon().getTitleCache(), relToTitle);
 
             }
         }
index 6cdb5c3..9f43759 100644 (file)
@@ -21,9 +21,9 @@ import eu.etaxonomy.cdm.api.service.ITaxonService;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
 import eu.etaxonomy.taxeditor.httpinvoker.BaseRemotingTest;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -49,26 +49,27 @@ public class PropertyPathsTest extends BaseRemotingTest {
         });
         TaxonBase taxonBase = CdmStore.getService(ITaxonService.class).load(taxonBaseUuid, taxonBasePropertyPaths);
         Taxon taxon = CdmBase.deproxy(taxonBase, Taxon.class);
-        Set<SynonymRelationship> synonymRelations = taxon.getSynonymRelations();
-        for(SynonymRelationship rel : synonymRelations) {
-            rel.getSynonym().getName().getStatus().size();
+        Set<TaxonRelationship> taxonRelations = taxon.getTaxonRelations();
+        for(TaxonRelationship rel : taxonRelations) {
+            rel.getFromTaxon().getName().getStatus().size();
         }
         Set<TaxonNameBase> typifiedNames = taxon.getName().getHomotypicalGroup().getTypifiedNames();
         for(TaxonNameBase name : typifiedNames) {
             Set<TaxonBase> taxonBases = name.getTaxonBases();
             for(TaxonBase tb : taxonBases) {
-                if(tb instanceof Synonym) {
-                    Synonym syn = CdmBase.deproxy(tb, Synonym.class);
-                    Set<SynonymRelationship> rels = syn.getSynonymRelations();
-                    for(SynonymRelationship rel : rels) {
-                        rel.getSynonym().getName().getStatus().size();
-                    }
-                }
+               //TODO needs to be adapted after synonym relationship removal
+//                if(tb instanceof Synonym) {
+//                    Synonym syn = CdmBase.deproxy(tb, Synonym.class);
+//                    Set<TaxonRelationship> rels = syn.getTaxonRelations();
+//                    for(TaxonRelationship rel : rels) {
+//                        rel.getSynonym().getName().getStatus().size();
+//                    }
+//                }
                 if(tb instanceof Taxon) {
-                    Taxon syn = CdmBase.deproxy(tb, Taxon.class);
-                    Set<SynonymRelationship> rels = syn.getSynonymRelations();
-                    for(SynonymRelationship rel : rels) {
-                        rel.getSynonym().getName().getStatus().size();
+                    Taxon tax = CdmBase.deproxy(tb, Taxon.class);
+                    Set<TaxonRelationship> rels = tax.getTaxonRelations();
+                    for(TaxonRelationship rel : rels) {
+                        rel.getFromTaxon().getName().getStatus().size();
                     }
                 }
             }
index 5a63680..92cb68c 100644 (file)
@@ -30,9 +30,9 @@ import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.name.BotanicalName;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
 import eu.etaxonomy.taxeditor.httpinvoker.BaseRemotingTest;
 
 
@@ -235,41 +235,41 @@ public class RemoteLazyLoadingTest extends BaseRemotingTest {
     public void testCDMEntitySaveCollection() {
         Taxon taxon = (Taxon)taxonService.find(taxonUuid1);
 
-        Set<SynonymRelationship> synRelations = taxon.getSynonymRelations();
+        Set<TaxonRelationship> taxRelations = taxon.getTaxonRelations();
         Set<String> relToTitles = new HashSet<String>();
-        Iterator<SynonymRelationship> srItr = synRelations.iterator();
-        while(srItr.hasNext()) {
-            SynonymRelationship sr = srItr.next();
-            System.out.println("Synonym Title Cache : " + sr.getSynonym().getTitleCache());
-            relToTitles.add(sr.getSynonym().getTitleCache());
-            sr.getSynonym().setTitleCache(sr.getSynonym().getTitleCache() + ":updated");
+        Iterator<TaxonRelationship> trItr = taxRelations.iterator();
+        while(trItr.hasNext()) {
+            TaxonRelationship tr = trItr.next();
+            System.out.println("Synonym Title Cache : " + tr.getFromTaxon().getTitleCache());
+            relToTitles.add(tr.getFromTaxon().getTitleCache());
+            tr.getFromTaxon().setTitleCache(tr.getFromTaxon().getTitleCache() + ":updated");
 
         }
         taxonService.merge(taxon);
 
         Taxon taxonNew = (Taxon)taxonService.find(taxonUuid1);
-        Set<SynonymRelationship> synRelationsNew = taxonNew.getSynonymRelations();
+        Set<TaxonRelationship> taxRelationsNew = taxonNew.getTaxonRelations();
 
-        Iterator<SynonymRelationship> srItrNew = synRelationsNew.iterator();
+        Iterator<TaxonRelationship> trItrNew = taxRelationsNew.iterator();
         Iterator<String> relToTitlesItr = relToTitles.iterator();
-        while(srItrNew.hasNext() && relToTitlesItr.hasNext()) {
-            SynonymRelationship srNew = srItrNew.next();
+        while(trItrNew.hasNext() && relToTitlesItr.hasNext()) {
+            TaxonRelationship trNew = trItrNew.next();
             String relToTitle = relToTitlesItr.next();
-            System.out.println("New Synonym Title Cache: " + srNew.getSynonym().getTitleCache());
-            Assert.assertTrue("Synonym Title caches should not be equal", srNew.getSynonym().getTitleCache().equals(relToTitle));
-            srNew.getSynonym().setTitleCache(relToTitle);
+            System.out.println("New Synonym Title Cache: " + trNew.getFromTaxon().getTitleCache());
+            Assert.assertTrue("Synonym Title caches should not be equal", trNew.getFromTaxon().getTitleCache().equals(relToTitle));
+            trNew.getFromTaxon().setTitleCache(relToTitle);
         }
 
         Taxon taxonOld = (Taxon)taxonService.find(taxonUuid1);
 
-        Set<SynonymRelationship> synRelationsOld = taxonNew.getSynonymRelations();
-        Iterator<SynonymRelationship> srItrOld = synRelationsOld.iterator();
+        Set<TaxonRelationship> synRelationsOld = taxonNew.getTaxonRelations();
+        Iterator<TaxonRelationship> srItrOld = synRelationsOld.iterator();
         relToTitlesItr = relToTitles.iterator();
         while(srItrOld.hasNext() && relToTitlesItr.hasNext()) {
-            SynonymRelationship srOld = srItrOld.next();
+            TaxonRelationship srOld = srItrOld.next();
             String relToTitle = relToTitlesItr.next();
-            System.out.println("New Synonym Title Cache: " + srOld.getSynonym().getTitleCache());
-            Assert.assertEquals("Synonym Title caches should be equal", srOld.getSynonym().getTitleCache(), relToTitle);
+            System.out.println("New Synonym Title Cache: " + srOld.getFromTaxon().getTitleCache());
+            Assert.assertEquals("Synonym Title caches should be equal", srOld.getFromTaxon().getTitleCache(), relToTitle);
 
         }
     }
index 24654ca..a0dce5b 100644 (file)
@@ -116,7 +116,7 @@ public class TaxonNameEditorTest extends BaseOperationTest {
 
         Set<Synonym> synonyms = taxon.getSynonyms();
         for(Synonym synonym : synonyms) {
-            taxonService.deleteSynonym(synonym.getUuid(), taxon.getUuid(), null);
+            taxonService.deleteSynonym(synonym.getUuid(), null);
         }
 
         taxonNodeService.merge(taxonNode);