Package com.complexible.common.rdf
Class StatementSources.RDFStreamStatementSource
- java.lang.Object
-
- com.complexible.common.rdf.StatementSources.RDFStreamStatementSource
-
- All Implemented Interfaces:
StatementSource
,java.io.Closeable
,java.lang.AutoCloseable
- Enclosing class:
- StatementSources
public static class StatementSources.RDFStreamStatementSource extends java.lang.Object implements StatementSource
-
-
Field Summary
-
Fields inherited from interface com.complexible.common.rdf.StatementSource
NO_ESTIMATE
-
-
Constructor Summary
Constructors Constructor Description RDFStreamStatementSource(RDFStream rdfStream)
RDFStreamStatementSource(RDFStream rdfStream, java.io.Closeable closeable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
long
estimatedCount()
Returns the estimated count of statements in this source orNO_ESTIMATE
if the estimate is not known.Resource
getContext()
Return the context these statements belong to.StatementIterator
statements()
Return an iterator over the statements contained by this source.java.util.List<RDFStream>
streams()
Converts the statement source into one or more streams.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.complexible.common.rdf.StatementSource
containsVirtual, inMemory
-
-
-
-
Method Detail
-
statements
public StatementIterator statements()
Description copied from interface:StatementSource
Return an iterator over the statements contained by this source.- Specified by:
statements
in interfaceStatementSource
- Returns:
- an iteration over the statements.
-
getContext
public Resource getContext()
Description copied from interface:StatementSource
Return the context these statements belong to. When non-null, this should override the context specified on the statements themselves.- Specified by:
getContext
in interfaceStatementSource
- Returns:
- the context of all the statements from this source, or `null` if there is no context (for all of them) or they each have their own context specified.
-
streams
public java.util.List<RDFStream> streams()
Description copied from interface:StatementSource
Converts the statement source into one or more streams.- Specified by:
streams
in interfaceStatementSource
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
estimatedCount
public long estimatedCount()
Description copied from interface:StatementSource
Returns the estimated count of statements in this source orNO_ESTIMATE
if the estimate is not known.- Specified by:
estimatedCount
in interfaceStatementSource
-
-