(no commit message)
authorAndreas Müller <a.mueller@bgbm.org>
Tue, 22 Jul 2008 14:07:32 +0000 (14:07 +0000)
committerAndreas Müller <a.mueller@bgbm.org>
Tue, 22 Jul 2008 14:07:32 +0000 (14:07 +0000)
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/taxon/Synonym.java
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/taxon/SynonymRelationshipType.java

index 66c9c417357276deb6e67a23854dd865b8e174d2..494ab064cb84270867af4cfd978de409ca0cf5c2 100644 (file)
@@ -220,16 +220,17 @@ public class Synonym extends TaxonBase implements IRelated<SynonymRelationship>{
        @Transient
        //TODO  should return a Set<SynonymRelationshipType> since there might be more than one relation
        //              between the synonym and the taxon: see Taxon#removeSynonym(Synonym)
-       public SynonymRelationshipType getRelationType(Taxon taxon){
+       public Set<SynonymRelationshipType> getRelationType(Taxon taxon){
+               Set<SynonymRelationshipType> result = new HashSet<SynonymRelationshipType>();
                if (taxon == null ){
-                       return null;
+                       return result;
                }
-               for (SynonymRelationship rel:getSynonymRelations()){
+               for (SynonymRelationship rel : getSynonymRelations()){
                        Taxon acceptedTaxon = rel.getAcceptedTaxon();
                        if (taxon.equals(acceptedTaxon)){
-                               return rel.getType();
+                               result.add(rel.getType());
                        }
                }
-               return null;
+               return result;
        }
 }
\ No newline at end of file
index a5b3e1fdbfcdf2ebaf2074661e8a4ff6abfdb5da..5f7e8e287e6e36e3a7f6a5903f85380f8dacdd48 100644 (file)
@@ -75,15 +75,10 @@ public class SynonymRelationshipType extends RelationshipTermBase<SynonymRelatio
         *                                               type to be created
         * @param       labelAbbrev  the string identifying (in abbreviated form) the
         *                                               new synonym relationship type to be created
-        * @param       symmetric        the boolean indicating whether the new synonym
-        *                                               relationship type to be created is symmetric
-        * @param       transitive       the boolean indicating whether the new synonym
-        *                                               relationship type to be created is transitive
         * @see                                  #SynonymRelationshipType()
         */
-       //TODO  synonym relationship types can be neither symmetric nor transitive!!
-       public SynonymRelationshipType(String term, String label, String labelAbbrev, boolean symmetric, boolean transitive) {
-               super(term, label, labelAbbrev, symmetric, transitive);
+       public SynonymRelationshipType(String term, String label, String labelAbbrev) {
+               super(term, label, labelAbbrev, false, false);
        }
 
        //********* METHODS **************************************/