Package com.complexible.common.rdf
Class DelegatingStatementSource
java.lang.Object
com.complexible.common.rdf.DelegatingStatementSource
- All Implemented Interfaces:
StatementSource,Closeable,AutoCloseable
- Direct Known Subclasses:
ContextFallbackStatementSource,ContextOverrideStatementSource
Implementation of a StatementSource which can be used as the base for StatementSource
decorator implementations.
- Since:
- 0.8
- Version:
- 4.0
- Author:
- Michael Grove
-
Field Summary
Fields inherited from interface com.complexible.common.rdf.StatementSource
NO_ESTIMATE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanReturns true if the statement source represents, at least partially, the contents of a Virtual GraphlongReturns the estimated count of statements in this source orNO_ESTIMATEif the estimate is not known.Return the context these statements belong to.booleaninMemory()Returns true if all statements are held in memoryReturn an iterator over the statements contained by this source.streams()Converts the statement source into one or more streams.
-
Constructor Details
-
DelegatingStatementSource
-
-
Method Details
-
getSource
-
statements
Return an iterator over the statements contained by this source.- Specified by:
statementsin interfaceStatementSource- Returns:
- an iteration over the statements.
-
streams
Converts the statement source into one or more streams.- Specified by:
streamsin interfaceStatementSource
-
getContext
Return 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.
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
containsVirtual
public boolean containsVirtual()Description copied from interface:StatementSourceReturns true if the statement source represents, at least partially, the contents of a Virtual Graph- Specified by:
containsVirtualin interfaceStatementSource
-
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
-
inMemory
public boolean inMemory()Description copied from interface:StatementSourceReturns true if all statements are held in memory- Specified by:
inMemoryin interfaceStatementSource- Returns:
- true if all statements are held in memory
-