/** Answer the result of <code>find( t )</code> on the single graph in this union. */ private ExtendedIterator<Triple> singleGraphFind( final TripleMatch t ) { return (m_subGraphs.get( 0 )).find( t ); }
public ExtendedIterator<Triple> findEither(TripleMatch match, boolean showHidden) { if ( showHidden ) return NullIterator.instance() ; else return graph.find(match) ; }
final protected Iter<Triple> between(Node x, Node z) { Iter<Triple> iter1 = Iter.iter(graph.find(x, Node.ANY, z)) ; return iter1 ; }
private Iter<Triple> between(Node x, Node z) { Iter<Triple> iter1 = Iter.iter(graph.find(x, Node.ANY, z)) ; return iter1 ; }
@Override protected Iterator<Quad> findInDftGraph(Node s, Node p, Node o) { if ( true ) throw new UnsupportedOperationException() ; return triples2quadsDftGraph(graph.find(s, p ,o)) ; }
private void triplesToZap(Collection<Triple> acc, Node s, Node p , Node o) { ExtendedIterator<Triple> iter = graph.find(s,p,o) ; while(iter.hasNext()) acc.add(iter.next()) ; }
private static void triplesToZap(Graph graph, Collection<Triple> acc, Node s, Node p , Node o) { ExtendedIterator<Triple> iter = graph.find(s,p,o) ; while(iter.hasNext()) acc.add(iter.next()) ; } }
@Override protected Iterator<Quad> findInDftGraph(Node s, Node p , Node o) { return triples2quadsDftGraph(getDefaultGraph().find(s, p, o)) ; }
public static Iterator<Quad> findInSpecificNamedGraph(DatasetGraphCaching dsg, Node g, Node s, Node p, Node o) { return triples2quadsDftGraph(dsg.getGraph(g).find(s, p, o)) ; } }
/** Answer an iterator over all the reification triples that this Reifier exposes (ie all if Standard, none otherwise) that match m. */ public static ExtendedIterator<Triple> findExposed(Graph graph, TripleMatch match) { ExtendedIterator<Triple> it = graph.find(match) ; it = it.filterKeep(filterReif) ; return WrappedIterator.create(it) ; }
public ExtendedIterator<Triple> findExposed(TripleMatch match) { Iterator<Triple> it = graph.find(match) ; it = Iter.filter(it, filterReif) ; return WrappedIterator.create(it) ; }
private Iter<Triple> forwardLinks(Node x, Collection<Node> excludeProperties) { Iter<Triple> iter1 = Iter.iter(graph.find(x, Node.ANY, Node.ANY)) ; if ( excludeProperties != null ) iter1 = iter1.filter(new FilterExclude(excludeProperties)) ; return iter1 ; }
static private void findContainers(Collection<Node> acc, Graph graph, Node typeNode) { ExtendedIterator<Triple> iter = graph.find(Node.ANY, RDF.type.asNode(), typeNode) ; while(iter.hasNext()) { Triple t = iter.next(); Node containerNode = t.getSubject() ; acc.add(containerNode) ; } }
private Iter<Triple> backwardLinks(Node x, Collection<Node> excludeProperties) { Iter<Triple> iter1 = Iter.iter(graph.find(Node.ANY, Node.ANY, x)) ; if ( excludeProperties != null ) iter1 = iter1.filter(new FilterExclude(excludeProperties)) ; return iter1 ; }
protected static Iter<Triple> forwardLinks(Graph graph, Node x, Collection<Node> excludeProperties) { Iter<Triple> iter1 = Iter.iter(graph.find(x, Node.ANY, Node.ANY)) ; if ( excludeProperties != null ) iter1 = iter1.filter(new FilterExclude(excludeProperties)) ; return iter1 ; }
static private void findContainers(Collection<Node> acc, Graph graph, Node typeNode) { ExtendedIterator<Triple> iter = graph.find(Node.ANY, RDF.type.asNode(), typeNode) ; while(iter.hasNext()) { Triple t = iter.next(); Node containerNode = t.getSubject() ; acc.add(containerNode) ; } }
@Override protected Iter<Quad> findInSpecificNamedGraph(Node g, Node s, Node p , Node o) { Graph graph = fetchGraph(g) ; if ( g == null ) return Iter.nullIter() ; return triples2quads(g, graph.find(s, p, o)) ; }
@Override public void write(Writer out, Graph graph, PrefixMap prefixMap, String baseURI, Context context) { Iterator<Triple> iter = graph.find(null, null, null) ; if ( charSpace == UTF8 ) write(out, iter) ; else { StreamRDF s = new WriterStreamRDFTuples(IO.wrap(out), ASCII) ; write$(s, iter) ; } }
@Override public Iterator<Quad> find(Node g, Node s, Node p , Node o) { if ( isWildcard(g) || isDefaultGraph(g) ) return triples2quadsDftGraph(graph.find(s, p, o)) ; else return new NullIterator<Quad>() ; }
/** Answer true if the node has the given type in the graph */ protected static boolean hasType( Node n, EnhGraph g, Resource type ) { // TODO this method doesn't seem to be called anywhere. boolean hasType = false; ClosableIterator<Triple> i = g.asGraph().find( n, RDF.type.asNode(), type.asNode() ); hasType = i.hasNext(); i.close(); return hasType; }