import java.io.IOException;
import java.io.InputStreamReader;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.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;
+import eu.etaxonomy.cdm.model.term.IdentifierType;
/**
* @author a.mueller
- * @date 25.03.2017
- *
+ * @since 25.03.2017
*/
public class NepenthesIdentifierActivator {
@SuppressWarnings("unused")
- private static final Logger logger = Logger.getLogger(NepenthesIdentifierActivator.class);
+ private static final Logger logger = LogManager.getLogger();
//database validation status (create, update, validate ...)
static DbSchemaValidation dbSchemaValidation = DbSchemaValidation.VALIDATE;
InputStreamReader source = getNepenthesIdentifier();
IdentifierImportConfigurator config= IdentifierImportConfigurator.NewInstance(source, cdmDestination);
config.setDbSchemaValidation(dbSchemaValidation);
- config.setIdentifierTypeUuid(DefinedTerm.uuidWfoNameIdentifier);
+ config.setIdentifierTypeUuid(IdentifierType.uuidWfoNameIdentifier);
config.setCdmClass(TaxonName.class);
config.setCheck(check);
// URI.create("file:////BGBM-PESIHPC/FloraMalesianaXml/fmvol14_final2.xml")
String path = "C://opt//data//Caryophyllales";
- File file = new File(path + CdmUtils.getFolderSeperator() + filename);
+ File file = new File(path + File.separator + filename);
if (!file.exists()){
System.exit(-1);
return null;