use of nl.knaw.huygens.timbuctoo.core.dto.DataStream in project timbuctoo by HuygensING.
the class TripleImporterIntegrationTest method importTripleShouldMapToARelationBetweenTheSubjectAndAnExistingObjectVertex.
@Test
public void importTripleShouldMapToARelationBetweenTheSubjectAndAnExistingObjectVertex() throws Exception {
final Triple abadan = createTripleIterator(ABADAN_POINT_TRIPLE).next();
final Triple iran = createTripleIterator(IRAN_POINT_TRIPLE).next();
final Triple relation = createTripleIterator(ABADAN_IS_PART_OF_IRAN_TRIPLE).next();
instance.importTriple(true, abadan);
instance.importTriple(true, iran);
instance.importTriple(true, relation);
rdfImportSession.commit();
rdfImportSession.close();
Collection collectionMetadata = timbuctooActions.getCollectionMetadata(DEFAULT_COLLECTION_NAME);
DataStream<ReadEntity> result = timbuctooActions.getCollection(collectionMetadata, 0, 10, false, (entity, entityVertex) -> {
}, (traversalSource, vre, target, relationRef) -> {
});
assertThat(result.map(readEntity -> readEntity), hasSize(2));
}
Aggregations