\r
package eu.etaxonomy.cdm.app.berlinModelImport;\r
\r
-import java.io.File;\r
import java.util.UUID;\r
\r
import org.apache.log4j.Logger;\r
\r
-import eu.etaxonomy.cdm.api.application.CdmApplicationController;\r
-import eu.etaxonomy.cdm.app.berlinModelImport.BerlinModelSources;\r
-import eu.etaxonomy.cdm.app.berlinModelImport.TreeCreator;\r
+import eu.etaxonomy.cdm.api.application.ICdmApplicationDefaultConfiguration;\r
import eu.etaxonomy.cdm.app.common.CdmDestinations;\r
-import eu.etaxonomy.cdm.app.images.ImageImportConfigurator;\r
+import eu.etaxonomy.cdm.app.berlinModelImport.TreeCreator;\r
import eu.etaxonomy.cdm.database.DbSchemaValidation;\r
import eu.etaxonomy.cdm.database.ICdmDataSource;\r
-import eu.etaxonomy.cdm.io.CichorieaeImageImport;\r
import eu.etaxonomy.cdm.io.berlinModel.in.BerlinModelImportConfigurator;\r
import eu.etaxonomy.cdm.io.common.CdmDefaultImport;\r
-import eu.etaxonomy.cdm.io.common.IImportConfigurator;\r
-import eu.etaxonomy.cdm.io.common.Source;\r
import eu.etaxonomy.cdm.io.common.IImportConfigurator.CHECK;\r
import eu.etaxonomy.cdm.io.common.IImportConfigurator.DO_REFERENCES;\r
import eu.etaxonomy.cdm.io.common.IImportConfigurator.EDITOR;\r
-import eu.etaxonomy.cdm.model.common.ISourceable;\r
+import eu.etaxonomy.cdm.io.common.Source;\r
import eu.etaxonomy.cdm.model.description.Feature;\r
import eu.etaxonomy.cdm.model.description.FeatureNode;\r
import eu.etaxonomy.cdm.model.description.FeatureTree;\r
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;\r
-import eu.etaxonomy.cdm.model.name.ZoologicalName;\r
\r
\r
/**\r
* TODO add the following to a wiki page:\r
- * HINT: If you are about to import into a mysql data base running under windows and if you wish to dump and restore the resulting data bas under another operation systen \r
+ * HINT: If you are about to import into a mysql data base running under windows and if you wish to dump and restore the resulting data base under another operation systen \r
* you must set the mysql system variable lower_case_table_names = 0 in order to create data base with table compatible names.\r
* \r
* \r
static final ICdmDataSource cdmDestination = CdmDestinations.cdm_campanulaceae_production();\r
\r
static final UUID secUuid = UUID.fromString("ed7dd0ea-fcdd-405d-9fe1-52652aa06119");\r
- static final UUID taxonomicTreeUuid = UUID.fromString("e305ddac-7200-4293-aa5d-d3426133ed9f");\r
+ static final UUID classificationUuid = UUID.fromString("e305ddac-7200-4293-aa5d-d3426133ed9f");\r
static final int sourceSecId = 100000;\r
\r
static final UUID featureTreeUuid = UUID.fromString("231809ce-ad9e-4a50-8a48-668bd336cb7e");\r
static final EDITOR editor = EDITOR.EDITOR_AS_EDITOR;\r
\r
//NomeclaturalCode\r
- static final NomenclaturalCode nomenclaturalCode = NomenclaturalCode.ICBN;\r
+ static final NomenclaturalCode nomenclaturalCode = NomenclaturalCode.ICNAFP;\r
\r
//ignore null\r
static final boolean ignoreNull = true;\r
\r
- static boolean useTaxonomicTree = true;\r
+ static boolean useClassification = true;\r
+ \r
+ static boolean includesEmCode = false; \r
\r
\r
// **************** ALL ********************* \r
\r
BerlinModelImportConfigurator bmImportConfigurator = BerlinModelImportConfigurator.NewInstance(source, destination);\r
\r
- bmImportConfigurator.setTaxonomicTreeUuid(taxonomicTreeUuid);\r
+ bmImportConfigurator.setClassificationUuid(classificationUuid);\r
bmImportConfigurator.setSourceSecId(sourceSecId);\r
\r
bmImportConfigurator.setNomenclaturalCode(nomenclaturalCode);\r
bmImportConfigurator.setDoNameStatus(doNameStatus);\r
bmImportConfigurator.setDoTypes(doTypes);\r
bmImportConfigurator.setDoNameFacts(doNameFacts);\r
- bmImportConfigurator.setUseTaxonomicTree(useTaxonomicTree);\r
+ bmImportConfigurator.setUseClassification(useClassification);\r
\r
bmImportConfigurator.setDoTaxa(doTaxa);\r
bmImportConfigurator.setDoRelTaxa(doRelTaxa);\r
bmImportConfigurator.setDbSchemaValidation(hbm2dll);\r
bmImportConfigurator.setRecordsPerTransaction(recordsPerTransaction);\r
\r
+ bmImportConfigurator.setIncludesEmCode(includesEmCode);\r
\r
// maximum number of name facts to import\r
bmImportConfigurator.setMaximumNumberOfNameFacts(maximumNumberOfNameFacts);\r
success &= bmImport.invoke(bmImportConfigurator);\r
\r
if (doFacts && (bmImportConfigurator.getCheck().equals(CHECK.CHECK_AND_IMPORT) || bmImportConfigurator.getCheck().equals(CHECK.IMPORT_WITHOUT_CHECK) ) ){\r
- CdmApplicationController app = bmImport.getCdmAppController();\r
+ ICdmApplicationDefaultConfiguration app = bmImport.getCdmAppController();\r
\r
//make feature tree\r
FeatureTree tree = TreeCreator.flatTree(featureTreeUuid, bmImportConfigurator.getFeatureMap(), featureKeyList);\r