use of org.eol.globi.service.DatasetProxy in project eol-globi-data by jhpoelen.
the class StudyImporterForMetaTable method importStudy.
@Override
public void importStudy() throws StudyImporterException {
try {
for (JsonNode tableConfig : collectTables(dataset)) {
Dataset datasetProxy = new DatasetProxy(dataset);
datasetProxy.setConfig(tableConfig);
InteractionListenerImpl interactionListener = new InteractionListenerImpl(nodeFactory, getGeoNamesService(), getLogger());
final InteractionListener listener = new TableInteractionListenerProxy(datasetProxy, interactionListener);
importTable(listener, new TableParserFactoryImpl(), tableConfig, datasetProxy, getLogger());
}
} catch (IOException | NodeFactoryException e) {
throw new StudyImporterException("problem importing from [" + getBaseUrl() + "]", e);
}
}
use of org.eol.globi.service.DatasetProxy in project eol-globi-data by jhpoelen.
the class StudyImporterForArthopodEasyCapture method embeddedDatasetFor.
static Dataset embeddedDatasetFor(Dataset datasetOrig, String embeddedCitation, URI embeddedArchiveURI) {
ObjectNode config = new ObjectMapper().createObjectNode();
config.put("citation", embeddedCitation);
ObjectNode referencesNode = new ObjectMapper().createObjectNode();
referencesNode.put("archive", embeddedArchiveURI.toString());
config.put("resources", referencesNode);
DatasetProxy dataset = new DatasetProxy(datasetOrig);
dataset.setConfig(config);
return dataset;
}
Aggregations