commit b9fdd7f40f9269372d0cca282629851c8fcaf4a4
Author: unknown <a.mueller@BGBM-PESIHPC.bgbm.fu-berlin.de>
Date:   Fri Mar 24 20:56:32 2017 +0100

    cleanup

diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/app/caryophyllales/CaryoActivator.java b/app-import/src/main/java/eu/etaxonomy/cdm/app/caryophyllales/CaryoActivator.java
index f8c5c7b8..269424b6 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/app/caryophyllales/CaryoActivator.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/app/caryophyllales/CaryoActivator.java
@@ -29,7 +29,6 @@ import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
 /**
  * @author a.mueller
  * @created 16.10.2012
- * @version 1.0
  */
 public class CaryoActivator extends SourceBase{
 	private static final Logger logger = Logger.getLogger(CaryoActivator.class);
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/app/common/TestActivator.java b/app-import/src/main/java/eu/etaxonomy/cdm/app/common/TestActivator.java
index db618735..ef79d99d 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/app/common/TestActivator.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/app/common/TestActivator.java
@@ -41,10 +41,10 @@ public class TestActivator {
 
 	//static final Source faunaEuropaeaSource = FaunaEuropaeaSources.faunEu();
 //	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql();
-//	static final ICdmDataSource cdmDestination = CdmDestinations.localH2();
+	static final ICdmDataSource cdmDestination = CdmDestinations.localH2();
 //	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_flora_central_africa_production();
 //	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_edit_cichorieae_preview();
-	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_cyprus_production();
+//	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_cyprus_production();
 
 
 	static final int limitSave = 2000;
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/app/greece/FloraHellenicaActivator.java b/app-import/src/main/java/eu/etaxonomy/cdm/app/greece/FloraHellenicaActivator.java
index a93de0f8..86cd6e42 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/app/greece/FloraHellenicaActivator.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/app/greece/FloraHellenicaActivator.java
@@ -41,9 +41,9 @@ public class FloraHellenicaActivator {
     //database validation status (create, update, validate ...)
     static DbSchemaValidation hbm2dll = DbSchemaValidation.CREATE;
 
-//    static final ICdmDataSource cdmDestination = CdmDestinations.localH2();
+    static final ICdmDataSource cdmDestination = CdmDestinations.localH2();
 //  static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql_test();
-    static final ICdmDataSource cdmDestination = CdmDestinations.cdm_greece_checklist_production();
+//    static final ICdmDataSource cdmDestination = CdmDestinations.cdm_greece_checklist_production();
 
     //feature tree uuid
     public static final UUID featureTreeUuid = UUID.fromString("9e1e0e81-7475-4b28-8619-b7f42cd760b6");
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/app/images/AbstractImageImporter.java b/app-import/src/main/java/eu/etaxonomy/cdm/app/images/AbstractImageImporter.java
index c77f9805..2147cda0 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/app/images/AbstractImageImporter.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/app/images/AbstractImageImporter.java
@@ -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.
 */
@@ -14,25 +14,25 @@ import org.springframework.transaction.TransactionStatus;
 
 import eu.etaxonomy.cdm.api.application.CdmApplicationController;
 import eu.etaxonomy.cdm.api.service.IAgentService;
+import eu.etaxonomy.cdm.api.service.IClassificationService;
 import eu.etaxonomy.cdm.api.service.ICommonService;
 import eu.etaxonomy.cdm.api.service.IDescriptionService;
 import eu.etaxonomy.cdm.api.service.IReferenceService;
 import eu.etaxonomy.cdm.api.service.ITaxonService;
-import eu.etaxonomy.cdm.api.service.IClassificationService;
-import eu.etaxonomy.cdm.io.common.CdmIoBase;
-import eu.etaxonomy.cdm.io.common.ICdmIO;
+import eu.etaxonomy.cdm.io.common.CdmImportBase;
 
 /**
- * 
  * @author n.hoffmann
  * @created 11.11.2008
- * @version 1.0
  */
-public abstract class AbstractImageImporter extends CdmIoBase<ImageImportState> implements ICdmIO<ImageImportState> {
-	private static final Logger logger = Logger.getLogger(AbstractImageImporter.class);
-	
+public abstract class AbstractImageImporter
+        extends CdmImportBase<ImageImportConfigurator, ImageImportState> {
+
+    private static final long serialVersionUID = 6178173988325980060L;
+    private static final Logger logger = Logger.getLogger(AbstractImageImporter.class);
+
 	protected CdmApplicationController appCtr;
-	
+
 	protected CdmApplicationController cdmApp;
 	protected ITaxonService taxonService;
 	protected IClassificationService classificationService;
@@ -41,7 +41,7 @@ public abstract class AbstractImageImporter extends CdmIoBase<ImageImportState>
 	protected IDescriptionService descriptionService;
 	protected IReferenceService referenceService;
 	protected ICommonService commonService;
-	
+
 	/* (non-Javadoc)
 	 * @see eu.etaxonomy.cdm.io.common.CdmIoBase#doInvoke(eu.etaxonomy.cdm.io.common.IImportConfigurator, java.util.Map)
 	 */
@@ -49,9 +49,9 @@ public abstract class AbstractImageImporter extends CdmIoBase<ImageImportState>
 	public void doInvoke(ImageImportState state) {
 		//cdmApp = config.getCdmAppController();
 		//if (config instanceof ImageImportConfigurator){
-		
+
 		TransactionStatus status = startTransaction();
-		
+
 		taxonService = getTaxonService();
 		agentService = getAgentService();
 		referenceService = getReferenceService();
@@ -59,16 +59,16 @@ public abstract class AbstractImageImporter extends CdmIoBase<ImageImportState>
 		classificationService = getClassificationService();
 
 		invokeImageImport(state);
-		
+
 		commitTransaction(status);
-		
+
 		return;
 	}
 
 	/**
-	 * This method defines the image import. 
+	 * This method defines the image import.
 	 * It should take care of where to get the images from and what object they get attached to.
-	 * 
+	 *
 	 * @param config
 	 */
 	protected abstract void invokeImageImport(ImageImportState state);
@@ -94,5 +94,5 @@ public abstract class AbstractImageImporter extends CdmIoBase<ImageImportState>
 	}
 
 
-	
+
 }
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/app/wp6/palmae/PalmaeActivator.java b/app-import/src/main/java/eu/etaxonomy/cdm/app/wp6/palmae/PalmaeActivator.java
index 06e1cefe..9487a279 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/app/wp6/palmae/PalmaeActivator.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/app/wp6/palmae/PalmaeActivator.java
@@ -38,7 +38,6 @@ import eu.etaxonomy.cdm.model.description.FeatureTree;
 /**
  * @author a.mueller
  * @created 20.06.2008
- * @version 1.0
  */
 public class PalmaeActivator {
 	private static final Logger logger = Logger.getLogger(PalmaeActivator.class);
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/io/PalmaeProtologueImport.java b/app-import/src/main/java/eu/etaxonomy/cdm/io/PalmaeProtologueImport.java
index 1c7ece59..4e6e958e 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/io/PalmaeProtologueImport.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/io/PalmaeProtologueImport.java
@@ -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.
 */
@@ -20,7 +20,6 @@ import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import eu.etaxonomy.cdm.app.images.AbstractImageImporter;
-import eu.etaxonomy.cdm.app.images.ImageImportConfigurator;
 import eu.etaxonomy.cdm.app.images.ImageImportState;
 import eu.etaxonomy.cdm.common.ExcelUtils;
 import eu.etaxonomy.cdm.model.description.Feature;
@@ -34,22 +33,20 @@ import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 /**
  * @author n.hoffmann
  * @created 19.11.2008
- * @version 1.0
  */
 @Component
 public class PalmaeProtologueImport extends AbstractImageImporter {
-	private static final Logger logger = Logger.getLogger(PalmaeProtologueImport.class);
+    private static final long serialVersionUID = -7178567387220714414L;
+
+    private static final Logger logger = Logger.getLogger(PalmaeProtologueImport.class);
 
 	public static final String SPECIES = "Species";
 	public static final String TAXONID = "Taxon ID";
 	public static final String LINK_PROTO = "Link proto";
-	
-	/* (non-Javadoc)
-	 * @see eu.etaxonomy.cdm.app.images.AbstractImageImporter#invokeImageImport(eu.etaxonomy.cdm.io.common.IImportConfigurator)
-	 */
+
 	@Override
 	protected void invokeImageImport(ImageImportState state) {
-		
+
 		ArrayList<HashMap<String, String>> contents;
 		try {
 			contents = ExcelUtils.parseXLS(state.getConfig().getSource());
@@ -58,14 +55,14 @@ public class PalmaeProtologueImport extends AbstractImageImporter {
 			state.setUnsuccessfull();
 			return;
 		}
-		
+
 		Set<TaxonNameBase> taxonNameStore = new HashSet<TaxonNameBase>();
-		
+
 		int count = 0;
-		
+
 		for (HashMap<String, String> row : contents){
 			count++;
-			
+
 			TaxonNameBase taxonNameBase = null;
 			String species = null;
 			String taxonId = null;
@@ -78,23 +75,23 @@ public class PalmaeProtologueImport extends AbstractImageImporter {
 			}catch (Exception e){
 				logger.error("The row has errors: rowNumber: " +count + ", content: "  + row, e);
 			}
-			
-				
-			
+
+
+
 			if(taxonNameBase == null){
 				logger.warn("no taxon with this name found: " + species + ", idInSource: " + taxonId);
 			}else{
-				
+
 				URI uri;
 				try {
 					uri = new URI(linkProto);
 					MediaRepresentationPart representationPart = MediaRepresentationPart.NewInstance(uri, 0);
 					MediaRepresentation representation = MediaRepresentation.NewInstance("text/html", null);
 					representation.addRepresentationPart(representationPart);
-					
+
 					Media media = Media.NewInstance();
 					media.addRepresentation(representation);
-								
+
 					TaxonNameDescription description = TaxonNameDescription.NewInstance();
 					TextData protolog = TextData.NewInstance(Feature.PROTOLOGUE());
 					protolog.addMedia(media);
@@ -105,19 +102,19 @@ public class PalmaeProtologueImport extends AbstractImageImporter {
 					logger.error(message);
 					e.printStackTrace();
 				}
-				
+
 				taxonNameStore.add(taxonNameBase);
 				if(count % 50 == 0){
 					logger.info(count + " protologues processed.");
 				}
 			}
 		}
-		
-		
+
+
 		getNameService().save(taxonNameStore);
 		logger.info(count + " protologues imported to CDM store.");
-		
+
 		return;
 	}
-	
+
 }
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/io/ProtologueImport.java b/app-import/src/main/java/eu/etaxonomy/cdm/io/ProtologueImport.java
index 0a4a19ab..3d1b02f0 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/io/ProtologueImport.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/io/ProtologueImport.java
@@ -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.
 */
@@ -22,7 +22,7 @@ import org.springframework.transaction.TransactionStatus;
 import eu.etaxonomy.cdm.api.service.ICommonService;
 import eu.etaxonomy.cdm.app.wp6.palmae.config.PalmaeProtologueImportConfigurator;
 import eu.etaxonomy.cdm.common.CdmUtils;
-import eu.etaxonomy.cdm.io.common.CdmIoBase;
+import eu.etaxonomy.cdm.io.common.CdmImportBase;
 import eu.etaxonomy.cdm.io.common.DefaultImportState;
 import eu.etaxonomy.cdm.model.description.Feature;
 import eu.etaxonomy.cdm.model.description.TaxonNameDescription;
@@ -36,11 +36,13 @@ import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 /**
  * @author a.mueller
  * @created 29.07.2008
- * @version 1.0
  */
 @Component
-public class ProtologueImport extends CdmIoBase<DefaultImportState<PalmaeProtologueImportConfigurator>>  {
-	private static final Logger logger = Logger.getLogger(ProtologueImport.class);
+public class ProtologueImport
+        extends CdmImportBase<PalmaeProtologueImportConfigurator, DefaultImportState<PalmaeProtologueImportConfigurator>>{
+
+    private static final long serialVersionUID = 4580327331805229644L;
+    private static final Logger logger = Logger.getLogger(ProtologueImport.class);
 
 	private String pluralString = "protologues";
 	private static int modCount = 200;
@@ -49,11 +51,12 @@ public class ProtologueImport extends CdmIoBase<DefaultImportState<PalmaeProtolo
 		super();
 	}
 
-	public void doInvoke(DefaultImportState<PalmaeProtologueImportConfigurator> state){
+	@Override
+    public void doInvoke(DefaultImportState<PalmaeProtologueImportConfigurator> state){
 		logger.info("start make Protologues from files ...");
-		
+
 		Set<TaxonNameBase> nameStore = new HashSet<TaxonNameBase>();
-		
+
 		PalmaeProtologueImportConfigurator config = state.getConfig();
 		File source = config.getSource();
 		TaxonNameBase name;
@@ -78,7 +81,7 @@ public class ProtologueImport extends CdmIoBase<DefaultImportState<PalmaeProtolo
 		logger.info("end make Protologues from files ...");
 		return;
 	}
-	
+
 	private void storeName(Set<TaxonNameBase> nameStore, TaxonNameBase name, DefaultImportState<PalmaeProtologueImportConfigurator> state){
 		if (name != null){
 			nameStore.add(name);
@@ -88,21 +91,21 @@ public class ProtologueImport extends CdmIoBase<DefaultImportState<PalmaeProtolo
 			return;
 		}
 	}
-		
+
 	private TaxonNameBase importFile(File file, DefaultImportState<PalmaeProtologueImportConfigurator> state){
 		String originalSourceId = file.getName();
 		originalSourceId =originalSourceId.replace("_P.pdf", "");
 		originalSourceId =originalSourceId.replace("_tc_", "_tn_");
 		String namespace = state.getConfig().getOriginalSourceTaxonNamespace();
-		
-		
+
+
 		//for testing only
 		TaxonNameBase taxonName = getTaxonName(originalSourceId, namespace);
 		if (taxonName == null){
 			logger.warn("Name not found for " + originalSourceId);
 			return null;
 		}
-		
+
 //		TaxonNameDescription nameDescription = null;
 //		if (taxonName.getDescriptions().size() > 0){
 //			nameDescription = (TaxonNameDescription)taxonName.getDescriptions().iterator().next();
@@ -118,13 +121,13 @@ public class ProtologueImport extends CdmIoBase<DefaultImportState<PalmaeProtolo
 				description.addElement(protolog);
 				return taxonName;
 			}
-			
+
 		}catch(NullPointerException e){
 			logger.warn("MediaUrl and/or MediaPath not set. Could not get protologue.");
 			return null;
 		}
 		return null;
-		
+
 	}
 
 	private TaxonNameDescription getNameDescription(TaxonNameBase taxonName) {
@@ -135,26 +138,26 @@ public class ProtologueImport extends CdmIoBase<DefaultImportState<PalmaeProtolo
 			result = TaxonNameDescription.NewInstance();
 			taxonName.addDescription(result);
 		}
-		
+
 		return result;
 	}
-	
+
 	private Media getMedia(DefaultImportState<PalmaeProtologueImportConfigurator> state, File file){
 		try {
 			//File file = (File)state.getConfig().getSource();
 			String url = file.toURI().toURL().toString();
-			String mimeTypePdf = "application/pdf"; 
-			String suffixPdf = "pdf"; 
-			String urlStringPdf = state.getConfig().getUrlString() + file.getName(); 
+			String mimeTypePdf = "application/pdf";
+			String suffixPdf = "pdf";
+			String urlStringPdf = state.getConfig().getUrlString() + file.getName();
 			URI uri = CdmUtils.string2Uri(urlStringPdf);
 			Integer size = null;
-			
-			if (file.exists()){  
+
+			if (file.exists()){
 				Media media = Media.NewInstance();
-			    
-				MediaRepresentation representationPdf = MediaRepresentation.NewInstance(mimeTypePdf, suffixPdf); 
-			    representationPdf.addRepresentationPart(MediaRepresentationPart.NewInstance(uri, size)); 
-			    media.addRepresentation(representationPdf); 
+
+				MediaRepresentation representationPdf = MediaRepresentation.NewInstance(mimeTypePdf, suffixPdf);
+			    representationPdf.addRepresentationPart(MediaRepresentationPart.NewInstance(uri, size));
+			    media.addRepresentation(representationPdf);
 			    return media;
 			}else{
 				return null;
@@ -163,33 +166,35 @@ public class ProtologueImport extends CdmIoBase<DefaultImportState<PalmaeProtolo
 			logger.error(e.getMessage());
 			return null;
 		}
-		
+
  	}
-	
+
 	private TaxonNameBase getTaxonName(String originalSourceId, String namespace){
 		TaxonNameBase result;
 		ICommonService commonService = getCommonService();
-		
+
 		result = (TaxonNameBase)commonService.getSourcedObjectByIdInSource(TaxonNameBase.class, originalSourceId , namespace);
 		if (result == null){
 			logger.warn("Taxon (id: " + originalSourceId + ", namespace: " + namespace + ") could not be found");
 		}
 		return result;
 	}
-	
-	
-	public boolean doCheck(DefaultImportState state){
+
+
+	@Override
+    public boolean doCheck(DefaultImportState state){
 		boolean result = true;
 		return result;
 	}
-	
+
 	/* (non-Javadoc)
 	 * @see eu.etaxonomy.cdm.io.common.CdmIoBase#isIgnore(eu.etaxonomy.cdm.io.common.IImportConfigurator)
 	 */
-	protected boolean isIgnore(DefaultImportState state){
+	@Override
+    protected boolean isIgnore(DefaultImportState state){
 		return false; // ! state.getConfig();
 	}
-	
+
 	protected void doCount(int count, int modCount, String pluralString){
 		if ((count % modCount ) == 0 && count!= 0 ){ logger.info(pluralString + " handled: " + (count));}
 	}
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/io/algaterra/AlgaTerraDnaImport.java b/app-import/src/main/java/eu/etaxonomy/cdm/io/algaterra/AlgaTerraDnaImport.java
index ebca755f..0c56b448 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/io/algaterra/AlgaTerraDnaImport.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/io/algaterra/AlgaTerraDnaImport.java
@@ -72,10 +72,6 @@ public class AlgaTerraDnaImport  extends AlgaTerraSpecimenImportBase {
 	}
 
 
-
-	/* (non-Javadoc)
-	 * @see eu.etaxonomy.cdm.io.berlinModel.in.BerlinModelImportBase#getIdQuery()
-	 */
 	@Override
 	protected String getIdQuery(BerlinModelImportState bmState) {
 		AlgaTerraImportState state = (AlgaTerraImportState)bmState;
@@ -368,12 +364,12 @@ public class AlgaTerraDnaImport  extends AlgaTerraSpecimenImportBase {
 		String nameSpace;
 		Class<?> cdmClass;
 		Set<String> idSet;
-		Map<Object, Map<String, ? extends CdmBase>> result = new HashMap<Object, Map<String, ? extends CdmBase>>();
+		Map<Object, Map<String, ? extends CdmBase>> result = new HashMap<>();
 
 		try{
-			Set<String> taxonIdSet = new HashSet<String>();
+			Set<String> taxonIdSet = new HashSet<>();
 
-			Set<String> ecoFactFkSet = new HashSet<String>();
+			Set<String> ecoFactFkSet = new HashSet<>();
 
 			while (rs.next()){
 				handleForeignKey(rs, taxonIdSet, "taxonId");
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/io/greece/FloraHellenicaCommentsImport.java b/app-import/src/main/java/eu/etaxonomy/cdm/io/greece/FloraHellenicaCommentsImport.java
index 7f499c41..ed79ae41 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/io/greece/FloraHellenicaCommentsImport.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/io/greece/FloraHellenicaCommentsImport.java
@@ -24,9 +24,10 @@ import eu.etaxonomy.cdm.model.description.TextData;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 
 /**
+ * Import for the Flora Hellenica taxon comments.
+ *
  * @author a.mueller
  * @date 14.12.2016
- *
  */
 
 @Component
@@ -100,5 +101,4 @@ public class FloraHellenicaCommentsImport<CONFIG extends FloraHellenicaImportCon
         return ;
     }
 
-
 }
