Package com.complexible.common.rdf
Class StatementSources.RDFStreamStatementSource
java.lang.Object
com.complexible.common.rdf.StatementSources.RDFStreamStatementSource
- All Implemented Interfaces:
StatementSource,Closeable,AutoCloseable
- Enclosing class:
StatementSources
public static class StatementSources.RDFStreamStatementSource
extends Object
implements StatementSource
-
Field Summary
Fields inherited from interface com.complexible.common.rdf.StatementSource
NO_ESTIMATE -
Constructor Summary
ConstructorsConstructorDescriptionRDFStreamStatementSource(RDFStream rdfStream) RDFStreamStatementSource(List<RDFStream> rdfStreams, Closeable closeable, boolean reusable) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()longReturns the estimated count of statements in this source orNO_ESTIMATEif the estimate is not known.Return the context these statements belong to.booleanReturns true if this source can be iterated multiple times with identical results.Return an iterator over the statements contained by this source.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, waitMethods inherited from interface com.complexible.common.rdf.StatementSource
containsVirtual, inMemory
-
Constructor Details
-
RDFStreamStatementSource
-
RDFStreamStatementSource
-
-
Method Details
-
statements
Description copied from interface:StatementSourceReturn an iterator over the statements contained by this source.- Specified by:
statementsin interfaceStatementSource- Returns:
- an iteration over the statements.
-
getContext
Description copied from interface:StatementSourceReturn the context these statements belong to. When non-null, this should override the context specified on the statements themselves.- Specified by:
getContextin 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
Description copied from interface:StatementSourceConverts the statement source into one or more streams.- Specified by:
streamsin interfaceStatementSource
-
isReusable
public boolean isReusable()Description copied from interface:StatementSourceReturns true if this source can be iterated multiple times with identical results. Sources backed by one-shot iterators or input streams are not reusable.- Specified by:
isReusablein interfaceStatementSource- Returns:
- true if
StatementSource.statements()andStatementSource.streams()can be called multiple times
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
estimatedCount
public long estimatedCount()Description copied from interface:StatementSourceReturns the estimated count of statements in this source orNO_ESTIMATEif the estimate is not known.- Specified by:
estimatedCountin interfaceStatementSource
-