public class RdfStream extends com.google.common.collect.ForwardingIterator<com.hp.hpl.jena.graph.Triple>
Modifier and Type | Field and Description |
---|---|
protected javax.jcr.Session |
context |
protected com.hp.hpl.jena.graph.Node |
topic |
protected Iterator<com.hp.hpl.jena.graph.Triple> |
triples |
Constructor and Description |
---|
RdfStream()
Constructor that begins the stream without any triples.
|
RdfStream(T... triples)
Constructor that begins the stream with proffered triples.
|
RdfStream(T... statements)
Constructor that begins the stream with proffered statements.
|
RdfStream(T triple)
Constructor that begins the stream with proffered triple.
|
RdfStream(T triples)
Constructor that begins the stream with proffered triples.
|
RdfStream(T triples)
Constructor that begins the stream with proffered triples.
|
RdfStream(T triples)
Constructor that begins the stream with proffered triples.
|
Modifier and Type | Method and Description |
---|---|
com.hp.hpl.jena.rdf.model.Model |
asModel()
WARNING! This method exhausts the RdfStream on which it is called!
|
RdfStream |
concat(Collection<? extends com.hp.hpl.jena.graph.Triple> newTriples) |
RdfStream |
concat(Iterator<? extends com.hp.hpl.jena.graph.Triple> newTriples) |
<T extends com.hp.hpl.jena.graph.Triple> |
concat(T... newTriples) |
<T extends com.hp.hpl.jena.graph.Triple> |
concat(T newTriple) |
protected Iterator<com.hp.hpl.jena.graph.Triple> |
delegate() |
boolean |
equals(Object o) |
RdfStream |
filter(com.google.common.base.Predicate<? super com.hp.hpl.jena.graph.Triple> predicate)
As
Iterators.filter(Iterator, Predicate) while maintaining context. |
static RdfStream |
fromModel(com.hp.hpl.jena.rdf.model.Model model) |
int |
hashCode() |
Iterable<com.hp.hpl.jena.graph.Triple> |
iterable() |
RdfStream |
limit(Integer limit)
As
Iterators.limit(Iterator, int) while maintaining context. |
RdfStream |
namespace(String prefix,
String uri)
RdfStream
|
Map<String,String> |
namespaces() |
RdfStream |
namespaces(Map<String,String> nses) |
javax.jcr.Session |
session() |
RdfStream |
session(javax.jcr.Session session)
Sets the JCR context of this stream
|
RdfStream |
skip(Integer skipNum)
As
Iterators.advance(Iterator, int) while maintaining context. |
com.hp.hpl.jena.graph.Node |
topic() |
RdfStream |
topic(com.hp.hpl.jena.graph.Node topic)
Sets the topic of this stream
|
<ToType> Iterator<ToType> |
transform(com.google.common.base.Function<? super com.hp.hpl.jena.graph.Triple,ToType> f)
As
Iterators.transform(Iterator, Function) . |
<Tr extends com.hp.hpl.jena.graph.Triple,T extends Iterable<Tr>> |
withThisContext(T stream)
Returns the proffered
Triple s with the context of this RdfStream. |
<Tr extends com.hp.hpl.jena.graph.Triple,T extends Iterator<Tr>> |
withThisContext(T stream)
Returns the proffered
Triple s with the context of this RdfStream. |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEachRemaining
protected javax.jcr.Session context
protected com.hp.hpl.jena.graph.Node topic
public RdfStream(T triples)
triples
- public RdfStream(T triples)
triples
- public RdfStream(T triples)
triples
- @SafeVarargs public RdfStream(T... triples)
triples
- @SafeVarargs public RdfStream(T... statements)
statements
- public RdfStream(T triple)
triple
- public RdfStream()
public <Tr extends com.hp.hpl.jena.graph.Triple,T extends Iterator<Tr>> RdfStream withThisContext(T stream)
Triple
s with the context of this RdfStream.stream
- public <Tr extends com.hp.hpl.jena.graph.Triple,T extends Iterable<Tr>> RdfStream withThisContext(T stream)
Triple
s with the context of this RdfStream.stream
- public RdfStream concat(Iterator<? extends com.hp.hpl.jena.graph.Triple> newTriples)
newTriples
- Triples to add.public <T extends com.hp.hpl.jena.graph.Triple> RdfStream concat(T newTriple)
newTriple
- Triples to add.public <T extends com.hp.hpl.jena.graph.Triple> RdfStream concat(T... newTriples)
newTriples
- Triples to add.public RdfStream concat(Collection<? extends com.hp.hpl.jena.graph.Triple> newTriples)
newTriples
- Triples to add.public RdfStream limit(Integer limit)
Iterators.limit(Iterator, int)
while maintaining context.limit
- public RdfStream skip(Integer skipNum)
Iterators.advance(Iterator, int)
while maintaining context.skipNum
- public RdfStream filter(com.google.common.base.Predicate<? super com.hp.hpl.jena.graph.Triple> predicate)
Iterators.filter(Iterator, Predicate)
while maintaining context.predicate
- public <ToType> Iterator<ToType> transform(com.google.common.base.Function<? super com.hp.hpl.jena.graph.Triple,ToType> f)
Iterators.transform(Iterator, Function)
.f
- public RdfStream namespace(String prefix, String uri)
prefix
- uri
- public RdfStream namespaces(Map<String,String> nses)
nses
- public javax.jcr.Session session()
Session
in contextpublic RdfStream session(javax.jcr.Session session)
session
- The Session
in contextpublic com.hp.hpl.jena.graph.Node topic()
Node
topic in contextpublic RdfStream topic(com.hp.hpl.jena.graph.Node topic)
topic
- The Node
topic in contextpublic com.hp.hpl.jena.rdf.model.Model asModel()
Model
containing the prefix mappings and triples in this stream of RDFpublic static RdfStream fromModel(com.hp.hpl.jena.rdf.model.Model model)
model
- A Model
containing the prefix mappings and triples to be put into this stream of RDFprotected Iterator<com.hp.hpl.jena.graph.Triple> delegate()
delegate
in class com.google.common.collect.ForwardingIterator<com.hp.hpl.jena.graph.Triple>
public Iterable<com.hp.hpl.jena.graph.Triple> iterable()
public Map<String,String> namespaces()
Copyright © 2013-2015 DuraSpace, Inc.. All Rights Reserved.