commit 4b328a0ae2ed5f485ea21dcfeffdf21041c447c2
Author: Andreas Müller <a.mueller@bgbm.org>
Date:   Thu Feb 9 23:47:51 2023 +0100

    cleanup

diff --git a/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/sdd/SDDIoBase.java b/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/sdd/SDDIoBase.java
deleted file mode 100644
index 7cf39c607a..0000000000
--- a/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/sdd/SDDIoBase.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.cdm.io.sdd;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-import eu.etaxonomy.cdm.io.common.CdmIoBase;
-
-/**
- * @author h.fradin
- * @since 24.10.2008
- */
-public abstract class SDDIoBase
-        extends CdmIoBase {
-
-    private static final long serialVersionUID = 2460505832748016155L;
-    @SuppressWarnings("unused")
-    private static final Logger logger = LogManager.getLogger();
-
-}
\ No newline at end of file
diff --git a/cdmlib-model/src/main/java/eu/etaxonomy/cdm/compare/description/DistributionNodeByAreaLabelComparator.java b/cdmlib-model/src/main/java/eu/etaxonomy/cdm/compare/description/DistributionNodeByAreaLabelComparator.java
index d7ffd4dea7..a793f44b54 100644
--- a/cdmlib-model/src/main/java/eu/etaxonomy/cdm/compare/description/DistributionNodeByAreaLabelComparator.java
+++ b/cdmlib-model/src/main/java/eu/etaxonomy/cdm/compare/description/DistributionNodeByAreaLabelComparator.java
@@ -17,7 +17,9 @@ import eu.etaxonomy.cdm.common.TreeNode;
 import eu.etaxonomy.cdm.model.description.Distribution;
 import eu.etaxonomy.cdm.model.location.NamedArea;
 
-public class DistributionNodeByAreaLabelComparator implements Comparator<TreeNode<Set<Distribution>, NamedArea>>{
+public class DistributionNodeByAreaLabelComparator
+        implements Comparator<TreeNode<Set<Distribution>, NamedArea>>{
+
     @Override
     public int compare(TreeNode<Set<Distribution>, NamedArea> node1, TreeNode<Set<Distribution>, NamedArea> node2) {
         String label1 = node1.getNodeId().getLabel();
diff --git a/cdmlib-model/src/main/java/eu/etaxonomy/cdm/compare/description/DistributionNodeByAreaOrderComparator.java b/cdmlib-model/src/main/java/eu/etaxonomy/cdm/compare/description/DistributionNodeByAreaOrderComparator.java
index 6e71f582a8..a8584fb343 100644
--- a/cdmlib-model/src/main/java/eu/etaxonomy/cdm/compare/description/DistributionNodeByAreaOrderComparator.java
+++ b/cdmlib-model/src/main/java/eu/etaxonomy/cdm/compare/description/DistributionNodeByAreaOrderComparator.java
@@ -22,7 +22,8 @@ import eu.etaxonomy.cdm.model.location.NamedArea;
  * @author a.mueller
  * @since 04.04.2016
  */
-public class DistributionNodeByAreaOrderComparator implements Comparator<TreeNode<Set<Distribution>, NamedArea>>{
+public class DistributionNodeByAreaOrderComparator
+        implements Comparator<TreeNode<Set<Distribution>, NamedArea>>{
 
     @Override
     public int compare(TreeNode<Set<Distribution>, NamedArea> node1, TreeNode<Set<Distribution>, NamedArea> node2) {
diff --git a/cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/ext/ExternalBhleController.java b/cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/ext/ExternalBhleController.java
index 8ff9575e4f..edb9dbcffe 100644
--- a/cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/ext/ExternalBhleController.java
+++ b/cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/ext/ExternalBhleController.java
@@ -21,7 +21,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.servlet.ModelAndView;
 
-import eu.etaxonomy.cdm.database.UpdatableRoutingDataSource;
 import eu.etaxonomy.cdm.ext.dc.DublinCoreSchemaAdapter;
 import eu.etaxonomy.cdm.ext.sru.SruServiceWrapper;
 import eu.etaxonomy.cdm.model.reference.Reference;
@@ -31,8 +30,7 @@ import io.swagger.annotations.Api;
  * The ExternalGeoController class is a Spring MVC Controller.
  * <p>
  * The syntax of the mapped service URIs contains the {datasource-name} path element.
- * The available {datasource-name}s are defined in a configuration file which
- * is loaded by the {@link UpdatableRoutingDataSource}. If the
+ * The available {datasource-name}s are defined in a configuration file. If the
  * UpdatableRoutingDataSource is not being used in the actual application
  * context any arbitrary {datasource-name} may be used.
  * <p>
@@ -59,8 +57,8 @@ public class ExternalBhleController {
     @RequestMapping(value = { "grib/sru" }, method = RequestMethod.GET)
     public ModelAndView doSearchRetrieve(
             @RequestParam(value = "query", required = true) String cqlQuery,
-            HttpServletRequest request,
-            HttpServletResponse response){
+            @SuppressWarnings("unused") HttpServletRequest request,
+            @SuppressWarnings("unused") HttpServletResponse response){
 
         logger.info("doSearchRetrieve( " + "query=\"" + ObjectUtils.toString(cqlQuery) + "\")");
         ModelAndView mv = new ModelAndView();
diff --git a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IDatabaseService.java b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IDatabaseService.java
index 7919db70bd..ac69cbda7d 100644
--- a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IDatabaseService.java
+++ b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IDatabaseService.java
@@ -1,121 +1,118 @@
-/**
- * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-
-package eu.etaxonomy.cdm.api.service;
-
-import java.util.Map;
-
-import eu.etaxonomy.cdm.api.application.CdmApplicationController;
-import eu.etaxonomy.cdm.config.CdmSourceException;
-import eu.etaxonomy.cdm.database.CdmPersistentDataSource;
-import eu.etaxonomy.cdm.database.DataSourceNotFoundException;
-import eu.etaxonomy.cdm.database.DatabaseTypeEnum;
-import eu.etaxonomy.cdm.database.H2Mode;
-import eu.etaxonomy.cdm.database.ICdmDataSource;
-import eu.etaxonomy.cdm.model.metadata.CdmMetaDataPropertyName;
-import eu.etaxonomy.cdm.model.term.init.TermNotFoundException;
-
-/**
- * Service interface which provides functionality to directly access database
- * related information.
- *
- * @author a.mueller
- *
- */
-public interface IDatabaseService {
-
-	/**
-	 * Returns the database URL
-	 * @return
-	 */
-	public String getUrl();
-
-	/**
-	 * Returns the username.
-	 * @return
-	 */
-	public String getUsername();
-
-	/**
-	 * Connect to the database with the given parameters
-	 * @param databaseTypeEnum
-	 * @param url
-	 * @param username
-	 * @param password
-	 * @param port
-	 * @return returns true if successful
-	 */
-	public boolean connectToDatabase(DatabaseTypeEnum databaseTypeEnum, String server,
-			String database, String username, String password, int port, String filePath, H2Mode mode)  throws TermNotFoundException ;
-
-	/**
-	 * Connect to the database with the given parameters. Uses default port.
-	 * @param databaseTypeEnum
-	 * @param url
-	 * @param username
-	 * @param password
-	 * @return returns true if successful
-	 */
-	public boolean connectToDatabase(DatabaseTypeEnum databaseTypeEnum, String server, String database, String username, String password)  throws TermNotFoundException;
-
-
-	/**
-	 * Connect to the database with the given parameters. Uses default port.
-	 * @param dataSource
-	 * @return returns true if successful
-	 */
-	public boolean connectToDatasource(CdmPersistentDataSource dataSource) throws TermNotFoundException;
-
-	/**
-	 * Saves a new ICdmDatasource into the datasource config file.
-	 *
-	 * @param strDataSourceName
-	 * @param dataSource
-	 * @param code
-	 * @return
-	 */
-	public CdmPersistentDataSource saveDataSource(String strDataSourceName, ICdmDataSource dataSource);
-
-	/**
-	 * Update an already saved datasource in datasource config file
-	 * @param strDataSourceName
-	 * 			the beanId under which the dataSource should be saved
-	 * @param dataSource
-	 * 			the dataSource to be saved
-	 * @return
-	 * 			the CdmDataSource, null if not successful
-	 * @throws DataSourceNotFoundException
-	 */
-	public CdmPersistentDataSource updateDataSource(String strDataSourceName, CdmPersistentDataSource dataSource) throws DataSourceNotFoundException;
-
-	/**
-	 * @param cdmApplicationController
-	 */
-	public void setApplicationController(CdmApplicationController cdmApplicationController);
-
-	/**
-	 * Returns the CDM model schema version number
-	 *
-	 * @return the CDM model schema version number
-	 * @throws CdmSourceException , incase of an underlying SQL error
-	 */
-	public  String getDbSchemaVersion() throws CdmSourceException;
-
-	/**
-	 * Returns a boolean flag to indicate whether the database is empty
-	 *
-	 * @return boolean flag to indicate whether the database is  empty
-	 * @throws CdmSourceException , incase of an underlying SQL error
-	 */
-	public boolean isDbEmpty() throws CdmSourceException;
-
-
-	public Map<CdmMetaDataPropertyName, String> getCdmMetadataMap() throws CdmSourceException;
-
+/**
+ * Copyright (C) 2007 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
+
+package eu.etaxonomy.cdm.api.service;
+
+import java.util.Map;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationController;
+import eu.etaxonomy.cdm.config.CdmSourceException;
+import eu.etaxonomy.cdm.database.CdmPersistentDataSource;
+import eu.etaxonomy.cdm.database.DataSourceNotFoundException;
+import eu.etaxonomy.cdm.database.DatabaseTypeEnum;
+import eu.etaxonomy.cdm.database.H2Mode;
+import eu.etaxonomy.cdm.database.ICdmDataSource;
+import eu.etaxonomy.cdm.model.metadata.CdmMetaDataPropertyName;
+import eu.etaxonomy.cdm.model.term.init.TermNotFoundException;
+
+/**
+ * Service interface which provides functionality to directly access database
+ * related information.
+ *
+ * @author a.mueller
+ *
+ */
+public interface IDatabaseService {
+
+	/**
+	 * Returns the database URL
+	 * @return
+	 */
+	public String getUrl();
+
+	/**
+	 * Returns the username.
+	 * @return
+	 */
+	public String getUsername();
+
+	/**
+	 * Connect to the database with the given parameters
+	 * @param databaseTypeEnum
+	 * @param url
+	 * @param username
+	 * @param password
+	 * @param port
+	 * @return returns true if successful
+	 */
+	public boolean connectToDatabase(DatabaseTypeEnum databaseTypeEnum, String server,
+			String database, String username, String password, int port, String filePath, H2Mode mode)  throws TermNotFoundException ;
+
+	/**
+	 * Connect to the database with the given parameters. Uses default port.
+	 * @param databaseTypeEnum
+	 * @param url
+	 * @param username
+	 * @param password
+	 * @return returns true if successful
+	 */
+	public boolean connectToDatabase(DatabaseTypeEnum databaseTypeEnum, String server, String database, String username, String password)  throws TermNotFoundException;
+
+
+	/**
+	 * Connect to the database with the given parameters. Uses default port.
+	 * @param dataSource
+	 * @return returns true if successful
+	 */
+	public boolean connectToDatasource(CdmPersistentDataSource dataSource) throws TermNotFoundException;
+
+	/**
+	 * Saves a new ICdmDatasource into the datasource config file.
+	 *
+	 * @param strDataSourceName
+	 * @param dataSource
+	 * @param code
+	 * @return
+	 */
+	public CdmPersistentDataSource saveDataSource(String strDataSourceName, ICdmDataSource dataSource);
+
+	/**
+	 * Update an already saved datasource in datasource config file
+	 * @param strDataSourceName
+	 * 			the beanId under which the dataSource should be saved
+	 * @param dataSource
+	 * 			the dataSource to be saved
+	 * @return
+	 * 			the CdmDataSource, null if not successful
+	 * @throws DataSourceNotFoundException
+	 */
+	public CdmPersistentDataSource updateDataSource(String strDataSourceName, CdmPersistentDataSource dataSource) throws DataSourceNotFoundException;
+
+	public void setApplicationController(CdmApplicationController cdmApplicationController);
+
+	/**
+	 * Returns the CDM model schema version number
+	 *
+	 * @return the CDM model schema version number
+	 * @throws CdmSourceException , incase of an underlying SQL error
+	 */
+	public  String getDbSchemaVersion() throws CdmSourceException;
+
+	/**
+	 * Returns a boolean flag to indicate whether the database is empty
+	 *
+	 * @return boolean flag to indicate whether the database is  empty
+	 * @throws CdmSourceException , in case of an underlying SQL error
+	 */
+	public boolean isDbEmpty() throws CdmSourceException;
+
+
+	public Map<CdmMetaDataPropertyName, String> getCdmMetadataMap() throws CdmSourceException;
+
 }
diff --git a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/geo/DistributionTree.java b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/geo/DistributionTree.java
index 51c6f4b7ec..eab6a7f587 100644
--- a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/geo/DistributionTree.java
+++ b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/geo/DistributionTree.java
@@ -55,18 +55,11 @@ public class DistributionTree
         this.termDao = termDao;
     }
 
-    /**
-     * @return false if the node was not found
-     */
-    public boolean hasChildNode(TreeNode<Set<Distribution>, NamedArea> parentNode, NamedArea nodeID) {
-        return findChildNode(parentNode, nodeID) != null;
-    }
-
     /**
      * Returns the (first) child node (of type TreeNode) with the given nodeID.
      * @return the found node or null
      */
-    public TreeNode<Set<Distribution>, NamedArea> findChildNode(TreeNode<Set<Distribution>, NamedArea> parentNode, NamedArea  nodeID) {
+    public TreeNode<Set<Distribution>,NamedArea> findChildNode(TreeNode<Set<Distribution>, NamedArea> parentNode, NamedArea  nodeID) {
         if (parentNode.getChildren() == null) {
             return null;
         }
@@ -142,18 +135,19 @@ public class DistributionTree
         if (distributionOrder == null){
             distributionOrder = DistributionOrder.getDefault();
         }
-        _recursiveSortChildren(this.getRootElement(), distributionOrder.getComparator());
+        innerRecursiveSortChildren(this.getRootElement(), distributionOrder.getComparator());
     }
 
-    private void _recursiveSortChildren(TreeNode<Set<Distribution>, NamedArea> treeNode,
+    private void innerRecursiveSortChildren(TreeNode<Set<Distribution>, NamedArea> treeNode,
             Comparator<TreeNode<Set<Distribution>, NamedArea>> comparator){
+
         if (treeNode.children == null) {
             //nothing => stop condition
             return;
         }else {
             Collections.sort(treeNode.children, comparator);
             for (TreeNode<Set<Distribution>, NamedArea> child : treeNode.children) {
-                _recursiveSortChildren(child, comparator);
+                innerRecursiveSortChildren(child, comparator);
             }
         }
     }
@@ -187,7 +181,6 @@ public class DistributionTree
         //getting the highest area and inserting it into the tree
         NamedArea highestArea = namedAreaPath.get(0);
 
-
         TreeNode<Set<Distribution>, NamedArea> child = findChildNode(root, highestArea);
         if (child == null) {
             // the highestDistNode is not yet in the set of children, so we add it
@@ -267,7 +260,4 @@ public class DistributionTree
         }
         return omitLevelIds.contains(areaLevelId);
     }
-
-
-
-}
+}
\ No newline at end of file
diff --git a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/geo/GeoServiceAreaAnnotatedMapping.java b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/geo/GeoServiceAreaAnnotatedMapping.java
index ddfcdfd788..4cb28df628 100644
--- a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/geo/GeoServiceAreaAnnotatedMapping.java
+++ b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/geo/GeoServiceAreaAnnotatedMapping.java
@@ -53,7 +53,6 @@ public class GeoServiceAreaAnnotatedMapping implements IGeoServiceAreaMapping {
         return null;
     }
 
-
     @Override
     public void set(NamedArea area, GeoServiceArea geoServiceArea) {
         String xml = null;
@@ -78,7 +77,6 @@ public class GeoServiceAreaAnnotatedMapping implements IGeoServiceAreaMapping {
         area.addAnnotation(annotation);
 
         termService.saveOrUpdate(area);
-
     }
 
     @Override
@@ -98,4 +96,4 @@ public class GeoServiceAreaAnnotatedMapping implements IGeoServiceAreaMapping {
         }
         termService.saveOrUpdate(area);
     }
-}
+}
\ No newline at end of file
diff --git a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/geo/IGeoServiceAreaMapping.java b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/geo/IGeoServiceAreaMapping.java
index 9fc5745776..67046dfad4 100644
--- a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/geo/IGeoServiceAreaMapping.java
+++ b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/geo/IGeoServiceAreaMapping.java
@@ -1,3 +1,11 @@
+/**
+* Copyright (C) 2011 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.cdm.api.service.geo;
 
 import javax.xml.stream.XMLStreamException;
@@ -12,7 +20,6 @@ import eu.etaxonomy.cdm.model.location.NamedArea;
  *
  * @author a.mueller
  * @since 15.08.2011
- *
  */
 public interface IGeoServiceAreaMapping {
 
