Revision f12ac52e
Added by Katja Luther about 7 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/SpecimenSearchWizard.java | ||
---|---|---|
33 | 33 |
import eu.etaxonomy.cdm.ext.occurrence.OccurenceQuery; |
34 | 34 |
import eu.etaxonomy.cdm.ext.occurrence.bioCase.BioCaseQueryServiceWrapper; |
35 | 35 |
import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportConfigurator; |
36 |
|
|
37 | 36 |
import eu.etaxonomy.cdm.io.specimen.abcd206.in.AbcdParseUtility; |
38 | 37 |
import eu.etaxonomy.cdm.io.specimen.abcd206.in.SpecimenImportReport; |
39 | 38 |
import eu.etaxonomy.cdm.io.specimen.abcd206.in.UnitAssociationWrapper; |
... | ... | |
80 | 79 |
configurator.setAddMediaAsMediaSpecimen(true); |
81 | 80 |
configurator.setDbSchemaValidation(DbSchemaValidation.CREATE); |
82 | 81 |
configurator.setIgnoreAuthorship(true); |
83 |
|
|
82 |
configurator.setMoveNewTaxaToDefaultClassification(false); |
|
83 |
|
|
84 |
|
|
84 | 85 |
//Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.INPUTSTREAM); |
85 | 86 |
//CdmStore.getImportManager().run(job); |
86 | 87 |
try { |
... | ... | |
96 | 97 |
NodeList nodeList = unitNodesList.getAssociatedUnits(); |
97 | 98 |
String prefix = unitNodesList.getPrefix(); |
98 | 99 |
String associationType = unitNodesList.getAssociationType(); |
99 |
URI uri =AbcdParseUtility.parseFirstUri(nodeList, report); |
|
100 |
String content = AbcdParseUtility.parseFirstTextContent(nodeList); |
|
101 |
System.out.println(content); |
|
100 |
if (nodeList != null){ |
|
101 |
URI uri =AbcdParseUtility.parseFirstUri(nodeList, report); |
|
102 |
String content = AbcdParseUtility.parseFirstTextContent(nodeList); |
|
103 |
System.out.println(content); |
|
104 |
} |
|
105 |
|
|
102 | 106 |
|
103 | 107 |
|
104 | 108 |
SpecimenImportView specimenImportView = new SpecimenImportView(); |
... | ... | |
115 | 119 |
|
116 | 120 |
} else{ |
117 | 121 |
try { |
118 |
|
|
122 |
|
|
119 | 123 |
dataImportView = (GbifResponseImportView) activePart.showView(GbifResponseImportView.ID, "query_"+query.toString().replaceAll(",", ""), IWorkbenchPage.VIEW_ACTIVATE); |
120 |
dataImportView.setQuery(query);
|
|
124 |
dataImportView.setQuery(query); |
|
121 | 125 |
// (GbifResponseImportView) activePart.showView(GbifResponseImportView.ID);getWorkbench().getActiveWorkbenchWindow().getActivePage() |
122 | 126 |
// .showView(GbifResponseImportView.ID, "query_"+query.toString().replaceAll(",", ""),IWorkbenchPage.VIEW_ACTIVATE); |
123 | 127 |
|
... | ... | |
134 | 138 |
e.printStackTrace(); |
135 | 139 |
} |
136 | 140 |
// CdmStore.getImportManager().run(configurator); |
137 |
|
|
141 |
|
|
138 | 142 |
// try { |
139 | 143 |
// switch (providerSelectionPage.getQueryType()) { |
140 | 144 |
// case BIOCASE: |
... | ... | |
162 | 166 |
//// } |
163 | 167 |
//// }); |
164 | 168 |
Job queryJob = new QueryJob("Query specimen provider", dataImportView); |
165 |
queryJob.schedule();
|
|
169 |
queryJob.schedule(); |
|
166 | 170 |
|
167 | 171 |
return true; |
168 | 172 |
} |
Also available in: Unified diff
some changes for specimen import