Revision e29e2ebd
Added by Katja Luther over 7 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/SaveImportedSpecimenAction.java | ||
---|---|---|
9 | 9 |
import java.util.HashSet; |
10 | 10 |
import java.util.List; |
11 | 11 |
import java.util.Set; |
12 |
import java.util.UUID; |
|
12 | 13 |
|
13 | 14 |
import org.apache.http.client.ClientProtocolException; |
14 | 15 |
import org.apache.log4j.Logger; |
15 | 16 |
import org.eclipse.core.runtime.jobs.Job; |
16 | 17 |
import org.eclipse.jface.action.Action; |
17 | 18 |
import org.eclipse.jface.text.source.Annotation; |
19 |
import org.eclipse.swt.widgets.Event; |
|
18 | 20 |
import org.eclipse.swt.widgets.Table; |
19 | 21 |
import org.eclipse.swt.widgets.TableItem; |
20 | 22 |
import org.eclipse.ui.IWorkbenchPart; |
... | ... | |
22 | 24 |
import org.eclipse.ui.PlatformUI; |
23 | 25 |
|
24 | 26 |
import eu.etaxonomy.cdm.api.conversation.ConversationHolder; |
27 |
import eu.etaxonomy.cdm.api.service.IClassificationService; |
|
25 | 28 |
import eu.etaxonomy.cdm.api.service.IOccurrenceService; |
26 | 29 |
import eu.etaxonomy.cdm.api.service.ITermService; |
27 | 30 |
import eu.etaxonomy.cdm.ext.occurrence.OccurenceQuery; |
... | ... | |
35 | 38 |
import eu.etaxonomy.cdm.model.common.ICdmBase; |
36 | 39 |
import eu.etaxonomy.cdm.model.name.TaxonNameBase; |
37 | 40 |
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase; |
41 |
import eu.etaxonomy.cdm.model.taxon.Classification; |
|
38 | 42 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
43 |
import eu.etaxonomy.taxeditor.ui.dialog.selection.SelectionDialogFactory; |
|
39 | 44 |
|
40 | 45 |
public class SaveImportedSpecimenAction extends Action { |
41 | 46 |
|
... | ... | |
110 | 115 |
unitIdsBioCase = new HashSet<String[]>(); |
111 | 116 |
bioCaseOccurrenceQuery = new OccurenceQuery(unitIdsBioCase); |
112 | 117 |
configuratorAbcd.setOccurenceQuery(bioCaseOccurrenceQuery); |
118 |
if (dataImportView.getClassification() != null){ |
|
119 |
configuratorAbcd.setClassificationUuid(dataImportView.getClassification().getUuid()); |
|
120 |
} |
|
121 |
|
|
113 | 122 |
} |
114 | 123 |
tripleId = response.getTripleID(); |
115 | 124 |
unitIdsBioCase.add(tripleId); |
... | ... | |
134 | 143 |
} |
135 | 144 |
} |
136 | 145 |
|
137 |
|
|
146 |
|
|
138 | 147 |
private void persistTerm(DefinedTermBase<?> term, ITermService termService, ConversationHolder conversation){ |
139 | 148 |
if(term!=null){ |
140 | 149 |
//if the term does not exist in the DB save it |
Also available in: Unified diff
smaller changes for specimen import and others