@Test void testNodeConversion() { final Resource s = createResource("http: final Property p = createProperty("http: final Resource o = createResource("http: assertFalse(TriplestoreUtils.nodesToTriple(null, null, null).isPresent(), "null nodes yield valid triple!"); assertFalse(TriplestoreUtils.nodesToTriple(s, null, null).isPresent(), "null node results in a valid triple!"); assertFalse(TriplestoreUtils.nodesToTriple(null, p, null).isPresent(), "null node results in a valid triple!"); assertFalse(TriplestoreUtils.nodesToTriple(null, null, o).isPresent(), "null node results in a valid triple!"); assertFalse(TriplestoreUtils.nodesToTriple(s, p, null).isPresent(), "null node results in a valid triple!"); assertFalse(TriplestoreUtils.nodesToTriple(s, null, o).isPresent(), "null node results in a valid triple!"); assertFalse(TriplestoreUtils.nodesToTriple(null, p, o).isPresent(), "null node results in a valid triple!"); assertTrue(TriplestoreUtils.nodesToTriple(s, p, o).isPresent(), "Nodes not converted to triple!"); }
public static Optional<Triple> nodesToTriple(final RDFNode s, final RDFNode p, final RDFNode o) { if (s != null && p != null && o != null) { return of(fromJena(create(s.asNode(), p.asNode(), o.asNode()))); } return empty(); }
TriplestoreUtils { public static Optional<Triple> nodesToTriple(final RDFNode s, final RDFNode p, final RDFNode o) { if (s != null && p != null && o != null) { return of(fromJena(create(s.asNode(), p.asNode(), o.asNode()))); } return empty(); } }
TriplestoreUtils { public static Optional<Triple> nodesToTriple(final RDFNode s, final RDFNode p, final RDFNode o) { if (s != null && p != null && o != null) { return of(fromJena(create(s.asNode(), p.asNode(), o.asNode()))); } return empty(); } private  TriplestoreUtils(); }
TriplestoreUtils { public static Optional<Triple> nodesToTriple(final RDFNode s, final RDFNode p, final RDFNode o) { if (s != null && p != null && o != null) { return of(fromJena(create(s.asNode(), p.asNode(), o.asNode()))); } return empty(); } private  TriplestoreUtils(); static BlankNodeOrIRI getSubject(final QuerySolution qs); static IRI getPredicate(final QuerySolution qs); static RDFTerm getObject(final QuerySolution qs); static IRI getType(final QuerySolution qs); static Optional<Triple> nodesToTriple(final RDFNode s, final RDFNode p, final RDFNode o); }
TriplestoreUtils { public static Optional<Triple> nodesToTriple(final RDFNode s, final RDFNode p, final RDFNode o) { if (s != null && p != null && o != null) { return of(fromJena(create(s.asNode(), p.asNode(), o.asNode()))); } return empty(); } private  TriplestoreUtils(); static BlankNodeOrIRI getSubject(final QuerySolution qs); static IRI getPredicate(final QuerySolution qs); static RDFTerm getObject(final QuerySolution qs); static IRI getType(final QuerySolution qs); static Optional<Triple> nodesToTriple(final RDFNode s, final RDFNode p, final RDFNode o); static final Var SUBJECT; static final Var PREDICATE; static final Var OBJECT; static final Var TYPE; }