use of org.eol.globi.data.DatasetImporterForTSV.ARGUMENT_TYPE_ID in project eol-globi-data by jhpoelen.
the class InteractionImporterTest method importRefutingClaim.
@Test
public void importRefutingClaim() throws StudyImporterException {
final InteractionListener listener = getAssertingInteractionImporter();
final TreeMap<String, String> link = new TreeMap<>();
link.put(SOURCE_TAXON_NAME, "donald");
link.put(SOURCE_TAXON_ID, "duck");
link.put(DatasetImporterForTSV.INTERACTION_TYPE_ID, "http://purl.obolibrary.org/obo/RO_0002470");
link.put(TARGET_TAXON_NAME, "mini");
link.put(TARGET_TAXON_ID, "mouse");
link.put(ARGUMENT_TYPE_ID, "https://en.wiktionary.org/wiki/refute");
link.put(REFERENCE_ID, "123");
link.put(DATASET_CITATION, "some source ref");
link.put(REFERENCE_CITATION, "");
link.put(REFERENCE_DOI, "doi:10.12/34");
listener.on(link);
AtomicBoolean foundSpecimen = new AtomicBoolean(false);
RelationshipListener relHandler = relationship -> {
final SpecimenNode someSpecimen = new SpecimenNode(relationship.getEndNode());
assertTrue(someSpecimen.getUnderlyingNode().hasRelationship(Direction.INCOMING, NodeUtil.asNeo4j(RelTypes.REFUTES)));
assertFalse(someSpecimen.getUnderlyingNode().hasRelationship(Direction.INCOMING, NodeUtil.asNeo4j(RelTypes.COLLECTED)));
foundSpecimen.set(true);
};
handleRelations(relHandler, RelTypes.REFUTES);
assertThat(foundSpecimen.get(), is(true));
}
Aggregations