public interface StatementSource extends Closeable
Interface which represents a source of a set of RDF statements. The actual source of the
statements can be an in-memory graph, a file on disk, a socket or network connection, etc. This differs from
a Model where the statements are expected to be in memory; StatementSource allows for statements to come from
any source, which allows for sources of Statements which exceed main memory.
Care should be taken to sure that all StatementSource objects are closed to free up any resources they are holding.
| Modifier and Type | Field and Description |
|---|---|
static long |
NO_ESTIMATE |
| Modifier and Type | Method and Description |
|---|---|
default long |
estimatedCount()
Returns the estimated count of statements in this source or
NO_ESTIMATE if the estimate is not known. |
org.openrdf.model.Resource |
getContext()
Return the context these statements belong to.
|
StatementIterator |
statements()
Return an iterator over the statements contained by this source.
|
List<RDFStream> |
streams()
Converts the statement source into one or more streams.
|
static final long NO_ESTIMATE
StatementIterator statements()
Closing the iterator, when applicable, does not clean
up the source, only the iterator. You must close the source separately.
Implementations must ensure that this method can be called more than once and the resulting iterators can be used independently.org.openrdf.model.Resource getContext()
default long estimatedCount()
NO_ESTIMATE if the estimate is not known.Copyright © 2010-2016 Stardog Union. All Rights Reserved.