Package com.complexible.common.rdf

# Class ContextOverrideStatementSource

java.lang.Object
com.complexible.common.rdf.DelegatingStatementSource
com.complexible.common.rdf.ContextOverrideStatementSource

All Implemented Interfaces:
  `StatementSource`, `Closeable`, `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

  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.
  `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`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### 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 interface `StatementSource`
    Overrides:
      `getContext` in class `DelegatingStatementSource`
    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 interface `StatementSource`
    Overrides:
      `statements` in class `DelegatingStatementSource`
    Returns:
      an iteration over the statements.

  - ### streams

    public List<RDFStream> streams()
    Description copied from class: `DelegatingStatementSource`
    Converts the statement source into one or more streams.
    Specified by:
      `streams` in interface `StatementSource`
    Overrides:
      `streams` in class `DelegatingStatementSource`