import eu.etaxonomy.cdm.io.common.ExportResult;
import eu.etaxonomy.cdm.io.common.ExportResultType;
import eu.etaxonomy.cdm.io.common.ExportType;
-import eu.etaxonomy.cdm.io.common.ImportResult;
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.cdm.model.taxon.Taxon;
feedbackGenerator,
subMonitor);
} catch (Exception ex) {
- return new Status(Status.ERROR, TaxeditorStorePlugin.PLUGIN_ID, "Operation Interrupted", ex);
+ return new Status(IStatus.ERROR, TaxeditorStorePlugin.PLUGIN_ID, "Operation Interrupted", ex);
}
createExportResult(label, urlString, createZip, remotingMonitor);
feedbackGenerator,
subMonitor);
} catch (Exception ex) {
- return new Status(Status.ERROR, TaxeditorStorePlugin.PLUGIN_ID, "Operation Interrupted", ex);
+ return new Status(IStatus.ERROR, TaxeditorStorePlugin.PLUGIN_ID, "Operation Interrupted", ex);
}
// collect reports
taxaToUpdate.add(taxon);
}
}
- }else if (remotingMonitor.getResult() instanceof ImportResult){
- Map<String, Integer> result = ((ImportResult)remotingMonitor.getResult()).getUpdatedRecords();
- for (Map.Entry<String, Integer> object: result.entrySet()){
- Taxon taxon = null;
- if (object instanceof Taxon){
- taxon = HibernateProxyHelper.deproxy(object, Taxon.class);
- }else if (object instanceof Synonym){
- Synonym syn = HibernateProxyHelper.deproxy(object, Synonym.class);
- taxon = syn.getAcceptedTaxon();
- }
- taxaToUpdate.add(taxon);
- }
}
return taxaToUpdate;
}
"Nom. source for " + sourcedName.getTitleCache();
}
-// if(sourcedObject instanceof IIdentifiableEntity){
-// sourceObjectTitle = ((IdentifiableEntity) sourcedObject).getTitleCache();
-// }else if(sourcedObject instanceof DescriptionElementBase){
-// sourceObjectTitle = "Element for description: " + ((DescriptionElementBase) sourcedObject).getInDescription().getTitleCache();
-// }else{
-// throw new IllegalStateException("Unknown ISourceable object for given OriginalSourceBase");
-// }
resultString = CdmUtils.concat("; ", new String[]{originalSource.getIdNamespace(), originalSource.getIdInSource(), sourceObjectTitle});
}catch(LazyInitializationException e){