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)
Tr
- extends Triple
T
- extends Iterable
triples
- the triplespublic RdfStream(T triples)
Tr
- extends Triple
T
- extends Iterable
triples
- the triplespublic RdfStream(T triples)
Tr
- extends Triple
T
- extends Collection
triples
- the triples@SafeVarargs public RdfStream(T... triples)
T
- extends Triple
triples
- the triples@SafeVarargs public RdfStream(T... statements)
T
- extends Statement
statements
- the statementspublic RdfStream(T triple)
T
- extends Triple
triple
- the triplepublic 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.Tr
- extends Triple
T
- extends Iterator
stream
- the streampublic <Tr extends com.hp.hpl.jena.graph.Triple,T extends Iterable<Tr>> RdfStream withThisContext(T stream)
Triple
s with the context of this RdfStream.Tr
- extends Triple
T
- extends Iterator
stream
- the streampublic 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)
T
- extends Triple
newTriple
- Triples to add.public <T extends com.hp.hpl.jena.graph.Triple> RdfStream concat(T... newTriples)
T
- extends Triple
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
- the limitpublic RdfStream skip(Integer skipNum)
Iterators.advance(Iterator, int)
while maintaining context.skipNum
- the skip numberpublic RdfStream filter(com.google.common.base.Predicate<? super com.hp.hpl.jena.graph.Triple> predicate)
Iterators.filter(Iterator, Predicate)
while maintaining context.predicate
- the predicatepublic <ToType> Iterator<ToType> transform(com.google.common.base.Function<? super com.hp.hpl.jena.graph.Triple,ToType> f)
Iterators.transform(Iterator, Function)
.ToType
- extends Iterator
f
- the parameter fpublic RdfStream namespace(String prefix, String uri)
prefix
- the prefixuri
- the uripublic RdfStream namespaces(Map<String,String> nses)
nses
- the property of nsespublic 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.