本文整理了Java中com.hp.hpl.jena.graph.Graph.find()
方法的一些代码示例,展示了Graph.find()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graph.find()
方法的具体详情如下:
包路径:com.hp.hpl.jena.graph.Graph
类名称:Graph
方法名:find
[英]Returns an iterator over Triple.
[中]
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core
/**
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 ); }
代码示例来源:origin: com.hp.hpl.jena/arq
public ExtendedIterator<Triple> findEither(TripleMatch match, boolean showHidden)
{
if ( showHidden )
return NullIterator.instance() ;
else
return graph.find(match) ;
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
final protected Iter<Triple> between(Node x, Node z)
{
Iter<Triple> iter1 = Iter.iter(graph.find(x, Node.ANY, z)) ;
return iter1 ;
}
代码示例来源:origin: com.hp.hpl.jena/arq
private Iter<Triple> between(Node x, Node z)
{
Iter<Triple> iter1 = Iter.iter(graph.find(x, Node.ANY, z)) ;
return iter1 ;
}
代码示例来源:origin: com.hp.hpl.jena/arq
@Override
protected Iterator<Quad> findInDftGraph(Node s, Node p, Node o)
{
if ( true ) throw new UnsupportedOperationException() ;
return triples2quadsDftGraph(graph.find(s, p ,o)) ; }
代码示例来源:origin: com.hp.hpl.jena/arq
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()) ;
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core
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()) ;
}
}
代码示例来源:origin: com.hp.hpl.jena/arq
@Override
protected Iterator<Quad> findInDftGraph(Node s, Node p , Node o)
{
return triples2quadsDftGraph(getDefaultGraph().find(s, p, o)) ;
}
代码示例来源:origin: com.hp.hpl.jena/arq
public static Iterator<Quad> findInSpecificNamedGraph(DatasetGraphCaching dsg, Node g, Node s, Node p, Node o)
{
return triples2quadsDftGraph(dsg.getGraph(g).find(s, p, o)) ;
}
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core
/**
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) ;
}
代码示例来源:origin: com.hp.hpl.jena/arq
public ExtendedIterator<Triple> findExposed(TripleMatch match)
{
Iterator<Triple> it = graph.find(match) ;
it = Iter.filter(it, filterReif) ;
return WrappedIterator.create(it) ;
}
代码示例来源:origin: com.hp.hpl.jena/arq
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 ;
}
代码示例来源:origin: com.hp.hpl.jena/arq
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) ;
}
}
代码示例来源:origin: com.hp.hpl.jena/arq
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 ;
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
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 ;
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
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) ;
}
}
代码示例来源:origin: com.hp.hpl.jena/arq
@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)) ;
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
@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) ;
}
}
代码示例来源:origin: com.hp.hpl.jena/arq
@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>() ;
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core
/** 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;
}
内容来源于网络,如有侵权,请联系作者删除!