Esempio 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());
 }
 /**
  * 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);
 }