cleanup
authorAndreas Müller <a.mueller@bgbm.org>
Wed, 6 Jan 2021 12:01:18 +0000 (13:01 +0100)
committerAndreas Müller <a.mueller@bgbm.org>
Wed, 6 Jan 2021 12:01:18 +0000 (13:01 +0100)
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/dto/cdm/NameInformationRdf.java
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/dto/tdwg/voc/GeographicRegion.java
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/dto/tdwg/voc/InfoItem.java
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/dto/tdwg/voc/LinkType.java
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/dto/tdwg/voc/Relationship.java
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/dto/tdwg/voc/SpeciesProfileModel.java
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/dto/tdwg/voc/StringType.java
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/dto/tdwg/voc/TaxonConcept.java
cdmlib-remote/src/test/java/eu/etaxonomy/cdm/remote/view/RdfViewTest.java

index 1415e62e173ade85f1e94d8b1661fc108c1f89d6..d5db69906b6aa7dbb738e69f086d7e2eb6c08b96 100644 (file)
@@ -32,10 +32,8 @@ import eu.etaxonomy.cdm.remote.dto.tdwg.voc.TaxonConcept.HasRelationship;
  * This class is an RDF representation of the {@link eu.etaxonomy.cdm.remote.dto.namecatalogue.NameInformation NameInformation}
  *
  * @author c.mathew
- * @version 1.1.0
  * @since 25-Nov-2012
  */
-
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "NameInformation", propOrder = {
                "scientificNameID",
@@ -48,33 +46,33 @@ import eu.etaxonomy.cdm.remote.dto.tdwg.voc.TaxonConcept.HasRelationship;
 })
 @XmlRootElement(name = "NameInformation", namespace = "http://cybertaxonomy.eu/cdm/ontology/voc/NameInformation#")
 public class NameInformationRdf extends BaseThing {
-       
+
        @XmlElement(namespace = "http://rs.tdwg.org/dwc/terms/")
        private String scientificNameID;
-       
+
        @XmlElement(namespace = "http://rs.tdwg.org/ontology/voc/TaxonName#")
        private String nameComplete;
-       
+
        @XmlElement(namespace = "http://purl.org/dc/elements/1.1/")
        private String title;
-       
+
        @XmlElement(namespace = "http://rs.tdwg.org/ontology/voc/TaxonName#")
-       private String rankString;      
-       
+       private String rankString;
+
        @XmlElement(namespace = "http://purl.org/dc/terms/")
        private String references;
 
        @XmlElement(namespace = "http://rs.tdwg.org/dwc/terms/")
        private List<String> typeStatus;
-       
+
 
        @XmlElement(name = "hasRelationship", namespace = "http://rs.tdwg.org/ontology/voc/TaxonConcept#")
        private Set<HasRelationship> hasRelationships = null;
-       
+
        @XmlTransient
        private Set<String> taxonUuids;
-       
-       
+
+
        public Set<String> getTaxonUuids() {
                return taxonUuids;
        }
@@ -84,14 +82,14 @@ public class NameInformationRdf extends BaseThing {
                Set<Relationship> relationships = new HashSet<Relationship>();
                Iterator<String> itr = taxonUuids.iterator();
                while(itr.hasNext()) {
-                       String uuid = itr.next();                       
+                       String uuid = itr.next();
                        try {
                                TaxonConcept tc = new TaxonConcept();
                                tc.setIdentifier(new URI("urn:uuid:" + uuid));
                                Relationship rel = new Relationship();
                                rel.setToTaxon(tc);
                                relationships.add(rel);
-                               
+
                        } catch (URISyntaxException e) {
                                // TODO Auto-generated catch block
                                //e.printStackTrace();
@@ -105,11 +103,11 @@ public class NameInformationRdf extends BaseThing {
        public String getScientificNameID() {
                return scientificNameID;
        }
-       
+
        public void setScientificNameID(String scientificNameID) {
                this.scientificNameID = scientificNameID;
        }
-       
+
        public String getNameComplete() {
                return nameComplete;
        }
@@ -118,11 +116,13 @@ public class NameInformationRdf extends BaseThing {
                this.nameComplete = nameComplete;
        }
 
-       public String getTitle() {
+       @Override
+    public String getTitle() {
                return title;
        }
 
-       public void setTitle(String title) {
+       @Override
+    public void setTitle(String title) {
                this.title = title;
        }
 
@@ -133,7 +133,7 @@ public class NameInformationRdf extends BaseThing {
        public void setRankString(String rankString) {
                this.rankString = rankString;
        }
-       
+
        public String getReferences() {
                return references;
        }
@@ -141,7 +141,7 @@ public class NameInformationRdf extends BaseThing {
        public void setReferences(String references) {
                this.references = references;
        }
-       
+
        public List<String> getTypeStatus() {
                return typeStatus;
        }
index ae25a52f00a3465879885559254f7862103f4a4e..6ebccd19781a74cb2c84d914af35f644632f44b0 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.cdm.remote.dto.tdwg.voc;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
index 0b38d51be5ef7921b686aaaa1ddc277b648b9b29..b14c87792666094234b45139d32120486368f5e2 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.cdm.remote.dto.tdwg.voc;\r
 \r
 import java.util.HashMap;\r
@@ -27,25 +35,25 @@ import eu.etaxonomy.cdm.remote.dto.tdwg.Description;
 })\r
 @XmlRootElement(name = "InfoItem", namespace = "http://rs.tdwg.org/ontology/voc/SpeciesProfileModel#")\r
 public class InfoItem extends Description {\r
-       \r
+\r
        @XmlElement(name = "associatedTaxon", namespace = "http://rs.tdwg.org/ontology/voc/SpeciesProfileModel#")\r
        private AssociatedTaxon associatedTaxon;\r
-       \r
+\r
        @XmlElement(name = "category", namespace = "http://rs.tdwg.org/ontology/voc/SpeciesProfileModel#")\r
        private DefinedTermLinkType category;\r
-       \r
+\r
        @XmlElement(name = "context", namespace = "http://rs.tdwg.org/ontology/voc/SpeciesProfileModel#")\r
        private Set<StringType> context;\r
-       \r
+\r
        @XmlElement(name = "hasContent", namespace = "http://rs.tdwg.org/ontology/voc/SpeciesProfileModel#")\r
        private Set<StringType> hasContent;\r
-       \r
+\r
        @XmlElement(name = "contextValue", namespace = "http://rs.tdwg.org/ontology/voc/SpeciesProfileModel#")\r
        private Set<DefinedTermLinkType> contextValues = null;\r
-       \r
+\r
        @XmlElement(name = "hasValue", namespace = "http://rs.tdwg.org/ontology/voc/SpeciesProfileModel#")\r
        private Set<DefinedTermLinkType> hasValues = null;\r
-       \r
+\r
        public TaxonConcept getAssociatedTaxon() {\r
                return associatedTaxon != null ? associatedTaxon.getTaxonConcept() : null;\r
        }\r
@@ -53,7 +61,7 @@ public class InfoItem extends Description {
        public void setAssociatedTaxon(TaxonConcept taxonConcept) {\r
                this.associatedTaxon = new AssociatedTaxon(taxonConcept, false);\r
        }\r
-       \r
+\r
        public TaxonConcept getAssocatedTaxonRelation() {\r
                return associatedTaxon != null ? associatedTaxon.getTaxonConcept() : null;\r
        }\r
@@ -61,7 +69,7 @@ public class InfoItem extends Description {
        public void setAssociatedTaxonRelation(TaxonConcept taxonConcept) {\r
                this.associatedTaxon = new AssociatedTaxon(taxonConcept, true);\r
        }\r
-       \r
+\r
        public Map<Object,StringType> getContext() {\r
                if(context != null) {\r
                        Map<Object,StringType> contextMap = new HashMap<Object,StringType>();\r
@@ -103,7 +111,7 @@ public class InfoItem extends Description {
                        this.hasContent = null;\r
                }\r
        }\r
-       \r
+\r
        public DefinedTerm getCategory() {\r
                return category != null ? category.getDefinedTerm() : null;\r
        }\r
@@ -111,7 +119,7 @@ public class InfoItem extends Description {
        public void setCategory(DefinedTerm definedTerm) {\r
                this.category = new DefinedTermLinkType(definedTerm, false);\r
        }\r
-       \r
+\r
        public DefinedTerm getCategoryRelation() {\r
                return category != null ? category.getDefinedTerm() : null;\r
        }\r
@@ -119,7 +127,7 @@ public class InfoItem extends Description {
        public void setCategoryRelation(DefinedTerm definedTerm) {\r
                this.category = new DefinedTermLinkType(definedTerm, true);\r
        }\r
-       \r
+\r
        public Set<DefinedTerm> getContextValue() {\r
                if(contextValues != null) {\r
                        Set<DefinedTerm> definedTerms = new HashSet<DefinedTerm>();\r
@@ -142,7 +150,7 @@ public class InfoItem extends Description {
                        contextValues = null;\r
                }\r
        }\r
-       \r
+\r
        public DefinedTerm getSingleContextValue() {\r
                if(contextValues != null) {\r
                        DefinedTerm definedTerm = null;\r
@@ -163,7 +171,7 @@ public class InfoItem extends Description {
                        contextValues = null;\r
                }\r
        }\r
-       \r
+\r
        public Set<DefinedTerm> getHasValue() {\r
                if(hasValues != null) {\r
                        Set<DefinedTerm> definedTerms = new HashSet<DefinedTerm>();\r
@@ -186,7 +194,7 @@ public class InfoItem extends Description {
                        hasValues = null;\r
                }\r
        }\r
-       \r
+\r
        public DefinedTerm getHasSingleValue() {\r
                if(hasValues != null) {\r
                        DefinedTerm definedTerm = null;\r
@@ -201,7 +209,7 @@ public class InfoItem extends Description {
 \r
        public void setHasSingleValue(DefinedTerm definedTerm) {\r
                if(definedTerm != null) {\r
-                 this.hasValues = new HashSet<DefinedTermLinkType>();           \r
+                 this.hasValues = new HashSet<DefinedTermLinkType>();\r
                  hasValues.add( new DefinedTermLinkType(definedTerm,false));\r
                } else {\r
                        hasValues = null;\r
@@ -215,9 +223,9 @@ public class InfoItem extends Description {
        public static class AssociatedTaxon extends LinkType {\r
                @XmlElement(name = "TaxonConcept", namespace = "http://rs.tdwg.org/ontology/voc/TaxonConcept#")\r
                private TaxonConcept taxonConcept;\r
-               \r
+\r
         protected AssociatedTaxon() {}\r
-               \r
+\r
         protected AssociatedTaxon(TaxonConcept taxonConcept, boolean useRelation) {\r
                if(useRelation) {\r
                            if(taxonConcept != null && taxonConcept.getIdentifier() != null) {\r
@@ -238,7 +246,7 @@ public class InfoItem extends Description {
                        this.taxonConcept = taxonConcept;\r
                }\r
        }\r
-       \r
+\r
        @XmlAccessorType(XmlAccessType.FIELD)\r
     @XmlType(name = "DefinedTermLinkType", propOrder = {\r
         "definedTerm"\r
@@ -249,9 +257,9 @@ public class InfoItem extends Description {
                 @XmlElement(name = "GeographicRegion", namespace = "http://rs.tdwg.org/ontology/voc/GeographicRegion#", type = GeographicRegion.class)\r
                })\r
                private DefinedTerm definedTerm;\r
-               \r
+\r
         protected DefinedTermLinkType() {}\r
-               \r
+\r
         protected DefinedTermLinkType(DefinedTerm definedTerm, boolean useRelation) {\r
                if(useRelation) {\r
                            if(definedTerm != null && definedTerm.getIdentifier() != null) {\r
index c267b5ec7e63add4deb6fb7a843d1cf309494f63..841ee7617e6978a05206240f056b30c15cab6844 100644 (file)
@@ -6,6 +6,14 @@
 * 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
+/**\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.cdm.remote.dto.tdwg.voc;\r
 \r
 import java.io.Serializable;\r
index 45d7f76769aeb11a538cb35957a0bc2a02ea0a27..c32f7f6c81bf976879cb635ebc9734f1817f01c7 100644 (file)
@@ -1,8 +1,8 @@
 /**\r
 * Copyright (C) 2007 EDIT\r
-* European Distributed Institute of Taxonomy \r
+* European Distributed Institute of Taxonomy\r
 * http://www.e-taxonomy.eu\r
-* \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
@@ -24,16 +24,16 @@ import eu.etaxonomy.cdm.remote.dto.tdwg.BaseThing;
 })\r
 @XmlRootElement(name = "Relationship",namespace = "http://rs.tdwg.org/ontology/voc/TaxonConcept#")\r
 public class Relationship extends BaseThing {\r
-       \r
+\r
        @XmlElement(name = "fromTaxon", namespace = "http://rs.tdwg.org/ontology/voc/TaxonConcept#")\r
        private FromTaxon fromTaxon;\r
-       \r
+\r
        @XmlElement(namespace = "http://rs.tdwg.org/ontology/voc/TaxonConcept#")\r
        private RelationshipCategory relationshipCategory;\r
-       \r
+\r
        @XmlElement(name = "toTaxon", namespace = "http://rs.tdwg.org/ontology/voc/TaxonConcept#")\r
        private ToTaxon toTaxon;\r
-       \r
+\r
        public TaxonConcept getFromTaxon() {\r
                return fromTaxon != null ? fromTaxon.getTaxonConcept() : null;\r
        }\r
@@ -49,7 +49,7 @@ public class Relationship extends BaseThing {
        public void setRelationshipCategory(TaxonRelationshipTerm relationshipCategory) {\r
                this.relationshipCategory = new RelationshipCategory(relationshipCategory,false);\r
        }\r
-       \r
+\r
        public TaxonRelationshipTerm getRelationshipCategoryRelation() {\r
                return relationshipCategory != null ? relationshipCategory.getTaxonRelationshipTerm() : null;\r
        }\r
@@ -71,39 +71,39 @@ public class Relationship extends BaseThing {
         "taxonConcept"\r
     })\r
        public static class FromTaxon extends LinkType {\r
-               \r
+\r
                @XmlElement(name = "TaxonConcept", namespace = "http://rs.tdwg.org/ontology/voc/TaxonConcept#")\r
                private TaxonConcept taxonConcept;\r
 \r
                protected FromTaxon() {}\r
-               \r
+\r
                protected FromTaxon(TaxonConcept taxonConcept) {\r
                if(taxonConcept != null && taxonConcept.getIdentifier() != null) {\r
                            //this.setResource(taxonConcept.getIdentifier());\r
                        this.setTaxonConcept(taxonConcept);\r
                }\r
                }\r
-               \r
+\r
                protected TaxonConcept getTaxonConcept() {\r
                        return taxonConcept;\r
                }\r
 \r
                protected void setTaxonConcept(TaxonConcept taxonConcept) {\r
                        this.taxonConcept = taxonConcept;\r
-               }               \r
+               }\r
        }\r
-       \r
+\r
        @XmlAccessorType(XmlAccessType.FIELD)\r
     @XmlType(name = "ToTaxon", propOrder = {\r
         "taxonConcept"\r
     })\r
        public static class ToTaxon extends LinkType {\r
-               \r
+\r
                @XmlElement(name = "TaxonConcept", namespace = "http://rs.tdwg.org/ontology/voc/TaxonConcept#")\r
                private TaxonConcept taxonConcept;\r
-               \r
+\r
                protected ToTaxon() {}\r
-               \r
+\r
                protected ToTaxon(TaxonConcept taxonConcept) {\r
                            this.setTaxonConcept(taxonConcept);\r
                }\r
@@ -115,25 +115,26 @@ public class Relationship extends BaseThing {
                protected void setTaxonConcept(TaxonConcept taxonConcept) {\r
                        this.taxonConcept = taxonConcept;\r
                }\r
-               \r
+\r
        }\r
-       \r
+\r
        @XmlAccessorType(XmlAccessType.FIELD)\r
     @XmlType(name = "RelationshipCategory", propOrder = {\r
         "taxonRelationshipTerm"\r
     })\r
        public static class RelationshipCategory extends LinkType {\r
-               \r
+\r
                @XmlElement(name = "TaxonRelationshipTerm", namespace = "http://rs.tdwg.org/ontology/voc/TaxonConcept#")\r
                private TaxonRelationshipTerm taxonRelationshipTerm;\r
-               \r
+\r
                protected RelationshipCategory() {}\r
-               \r
+\r
                protected RelationshipCategory(TaxonRelationshipTerm taxonRelationshipTerm, boolean useRelation) {\r
                        if(useRelation) {\r
                            if(taxonRelationshipTerm != null) {\r
-                               if(taxonRelationshipTerm.getIdentifier() != null)\r
-                               this.setResource(taxonRelationshipTerm.getIdentifier());\r
+                               if(taxonRelationshipTerm.getIdentifier() != null) {\r
+                        this.setResource(taxonRelationshipTerm.getIdentifier());\r
+                    }\r
                            }  else {\r
                                this.taxonRelationshipTerm = taxonRelationshipTerm;\r
                            }\r
@@ -153,6 +154,6 @@ public class Relationship extends BaseThing {
                protected RelationshipCategory(TaxonRelationshipTerm taxonRelationshipTerm) {\r
                        this.taxonRelationshipTerm = taxonRelationshipTerm;\r
                }\r
-               \r
+\r
        }\r
 }\r
index 6b05c61a0abd9779dc8ec413350553b910dbcf6b..3ff755e7c55a8093e6af6249fe10d26b45e8787b 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.cdm.remote.dto.tdwg.voc;\r
 \r
 import java.util.HashSet;\r
@@ -20,13 +28,13 @@ import eu.etaxonomy.cdm.remote.dto.tdwg.Description;
 })\r
 @XmlRootElement(name = "SpeciesProfileModel", namespace = "http://rs.tdwg.org/ontology/voc/SpeciesProfileModel#")\r
 public class SpeciesProfileModel extends Description implements CycleRecoverable {\r
-       \r
+\r
        @XmlElement(name = "aboutTaxon", namespace = "http://rs.tdwg.org/ontology/voc/SpeciesProfileModel#")\r
        private AboutTaxon aboutTaxon;\r
-       \r
+\r
        @XmlElement(name = "hasInformation", namespace = "http://rs.tdwg.org/ontology/voc/SpeciesProfileModel#")\r
        private Set<HasInformation> hasInformations = null;\r
-       \r
+\r
        public TaxonConcept getAboutTaxon() {\r
                return aboutTaxon != null ? aboutTaxon.getTaxonConcept() : null;\r
        }\r
@@ -34,7 +42,7 @@ public class SpeciesProfileModel extends Description implements CycleRecoverable
        public void setAboutTaxon(TaxonConcept taxonConcept) {\r
                this.aboutTaxon = new AboutTaxon(taxonConcept, false);\r
        }\r
-       \r
+\r
        public TaxonConcept getAboutTaxonRelation() {\r
                return aboutTaxon != null ? aboutTaxon.getTaxonConcept() : null;\r
        }\r
@@ -42,10 +50,10 @@ public class SpeciesProfileModel extends Description implements CycleRecoverable
        public void setAboutTaxonRelation(TaxonConcept taxonConcept) {\r
                this.aboutTaxon = new AboutTaxon(taxonConcept, true);\r
        }\r
-       \r
+\r
        public Set<InfoItem> getHasInformation() {\r
                if(hasInformations != null) {\r
-                       Set<InfoItem> infoItems = new HashSet<InfoItem>();\r
+                       Set<InfoItem> infoItems = new HashSet<>();\r
                        for(HasInformation hasInformation : hasInformations) {\r
                                infoItems.add(hasInformation.getInfoItem());\r
                        }\r
@@ -57,7 +65,7 @@ public class SpeciesProfileModel extends Description implements CycleRecoverable
 \r
        public void setHasInformation(Set<InfoItem> infoItems) {\r
                if(infoItems != null) {\r
-                 this.hasInformations = new HashSet<HasInformation>();\r
+                 this.hasInformations = new HashSet<>();\r
                  for(InfoItem infoItem : infoItems) {\r
                        hasInformations.add( new HasInformation(infoItem));\r
                  }\r
@@ -65,7 +73,7 @@ public class SpeciesProfileModel extends Description implements CycleRecoverable
                        hasInformations = null;\r
                }\r
        }\r
-       \r
+\r
        @XmlAccessorType(XmlAccessType.FIELD)\r
     @XmlType(name = "AboutTaxon", propOrder = {\r
         "taxonConcept"\r
@@ -73,9 +81,9 @@ public class SpeciesProfileModel extends Description implements CycleRecoverable
        public static class AboutTaxon extends LinkType {\r
                @XmlElement(name = "TaxonConcept", namespace = "http://rs.tdwg.org/ontology/voc/TaxonConcept#")\r
                private TaxonConcept taxonConcept;\r
-               \r
+\r
         protected AboutTaxon() {}\r
-               \r
+\r
         protected AboutTaxon(TaxonConcept taxonConcept, boolean useRelation) {\r
                if(useRelation) {\r
                            if(taxonConcept != null && taxonConcept.getIdentifier() != null) {\r
@@ -96,7 +104,7 @@ public class SpeciesProfileModel extends Description implements CycleRecoverable
                        this.taxonConcept = taxonConcept;\r
                }\r
        }\r
-       \r
+\r
        @XmlAccessorType(XmlAccessType.FIELD)\r
     @XmlType(name = "HasInformation", propOrder = {\r
         "infoItem"\r
@@ -105,13 +113,13 @@ public class SpeciesProfileModel extends Description implements CycleRecoverable
 \r
                @XmlElement(name = "InfoItem", namespace = "http://rs.tdwg.org/ontology/voc/SpeciesProfileModel#")\r
                private InfoItem infoItem;\r
-               \r
+\r
                protected HasInformation() {}\r
-               \r
+\r
                protected HasInformation(InfoItem infoItem) {\r
                        this.infoItem = infoItem;\r
                }\r
-               \r
+\r
                protected InfoItem getInfoItem() {\r
                        return infoItem;\r
                }\r
@@ -121,7 +129,8 @@ public class SpeciesProfileModel extends Description implements CycleRecoverable
                }\r
        }\r
 \r
-       public Object onCycleDetected(Context context) {\r
+       @Override\r
+    public Object onCycleDetected(Context context) {\r
                SpeciesProfileModel speciesProfileModel = new SpeciesProfileModel();\r
                speciesProfileModel.setIdentifier(super.getIdentifier());\r
                speciesProfileModel.setTitle(super.getTitle());\r
index ff4515a0513fb52f9ec4adbde6eca8ba9c8de7c7..1d9fc91766a11cf08cae522d8dda01919ff9bae9 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.cdm.remote.dto.tdwg.voc;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -18,7 +26,6 @@ public class StringType {
        public String getValue() {\r
                return value;\r
        }\r
-\r
        public void setValue(String value) {\r
                this.value = value;\r
        }\r
@@ -26,8 +33,7 @@ public class StringType {
        public String getLang() {\r
                return lang;\r
        }\r
-\r
        public void setLang(String lang) {\r
                this.lang = lang;\r
        }\r
-}\r
+}
\ No newline at end of file
index 9efcec2c7ecaeb24f3d01cd2bf6b3b79e0393a7b..56da2a4fbfa8b836d779fa3d6144381baa332ed0 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* 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.
 */
@@ -39,16 +39,16 @@ public class TaxonConcept extends Concept implements CycleRecoverable {
 
        @XmlElement(namespace = "http://rs.tdwg.org/ontology/voc/TaxonConcept#")
        private AccordingTo accordingTo;
-       
+
        @XmlElement(name = "hasName", namespace = "http://rs.tdwg.org/ontology/voc/TaxonConcept#")
        private HasName hasName;
-       
+
        @XmlElement(name = "hasRelationship", namespace = "http://rs.tdwg.org/ontology/voc/TaxonConcept#")
        private Set<HasRelationship> hasRelationships = null;
-       
+
        @XmlElement(name = "describedBy", namespace = "http://rs.tdwg.org/ontology/voc/TaxonConcept#")
        private Set<DescribedBy> describedBys = null;
-       
+
        public Set<Relationship> getHasRelationship() {
                if(hasRelationships != null) {
                        Set<Relationship> relationships = new HashSet<Relationship>();
@@ -63,7 +63,7 @@ public class TaxonConcept extends Concept implements CycleRecoverable {
 
        public void setHasRelationship(Set<Relationship> relationships) {
                if(relationships != null) {
-                 this.hasRelationships = new HashSet<HasRelationship>();
+                 this.hasRelationships = new HashSet<>();
                  for(Relationship relationship : relationships) {
                        hasRelationships.add( new HasRelationship(relationship));
                  }
@@ -71,10 +71,10 @@ public class TaxonConcept extends Concept implements CycleRecoverable {
                        hasRelationships = null;
                }
        }
-       
+
        public Set<SpeciesProfileModel> getDescribedBy() {
                if(describedBys != null) {
-                       Set<SpeciesProfileModel> speciesProfileModels = new HashSet<SpeciesProfileModel>();
+                       Set<SpeciesProfileModel> speciesProfileModels = new HashSet<>();
                        for(DescribedBy describedBy : describedBys) {
                                speciesProfileModels.add(describedBy.getSpeciesProfileModel());
                        }
@@ -102,7 +102,7 @@ public class TaxonConcept extends Concept implements CycleRecoverable {
        public void setHasName(TaxonName taxonName) {
                this.hasName = new HasName(taxonName, false);
        }
-       
+
        public TaxonName getHasNameRelation() {
                return hasName != null ? hasName.getTaxonName() : null;
        }
@@ -114,7 +114,7 @@ public class TaxonConcept extends Concept implements CycleRecoverable {
        public Boolean isPrimary() {
                return primary;
        }
-       
+
        public Actor getAccordingTo() {
                return accordingTo != null ? accordingTo.getActor() : null;
        }
@@ -122,7 +122,7 @@ public class TaxonConcept extends Concept implements CycleRecoverable {
        public void setAccordingTo(Actor accordingTo) {
                this.accordingTo = new AccordingTo(accordingTo, false);
        }
-       
+
        public Actor getAccordingToRelation() {
                return accordingTo != null ? accordingTo.getActor() : null;
        }
@@ -134,7 +134,7 @@ public class TaxonConcept extends Concept implements CycleRecoverable {
        public void setPrimary(Boolean primary) {
                this.primary = primary;
        }
-       
+
        @XmlAccessorType(XmlAccessType.FIELD)
     @XmlType(name = "HasName", propOrder = {
         "taxonName"
@@ -142,9 +142,9 @@ public class TaxonConcept extends Concept implements CycleRecoverable {
        public static class HasName extends LinkType {
                @XmlElement(name = "TaxonName", namespace = "http://rs.tdwg.org/ontology/voc/TaxonName#")
                private TaxonName taxonName;
-               
+
         protected HasName() {}
-               
+
         protected HasName(TaxonName taxonName, boolean useRelation) {
                if(useRelation) {
                            if(taxonName != null && taxonName.getIdentifier() != null) {
@@ -165,7 +165,7 @@ public class TaxonConcept extends Concept implements CycleRecoverable {
                        this.taxonName = taxonName;
                }
        }
-       
+
        @XmlAccessorType(XmlAccessType.FIELD)
     @XmlType(name = "HasRelationship", propOrder = {
         "relationship"
@@ -174,13 +174,13 @@ public class TaxonConcept extends Concept implements CycleRecoverable {
 
                @XmlElement(name = "Relationship", namespace = "http://rs.tdwg.org/ontology/voc/TaxonConcept#")
                private Relationship relationship;
-               
+
                public HasRelationship() {}
-               
+
                public HasRelationship(Relationship relationship) {
                        this.relationship = relationship;
                }
-               
+
                public Relationship getRelationship() {
                        return relationship;
                }
@@ -189,7 +189,7 @@ public class TaxonConcept extends Concept implements CycleRecoverable {
                        this.relationship = relationship;
                }
        }
-       
+
        @XmlAccessorType(XmlAccessType.FIELD)
     @XmlType(name = "AccordingTo", propOrder = {
         "actor"
@@ -201,9 +201,9 @@ public class TaxonConcept extends Concept implements CycleRecoverable {
                        @XmlElement(name = "Team", namespace = "http://rs.tdwg.org/ontology/voc/Team#", type = Team.class)
                })
                private Actor actor;
-               
+
                protected AccordingTo() {}
-               
+
                protected AccordingTo(Actor actor, boolean useRelation) {
                        if(useRelation) {
                            if(actor != null && actor.getIdentifier() != null) {
@@ -215,7 +215,7 @@ public class TaxonConcept extends Concept implements CycleRecoverable {
                                this.actor = actor;
                        }
                }
-               
+
                protected Actor getActor() {
                        return actor;
                }
@@ -224,7 +224,7 @@ public class TaxonConcept extends Concept implements CycleRecoverable {
                        this.actor = actor;
                }
        }
-       
+
        @XmlAccessorType(XmlAccessType.FIELD)
     @XmlType(name = "DescribedBy", propOrder = {
         "speciesProfileModel"
@@ -233,13 +233,13 @@ public class TaxonConcept extends Concept implements CycleRecoverable {
 
                @XmlElement(name = "SpeciesProfileModel", namespace = "http://rs.tdwg.org/ontology/voc/SpeciesProfileModel#")
                private SpeciesProfileModel speciesProfileModel;
-               
+
                protected DescribedBy() {}
-               
+
                protected DescribedBy(SpeciesProfileModel speciesProfileModel) {
                        this.speciesProfileModel = speciesProfileModel;
                }
-               
+
                protected SpeciesProfileModel getSpeciesProfileModel() {
                        return speciesProfileModel;
                }
@@ -249,7 +249,8 @@ public class TaxonConcept extends Concept implements CycleRecoverable {
                }
        }
 
-       public Object onCycleDetected(Context context) {
+       @Override
+    public Object onCycleDetected(Context context) {
                TaxonConcept taxonConcept = new TaxonConcept();
                taxonConcept.setIdentifier(super.getIdentifier());
                taxonConcept.setTitle(super.getTitle());
index 2206593fb352f95feafef467316437e741161d35..a8032ed8c959bea771456f7c5fd9317cc65bb21c 100644 (file)
@@ -33,7 +33,6 @@ import org.unitils.spring.annotation.SpringBeanByType;
 import eu.etaxonomy.cdm.remote.dto.dc.Relation;\r
 import eu.etaxonomy.cdm.remote.dto.namecatalogue.NameInformation;\r
 import eu.etaxonomy.cdm.remote.dto.tdwg.voc.InfoItem;\r
-import eu.etaxonomy.cdm.remote.dto.tdwg.voc.PublicationCitation;\r
 import eu.etaxonomy.cdm.remote.dto.tdwg.voc.Relationship;\r
 import eu.etaxonomy.cdm.remote.dto.tdwg.voc.SpeciesProfileModel;\r
 import eu.etaxonomy.cdm.remote.dto.tdwg.voc.StringType;\r
@@ -80,7 +79,7 @@ public class RdfViewTest extends UnitilsJUnit4 {
                Relation relation = new Relation();\r
                relation.setResource(new URI("http://www.example.org/"));\r
                taxonConcept.setRelation(relation);\r
-               PublicationCitation publicationCitation = new PublicationCitation();\r
+//             PublicationCitation publicationCitation = new PublicationCitation();\r
                taxonConcept.setPublishedIn("Lorem ipsum dolor");\r
 \r
                Team team = new Team();\r
@@ -90,7 +89,7 @@ public class RdfViewTest extends UnitilsJUnit4 {
 \r
                TaxonRelationshipTerm taxonRelationshipTerm = new TaxonRelationshipTerm();\r
                taxonRelationshipTerm.setIdentifier(new URI("http://rs.e-taxonomy.eu/voc/TaxonRelationshipTerm.rdf"));\r
-               Set<Relationship> relationships = new HashSet<Relationship>();\r
+               Set<Relationship> relationships = new HashSet<>();\r
                Relationship relationship = new Relationship();\r
                relationship.setRelationshipCategory(taxonRelationshipTerm);\r
                TaxonConcept t = new TaxonConcept();\r
@@ -106,7 +105,7 @@ public class RdfViewTest extends UnitilsJUnit4 {
                speciesProfileModel1.setIdentifier(new URI("urn:lsid:example.org:descriptions:1"));\r
                speciesProfileModel1.setTitle("Description of Aus aus");\r
 \r
-               Set<SpeciesProfileModel> speciesProfileModels = new HashSet<SpeciesProfileModel>();\r
+               Set<SpeciesProfileModel> speciesProfileModels = new HashSet<>();\r
                speciesProfileModels.add(speciesProfileModel1);\r
                taxonConcept.setDescribedBy(speciesProfileModels);\r
                rdf = new Rdf();\r