Revision 1de2da8c
Added by unknown about 7 years ago
app-import/src/main/java/eu/etaxonomy/cdm/app/common/TestActivator.java | ||
---|---|---|
107 | 107 |
|
108 | 108 |
URI uri = URI.create("file:///C:/localCopy/Data/xper/Cichorieae-DA2.sdd.xml"); |
109 | 109 |
SDDImportConfigurator configurator = SDDImportConfigurator.NewInstance(uri, destination); |
110 |
CdmDefaultImport<SDDImportConfigurator> myImport = new CdmDefaultImport<SDDImportConfigurator>();
|
|
110 |
CdmDefaultImport<SDDImportConfigurator> myImport = new CdmDefaultImport<>(); |
|
111 | 111 |
|
112 | 112 |
myImport.setCdmAppController(app); |
113 | 113 |
|
114 | 114 |
ImportResult result = myImport.invoke(configurator); |
115 |
System.out.println(result.getReports().toString());
|
|
115 |
System.out.println(result.toString()); |
|
116 | 116 |
|
117 | 117 |
if (true){ |
118 | 118 |
return; |
119 | 119 |
} |
120 | 120 |
|
121 |
// app.changeDataSource(destination); |
|
122 |
// ICdmDataSource cdmDestination = CdmDestinations.cdm_edit_cichorieae_preview(); |
|
123 |
// app.changeDataSource(cdmDestination); |
|
124 |
// ITaxonServiceConfigurator<?> conf = TaxonServiceConfiguratorImpl.NewInstance(); |
|
125 |
// conf.setDoSynonyms(true); |
|
126 |
// conf.setDoTaxa(true); |
|
127 |
// conf.setMatchMode(MatchMode.BEGINNING); |
|
128 |
// conf.setTitleSearchString("L*"); |
|
129 |
// conf.setPageNumber(0); |
|
130 |
// conf.setPageSize(50); |
|
131 |
// Set<NamedArea> areas = new HashSet<NamedArea>(); |
|
132 |
// areas.add(TdwgArea.getAreaByTdwgAbbreviation("GER")); |
|
133 |
// //conf.setNamedAreas(areas); |
|
134 |
// |
|
135 |
// Pager<IdentifiableEntity> taxaAndSyn = app.getTaxonService().findTaxaAndNames(conf); |
|
136 |
// List<IdentifiableEntity> taxList = taxaAndSyn.getRecords(); |
|
137 |
// |
|
138 |
// for (IdentifiableEntity<?> ent: taxList){ |
|
139 |
// |
|
140 |
// System.err.println(ent.getTitleCache()); |
|
141 |
// } |
|
142 |
|
|
143 |
|
|
144 |
|
|
145 |
System.out.println("End importing Fauna Europaea data"); |
|
121 |
|
|
122 |
|
|
146 | 123 |
} |
147 | 124 |
|
148 | 125 |
|
Also available in: Unified diff
ref #6541 adapt appImport to new ImportResult structure