Package com.complexible.common.rdf
Class ContextOverrideStatementSource
- java.lang.Object
-
- com.complexible.common.rdf.DelegatingStatementSource
-
- com.complexible.common.rdf.ContextOverrideStatementSource
-
- All Implemented Interfaces:
StatementSource
,java.io.Closeable
,java.lang.AutoCloseable
public class ContextOverrideStatementSource extends DelegatingStatementSource
StatementSource decorator which will override the context of the underlying source.
- Since:
- 0.8
- Version:
- 6.0
- Author:
- Michael Grove
-
-
Field Summary
-
Fields inherited from interface com.complexible.common.rdf.StatementSource
NO_ESTIMATE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 com.complexible.common.rdf.DelegatingStatementSource
close, containsVirtual, estimatedCount, getSource, inMemory
-
-
-
-
Method Detail
-
getContext
public Resource getContext()
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
- Overrides:
getContext
in classDelegatingStatementSource
- 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.
-
statements
public StatementIterator statements()
Return an iterator over the statements contained by this source.- Specified by:
statements
in interfaceStatementSource
- Overrides:
statements
in classDelegatingStatementSource
- Returns:
- an iteration over the statements.
-
streams
public java.util.List<RDFStream> streams()
Description copied from class:DelegatingStatementSource
Converts the statement source into one or more streams.- Specified by:
streams
in interfaceStatementSource
- Overrides:
streams
in classDelegatingStatementSource
-
-