Ejemplo n.º 1
0
 /** Return true if the given pattern occurs somewhere in the find sequence. */
 @Override
 public boolean contains(TriplePattern pattern) {
   return graph.contains(pattern.getSubject(), pattern.getPredicate(), pattern.getObject());
 }
Ejemplo n.º 2
0
 /**
  * this is a simple-minded implementation of containsNode that uses find up to three times to
  * locate the node. Almost certainly particular graphs will be able to offer better query-handlers
  * ...
  */
 public boolean containsNode(Node n) {
   return graph.contains(n, Node.ANY, Node.ANY)
       || graph.contains(Node.ANY, n, Node.ANY)
       || graph.contains(Node.ANY, Node.ANY, n);
 }