cleanup
authorAndreas Müller <a.mueller@bgbm.org>
Wed, 1 Sep 2021 10:37:11 +0000 (12:37 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Wed, 1 Sep 2021 10:37:11 +0000 (12:37 +0200)
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/jaxb/CdmIDResolver.java
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/agent/INomenclaturalAuthor.java
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/agent/Person.java
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/agent/Team.java
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/IdentifiableEntity.java
cdmlib-model/src/main/java/eu/etaxonomy/cdm/strategy/cache/agent/INomenclaturalAuthorCacheStrategy.java
cdmlib-model/src/main/java/eu/etaxonomy/cdm/strategy/cache/reference/TitleWithoutYearAndAuthorHelper.java
cdmlib-model/src/main/java/eu/etaxonomy/cdm/strategy/parser/NonViralNameParserImpl.java
cdmlib-model/src/test/java/eu/etaxonomy/cdm/strategy/parser/NonViralNameParserImplTest.java

index 6fce598ae591780234c25b36f8ac9e953c13e464..1ec86ae2483a08d2267ea4e9a82560c82274e5f1 100644 (file)
@@ -147,8 +147,8 @@ public class CdmIDResolver extends IDResolver {
 \r
 \r
        @Override\r
-       public Callable<?> resolve(final String id, final Class targetType) throws SAXException {\r
-               return new Callable() {\r
+       public Callable<Object> resolve(final String id, final Class targetType) throws SAXException {\r
+               return new Callable<Object>() {\r
                @Override\r
             public Object call() throws Exception {\r
                  logger.info("Resolving " + id + " for class " + targetType);\r
@@ -198,11 +198,11 @@ public class CdmIDResolver extends IDResolver {
                                           *\r
                                           */\r
 \r
-                                         AgentBase agent = agentService.find(uuid);\r
+                                         AgentBase<?> agent = agentService.find(uuid);\r
                                          if(agent != null) {\r
                                                  return agent;\r
                                          }\r
-                                         DefinedTermBase term = termService.find(uuid);\r
+                                         DefinedTermBase<?> term = termService.find(uuid);\r
                                          if(term != null) {\r
                                                  return term;\r
                                          }\r
@@ -220,10 +220,10 @@ public class CdmIDResolver extends IDResolver {
        }\r
 \r
        private Object resolveObject(UUID uuid, Class targetType, IService service) throws SAXException {\r
-               Object object = service.find(uuid);\r
-                 if(object == null) {\r
-                         throw new SAXException(targetType.getSimpleName() + " with " + uuid + " not found");\r
-                 }\r
-                 return object;\r
+           Object object = service.find(uuid);\r
+               if(object == null) {\r
+                   throw new SAXException(targetType.getSimpleName() + " with " + uuid + " not found");\r
+               }\r
+               return object;\r
        }\r
 }\r
index 0a49eeb6bf84ecfb31b306a234bdc73976a1217b..bff77e1ecd38736e4b25024504e799211ff75db5 100644 (file)
@@ -6,7 +6,6 @@
 * 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
 package eu.etaxonomy.cdm.model.agent;\r
 \r
 /**\r
@@ -18,23 +17,21 @@ package eu.etaxonomy.cdm.model.agent;
 public interface INomenclaturalAuthor {\r
 \r
        /**\r
-        * @see {@link TeamOrPersonBase#getNomenclaturalTitleCache()}\r
-        *\r
+        * @see TeamOrPersonBase#getNomenclaturalTitleCache()\r
         */\r
     public String getNomenclaturalTitleCache();\r
 \r
-\r
        /**\r
         * @see {@link #getNomenclaturalTitleCache()}\r
         * @deprecated to be replaced by {@link #getNomenclaturalTitleCache()}\r
         */\r
-    @Deprecated\r
+       @Deprecated\r
        public void setNomenclaturalTitle(String nomenclaturalTitle);\r
 \r
     /**\r
      * fixes the missing setter method that corresponds to {@link #getNomenclaturalTitleCache()} see #9729\r
      *\r
-     * @see {@link TeamOrPersonBase#getNomenclaturalTitleCache()}\r
+     * @see TeamOrPersonBase#getNomenclaturalTitleCache()\r
      */\r
     public void setNomenclaturalTitleCache(String nomenclaturalTitle);\r
 \r
index a00bea7bdcf5223bd3ab4cbf6477d21921be4afa..0771ae0435cc7f679912fb5797b85d2a0990c379 100644 (file)
@@ -347,6 +347,9 @@ public class Person extends TeamOrPersonBase<Person>{
     public String getNomenclaturalTitle() {
         return nomenclaturalTitle;
     }
+    /**
+     * Sets the nomenclatural title.
+     */
     @Override
     public void setNomenclaturalTitle(String nomenclaturalTitle) {
         this.nomenclaturalTitle = isBlank(nomenclaturalTitle) ? null : nomenclaturalTitle;
@@ -358,8 +361,8 @@ public class Person extends TeamOrPersonBase<Person>{
 
     /**
      * Returns the initials of this person as used in bibliographic
-     * references. Usually these are the first letters of each givenname
-     * followed by "." per givenname. For East Asian names it may
+     * references. Usually these are the first letters of each given name
+     * followed by "." per given name. For East Asian names it may
      * be the first 2 letters. Also dashes are kept.
      * @return the initials
      */
index b9983a3d95d4229fb57669e7c63958a47afbada2..d47fe83ca2933c0bfef309931764f25f8e2f7c24 100644 (file)
@@ -276,7 +276,7 @@ public class Team extends TeamOrPersonBase<Team> {
         * Removes one person from the list of members of <i>this</i> team.
         *
         * @param  person  the person who should be deleted from <i>this</i> team
-        * @see            #getTeamMembers()
+        * @see    #getTeamMembers()
         */
        public void removeTeamMember(Person person){
                boolean wasMember = getTeamMembers().remove(person);
@@ -340,7 +340,7 @@ public class Team extends TeamOrPersonBase<Team> {
         * Assigns a {@link TeamOrPersonBase#nomenclaturalTitle nomenclatural identification} string to <i>this</i> team
         * and a protection flag status to this string.
         *
-        * @see  {@link #getNomenclaturalTitleCache()}
+        * @see  #getNomenclaturalTitleCache()
         */
        public void setNomenclaturalTitleCache(String nomenclaturalTitleCache, boolean protectedNomenclaturalTitleCache) {
                firePropertyChange("nomenclaturalTitleCache", this.nomenclaturalTitleCache, nomenclaturalTitleCache);
index f217ddb9f73e9af7ea70888a4d336f319fbca5b6..25a568b6dfcadd9400da56e2fe03e210bdd6d695 100644 (file)
@@ -227,7 +227,7 @@ public abstract class IdentifiableEntity<S extends IIdentifiableEntityCacheStrat
     @Deprecated
     @Override
     public void setTitleCache(String titleCache){
-       //TODO shouldn't we call setTitleCache(String, boolean),but is this conformant with Java Bean Specification?
+       //TODO shouldn't we call setTitleCache(String, boolean), but is this conformant with JavaBean specification?
        this.titleCache = getTruncatedCache(titleCache);
     }
 
index 1f080c2fc1186826783594621b1f5d80dd273a43..87cdb350b6eadbb70ac1c6e1bb20e81913bcdbdb 100644 (file)
@@ -8,7 +8,6 @@
 */\r
 package eu.etaxonomy.cdm.strategy.cache.agent;\r
 \r
-\r
 import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;\r
 import eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy;\r
 \r
@@ -39,7 +38,4 @@ public interface INomenclaturalAuthorCacheStrategy<T extends TeamOrPersonBase>
     public String getFamilyTitle(T agent);\r
 \r
     public String getCollectorTitleCache(T agent);\r
-\r
-\r
-\r
-}\r
+}
\ No newline at end of file
index 89e57ca96bb9416029c669cd795c6079273f2bf5..bb2754e09a337538e564b744e7a1980952472ff0 100644 (file)
@@ -21,7 +21,6 @@ import eu.etaxonomy.cdm.strategy.parser.NonViralNameParserImplRegExBase;
 /**
  * @author a.mueller
  * @since 25.05.2016
- *
  */
 public class TitleWithoutYearAndAuthorHelper {
     private static final Logger logger = Logger.getLogger(TitleWithoutYearAndAuthorHelper.class);
index 5f9ec577a2f753a5a12a62220224021ef45c6774..eb24fea915f07c2f450a60ca15d6e3f27ee3bb99 100644 (file)
@@ -1514,7 +1514,6 @@ public class NonViralNameParserImpl
                }else{
                        return parsedTeam(authorString);
                }
-
        }
 
        /**
index 0e195341c5852fc40f85c0fc1fdb46392bc97b9f..67ab8ff9c3485f03d7591ec84f445cb9be292ffc 100644 (file)
@@ -29,7 +29,6 @@ import org.junit.Ignore;
 import org.junit.Test;\r
 \r
 import eu.etaxonomy.cdm.common.UTF8;\r
-import eu.etaxonomy.cdm.model.agent.INomenclaturalAuthor;\r
 import eu.etaxonomy.cdm.model.agent.Person;\r
 import eu.etaxonomy.cdm.model.agent.Team;\r
 import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;\r
@@ -222,7 +221,7 @@ public class NonViralNameParserImplTest extends TermTestBase {
         assertEquals("Abies", nameBasionymAuthor.getGenusOrUninomial());\r
         assertEquals("alba", nameBasionymAuthor.getSpecificEpithet());\r
         assertEquals("D'M\u00FCller", nameBasionymAuthor.getCombinationAuthorship().getNomenclaturalTitleCache());\r
-        INomenclaturalAuthor basionymTeam = nameBasionymAuthor.getBasionymAuthorship();\r
+        TeamOrPersonBase<?> basionymTeam = nameBasionymAuthor.getBasionymAuthorship();\r
         assertEquals("Ciardelli", basionymTeam.getNomenclaturalTitleCache());\r
 \r
         INonViralName nameBasionymExAuthor = parser.parseFullName(strNameAbiesBasionymExAuthor1Unicode, null, Rank.SPECIES());\r
@@ -230,9 +229,9 @@ public class NonViralNameParserImplTest extends TermTestBase {
         assertEquals("alba", nameBasionymExAuthor.getSpecificEpithet());\r
         assertEquals("D'M\u00FCller", nameBasionymExAuthor.getExCombinationAuthorship().getNomenclaturalTitleCache());\r
         assertEquals("de Greuther", nameBasionymExAuthor.getCombinationAuthorship().getNomenclaturalTitleCache());\r
-        INomenclaturalAuthor basionymTeam2 = nameBasionymExAuthor.getExBasionymAuthorship();\r
+        TeamOrPersonBase<?> basionymTeam2 = nameBasionymExAuthor.getExBasionymAuthorship();\r
         assertEquals("Ciardelli", basionymTeam2.getNomenclaturalTitleCache());\r
-        INomenclaturalAuthor exBasionymTeam2 = nameBasionymExAuthor.getBasionymAuthorship();\r
+        TeamOrPersonBase<?> exBasionymTeam2 = nameBasionymExAuthor.getBasionymAuthorship();\r
         assertEquals("D\u00F6ring", exBasionymTeam2.getNomenclaturalTitleCache());\r
 \r
         IBotanicalName nameBasionymExAuthor2 = (IBotanicalName)parser.parseFullName("Washingtonia filifera (Linden ex Andre) H.Wendl. ex de Bary", null, Rank.SPECIES());\r
@@ -240,9 +239,9 @@ public class NonViralNameParserImplTest extends TermTestBase {
         assertEquals("filifera", nameBasionymExAuthor2.getSpecificEpithet());\r
         assertEquals("H.Wendl.", nameBasionymExAuthor2.getExCombinationAuthorship().getNomenclaturalTitleCache());\r
         assertEquals("de Bary", nameBasionymExAuthor2.getCombinationAuthorship().getNomenclaturalTitleCache());\r
-        INomenclaturalAuthor basionymTeam3 = nameBasionymExAuthor2.getBasionymAuthorship();\r
+        TeamOrPersonBase<?> basionymTeam3 = nameBasionymExAuthor2.getBasionymAuthorship();\r
         assertEquals("Andre", basionymTeam3.getNomenclaturalTitleCache());\r
-        INomenclaturalAuthor exBasionymTeam3 = nameBasionymExAuthor2.getExBasionymAuthorship();\r
+        TeamOrPersonBase<?> exBasionymTeam3 = nameBasionymExAuthor2.getExBasionymAuthorship();\r
         assertEquals("Linden", exBasionymTeam3.getNomenclaturalTitleCache());\r
         String title = nameBasionymExAuthor2.getTitleCache();\r
         assertEquals("Washingtonia filifera (Linden ex Andre) H.Wendl. ex de Bary", title);\r