commit 842cca8603e19dc661cbaee84ff1ff4ef773f49e
Author: Andreas Müller <a.mueller@bgbm.org>
Date:   Mon Jul 30 13:55:44 2018 +0200

    ref #7530 add activators for CaryoSppIdentifier import and WfoAccess import

diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/app/caryophyllales/CaryoSppIdentifierActivator.java b/app-import/src/main/java/eu/etaxonomy/cdm/app/caryophyllales/CaryoSppIdentifierActivator.java
new file mode 100644
index 00000000..2bcba3a2
--- /dev/null
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/app/caryophyllales/CaryoSppIdentifierActivator.java
@@ -0,0 +1,94 @@
+/**
+* Copyright (C) 2015 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.app.caryophyllales;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.UUID;
+
+import org.apache.log4j.Logger;
+
+import eu.etaxonomy.cdm.app.common.CdmDestinations;
+import eu.etaxonomy.cdm.common.CdmUtils;
+import eu.etaxonomy.cdm.database.DbSchemaValidation;
+import eu.etaxonomy.cdm.database.ICdmDataSource;
+import eu.etaxonomy.cdm.io.common.CdmDefaultImport;
+import eu.etaxonomy.cdm.io.common.IImportConfigurator.CHECK;
+import eu.etaxonomy.cdm.io.identifier.IdentifierImportConfigurator;
+import eu.etaxonomy.cdm.model.common.DefinedTerm;
+import eu.etaxonomy.cdm.model.name.TaxonName;
+
+/**
+ * @author a.mueller
+ * @since 18.10.2017
+ *
+ */
+public class CaryoSppIdentifierActivator {
+
+    @SuppressWarnings("unused")
+    private static final Logger logger = Logger.getLogger(CaryoSppIdentifierActivator.class);
+
+    //database validation status (create, update, validate ...)
+    static DbSchemaValidation dbSchemaValidation = DbSchemaValidation.VALIDATE;
+
+//    static final ICdmDataSource cdmDestination = CdmDestinations.cdm_local_caryo_spp2();
+    static final ICdmDataSource cdmDestination = CdmDestinations.cdm_production_caryophyllales_spp();
+
+    private static final UUID idTypeUuid = DefinedTerm.uuidWfoNameIdentifier;
+//    private static final UUID idTypeUuid = DefinedTerm.uuidIpniNameIdentifier;
+
+    //check - import
+    static CHECK check = CHECK.IMPORT_WITHOUT_CHECK;
+
+    private void doImport(ICdmDataSource cdmDestination){
+
+        InputStreamReader source = getIdentifierStream();
+        IdentifierImportConfigurator config= IdentifierImportConfigurator.NewInstance(source, cdmDestination);
+        config.setDbSchemaValidation(dbSchemaValidation);
+        config.setIdentifierTypeUuid(idTypeUuid);
+        config.setCdmClass(TaxonName.class);
+        config.setCheck(check);
+        config.setIgnoreEmptyIdentifier(true);
+
+        CdmDefaultImport<IdentifierImportConfigurator> myImport = new CdmDefaultImport<>();
+        myImport.invoke(config);
+
+    }
+
+    private InputStreamReader getIdentifierStream() {
+        String filename = "Abgleich-CDM-WFO-GattungenUndTypen.csv";
+
+//        URI.create("file:////BGBM-PESIHPC/FloraMalesianaXml/fmvol14_final2.xml")
+        String path = "C://opt//data//Caryophyllales";
+        File file = new File(path + CdmUtils.getFolderSeperator() + filename);
+        if (!file.exists()){
+            System.exit(-1);
+            return null;
+        }
+        try {
+            InputStreamReader input = new FileReader(file);
+            return input;
+        } catch (IOException e) {
+            e.printStackTrace();
+            System.exit(-1);
+            return null;
+        }
+    }
+
+    /**
+     * @param args
+     */
+    public static void main(String[] args) {
+        CaryoSppIdentifierActivator me = new CaryoSppIdentifierActivator();
+        me.doImport(cdmDestination);
+        System.exit(0);
+    }
+}
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/app/caryophyllales/WfoAccessActivator.java b/app-import/src/main/java/eu/etaxonomy/cdm/app/caryophyllales/WfoAccessActivator.java
new file mode 100644
index 00000000..ea41352b
--- /dev/null
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/app/caryophyllales/WfoAccessActivator.java
@@ -0,0 +1,106 @@
+/**
+* Copyright (C) 2015 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.app.caryophyllales;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.UUID;
+
+import org.apache.log4j.Logger;
+
+import eu.etaxonomy.cdm.app.common.CdmDestinations;
+import eu.etaxonomy.cdm.database.DbSchemaValidation;
+import eu.etaxonomy.cdm.database.ICdmDataSource;
+import eu.etaxonomy.cdm.io.common.CdmDefaultImport;
+import eu.etaxonomy.cdm.io.common.IImportConfigurator.CHECK;
+import eu.etaxonomy.cdm.io.common.ImportResult;
+import eu.etaxonomy.cdm.io.wfo.in.WfoAccessImportConfigurator;
+import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
+import eu.etaxonomy.cdm.model.reference.Reference;
+import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
+
+/**
+ * @author a.mueller
+ * @since 18.10.2017
+ *
+ */
+public class WfoAccessActivator {
+
+    @SuppressWarnings("unused")
+    private static final Logger logger = Logger.getLogger(WfoAccessActivator.class);
+
+    //database validation status (create, update, validate ...)
+    static DbSchemaValidation dbSchemaValidation = DbSchemaValidation.VALIDATE;
+
+//    static final ICdmDataSource cdmDestination = CdmDestinations.localH2();
+//    static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_test1();
+    static final ICdmDataSource cdmDestination = CdmDestinations.cdm_production_caryophyllales_spp();
+//    static final ICdmDataSource cdmDestination = CdmDestinations.cdm_local_caryo_spp();
+
+    static int transactionLineCount = 1000;
+//    static boolean addAuthorsToReferences = true;
+//    static boolean reportDuplicateIdentifier = true;
+
+//    static final String classificationName = "Tropicos Plumbaginaceae";
+//    static final UUID parentNodeUuid = UUID.fromString("46755269-5b06-4308-9871-c55850610769");
+
+    //check - import
+    static CHECK check = CHECK.IMPORT_WITHOUT_CHECK;
+
+    private void doImport(ICdmDataSource cdmDestination){
+
+        URI source = getDianthusUri();
+        WfoAccessImportConfigurator config;
+        try {
+            config = WfoAccessImportConfigurator.NewInstance(source, cdmDestination);
+
+            config.setDbSchemaValidation(dbSchemaValidation);
+            config.setCheck(check);
+            config.setNomenclaturalCode(NomenclaturalCode.ICNAFP);
+//            config.setClassificationName(classificationName);
+            config.setSourceReference(getSourceReference());
+//            config.setParentNodeUuid(parentNodeUuid);
+            config.setTransactionLineCount(transactionLineCount);
+//            config.setAddAuthorsToReference(addAuthorsToReferences);
+//            config.setReportDuplicateIdentifier(reportDuplicateIdentifier);
+
+            CdmDefaultImport<WfoAccessImportConfigurator> myImport = new CdmDefaultImport<>();
+            ImportResult result = myImport.invoke(config);
+            System.out.println(result.createReport());
+        } catch (IOException e) {
+            System.out.println("URI not 'found': " + source);
+        }
+    }
+
+    private URI getDianthusUri(){
+//        String fileName = "TropicosNameImportTest-input.txt";
+        String fileName = "3_Families_and_Dianthus_mancorr.txt";
+//        String fileName = "TropicosOutput2CDM_Plumbaginaceae.txt";
+
+        URI uri = URI.create("file:////BGBM-PESIHPC/Caryophyllales/" +  fileName);
+        return uri;
+    }
+
+    private Reference getSourceReference(){
+        Reference result = ReferenceFactory.newDatabase();
+        result.setTitle("WFO-Import Amara-Cheno-Polyg-Dianthus June 2018");
+        result.setUuid(UUID.fromString("aa343bb2-dc02-4809-a558-2db1bcd7212d"));
+        return result;
+    }
+
+
+    /**
+     * @param args
+     */
+    public static void main(String[] args) {
+        WfoAccessActivator me = new WfoAccessActivator();
+        me.doImport(cdmDestination);
+        System.exit(0);
+    }
+}
diff --git a/app-import/src/main/java/eu/etaxonomy/cdm/app/common/CdmDestinations.java b/app-import/src/main/java/eu/etaxonomy/cdm/app/common/CdmDestinations.java
index 61cf1810..3a0b544a 100644
--- a/app-import/src/main/java/eu/etaxonomy/cdm/app/common/CdmDestinations.java
+++ b/app-import/src/main/java/eu/etaxonomy/cdm/app/common/CdmDestinations.java
@@ -425,6 +425,14 @@ public class CdmDestinations {
         return makeDestination(dbType, cdmServer, cdmDB, -1, cdmUserName, null);
     }
 
+    public static ICdmDataSource cdm_local_caryo_spp2(){
+        DatabaseTypeEnum dbType = DatabaseTypeEnum.MySQL;
+        String cdmServer = "127.0.0.1";
+        String cdmDB = "cdm_caryo_spp2";
+        String cdmUserName = "edit";
+        return makeDestination(dbType, cdmServer, cdmDB, -1, cdmUserName, null);
+    }
+
 	public static ICdmDataSource cdm_globis_production(){
 		DatabaseTypeEnum dbType = DatabaseTypeEnum.MySQL;
 		String cdmServer = "160.45.63.171";
