use of org.eol.globi.util.InteractTypeMapperFactoryImpl in project eol-globi-data by jhpoelen.
the class DatasetImporterForPensoftIT method singleTableHostInColumnHeader.
@Test
public void singleTableHostInColumnHeader() throws IOException, TermLookupServiceException, StudyImporterException {
final JsonNode tableObj = getTableObj();
assertNotNull(tableObj);
tableObj.get("article_doi");
final JsonNode annotations = tableObj.get("annotations");
for (JsonNode annotation : annotations) {
final InteractTypeMapper interactTypeMapper = new InteractTypeMapperFactoryImpl().create();
if (annotation.has("id")) {
final InteractType interactType = interactTypeMapper.getInteractType(annotation.get("id").asText());
}
if (annotation.has("context")) {
String verbatimInteraction = annotation.get("context").asText();
}
annotation.get("row");
annotation.get("column");
annotation.get("possition");
}
tableObj.get("caption");
List<Map<String, String>> rowValues = new ArrayList<>();
InteractionListener listener = new InteractionListener() {
@Override
public void on(Map<String, String> interaction) throws StudyImporterException {
rowValues.add(interaction);
}
};
parseRowsAndEnrich(tableObj, listener, getResourceServiceTest());
}
Aggregations