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`

public class DelegatingStatementSource extends Object implements StatementSource

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
  Constructor
  Description
  `DelegatingStatementSource(StatementSource theSource)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `boolean`
  `containsVirtual()`
  Returns true if the statement source represents, at least partially, the contents of a Virtual Graph
  `long`
  `estimatedCount()`
  Returns the estimated count of statements in this source or `NO_ESTIMATE` if the estimate is not known.
  `Resource`
  `getContext()`
  Return the context these statements belong to.
  `StatementSource`
  `getSource()`
  `boolean`
  `inMemory()`
  Returns true if all statements are held in memory
  `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 java.lang.Object

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

- ## Constructor Details

  - ### DelegatingStatementSource

    public DelegatingStatementSource(StatementSource theSource)

- ## Method Details

  - ### getSource

    public StatementSource getSource()

  - ### statements

    public StatementIterator statements()
    Return an iterator over the statements contained by this source.
    Specified by:
      `statements` in interface `StatementSource`
    Returns:
      an iteration over the statements.

  - ### streams

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

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

    public void close() throws IOException
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `Closeable`
    Throws:
      `IOException`

  - ### containsVirtual

    public boolean containsVirtual()
    Description copied from interface: `StatementSource`
    Returns true if the statement source represents, at least partially, the contents of a Virtual Graph
    Specified by:
      `containsVirtual` in interface `StatementSource`

  - ### estimatedCount

    public long estimatedCount()
    Description copied from interface: `StatementSource`
    Returns the estimated count of statements in this source or `NO_ESTIMATE` if the estimate is not known.
    Specified by:
      `estimatedCount` in interface `StatementSource`

  - ### inMemory

    public boolean inMemory()
    Description copied from interface: `StatementSource`
    Returns true if all statements are held in memory
    Specified by:
      `inMemory` in interface `StatementSource`
    Returns:
      true if all statements are held in memory