Revision 268fa23c
Added by Andreas Müller over 6 years ago
app-import/src/main/java/eu/etaxonomy/cdm/app/i4life/col/ColDwcaImportActivator.java | ||
---|---|---|
36 | 36 |
public class ColDwcaImportActivator { |
37 | 37 |
private static final Logger logger = Logger.getLogger(ColDwcaImportActivator.class); |
38 | 38 |
|
39 |
//database validation status (create, update, validate ...)
|
|
40 |
// static DbSchemaValidation hbm2dll = DbSchemaValidation.CREATE;
|
|
39 |
//handled by ImportSteps now
|
|
40 |
//static DbSchemaValidation hbm2dll = DbSchemaValidation.CREATE;
|
|
41 | 41 |
|
42 |
static final ImportSteps importSteps = ImportSteps.TaxaAndExtensions;
|
|
42 |
static final ImportSteps importSteps = ImportSteps.ExtensionsOnly;
|
|
43 | 43 |
static final UUID stateUuid = UUID.fromString("7e1da388-0039-4ba3-b0dc-b2bebbf507db"); |
44 | 44 |
|
45 | 45 |
static final URI source = dwca_col_All(); |
46 | 46 |
|
47 |
static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_col(); |
|
47 |
// static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_col(); |
|
48 |
static final ICdmDataSource cdmDestination = CdmDestinations.cdm_col_local(); |
|
49 |
|
|
50 |
static final String databaseMappingFile = "C:/Users/a.mueller/.cdmLibrary/log/colMappingAnnual"; |
|
51 |
// static final String databaseMappingFile = "C:/Users/a.mueller/.cdmLibrary/log/localCol"; |
|
52 |
// static final String databaseMappingFile = "C:/Users/a.mueller/.cdmLibrary/log/colPoales"; |
|
53 |
|
|
54 |
//classification name |
|
55 |
static String classificationName = "Catalogue of Life 2017"; |
|
48 | 56 |
|
49 | 57 |
|
50 | 58 |
static boolean isNoQuotes = true; |
... | ... | |
53 | 61 |
//classification |
54 | 62 |
static final UUID classificationUuid = UUID.fromString("29d4011f-a6dd-4081-beb8-559ba6b84a6b"); |
55 | 63 |
|
56 |
//classification name |
|
57 |
static String classificationName = "Catalogue of Life 2015"; |
|
58 |
|
|
59 | 64 |
//default nom code is ICZN as it allows adding publication year |
60 | 65 |
static final NomenclaturalCode defaultNomCode = NomenclaturalCode.ICZN; |
61 | 66 |
|
... | ... | |
81 | 86 |
|
82 | 87 |
//mapping type |
83 | 88 |
static final MappingType mappingType = MappingType.DatabaseMapping; |
84 |
static final String databaseMappingFile = "C:/Users/a.mueller/.cdmLibrary/log/colMappingAnnual"; |
|
85 | 89 |
|
86 | 90 |
private void doImport(ICdmDataSource cdmDestination){ |
87 | 91 |
|
... | ... | |
127 | 131 |
System.out.println("End import from ("+ source.toString() + ")..."); |
128 | 132 |
} |
129 | 133 |
|
130 |
|
|
131 |
|
|
132 | 134 |
//deduplicate |
133 | 135 |
if (doDeduplicate){ |
134 | 136 |
ICdmRepository app = myImport.getCdmAppController(); |
... | ... | |
154 | 156 |
//http://www.catalogueoflife.org/DCA_Export/ |
155 | 157 |
// URI sourceUrl = URI.create("file:////BGBM-PESIHPC/CoL/archive-complete_2015_07_02.zip"); |
156 | 158 |
// sourceUrl = URI.create("file:////BGBM-PESIHPC/CoL/archive-complete_2015_07_02_test.zip"); |
157 |
URI sourceUrl = URI.create("file:////BGBM-PESIHPC/CoL/2015-03-18-archive-complete.zip");
|
|
159 |
URI sourceUrl = URI.create("file:////BGBM-PESIHPC/CoL/2017-annual.zip");
|
|
158 | 160 |
// URI sourceUrl = URI.create("file:////Pesiimport3/col/col_20Nov2012.zip"); |
161 |
// URI sourceUrl = URI.create("file:////BGBM-PESIHPC/CoL/archive-genus-haitobolus-bl3.zip"); |
|
159 | 162 |
return sourceUrl; |
160 | 163 |
} |
161 | 164 |
|
... | ... | |
218 | 221 |
public static void main(String[] args) { |
219 | 222 |
ColDwcaImportActivator me = new ColDwcaImportActivator(); |
220 | 223 |
me.doImport(cdmDestination); |
224 |
System.exit(0); |
|
221 | 225 |
} |
222 | 226 |
|
223 | 227 |
} |
Also available in: Unified diff
some final CoL impor chnages in Activator