Package org.eclipse.rdf4j.rio.helpers

## Class StatementCollector

- java.lang.Object
- - org.eclipse.rdf4j.rio.helpers.AbstractRDFHandler
  - - org.eclipse.rdf4j.rio.helpers.ContextStatementCollector
    - - org.eclipse.rdf4j.rio.helpers.StatementCollector

- All Implemented Interfaces:
    `RDFHandler`

      public class StatementCollector
      extends ContextStatementCollector

  A RDFHandler that can be used to collect reported statements in collections.
  Author:
    Arjohn Kampman

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `StatementCollector()` | Creates a new StatementCollector that uses a new ArrayList to store the reported statements and a new LinkedHashMap to store the reported namespaces.
    `StatementCollector​(Collection<Statement> statements)` | Creates a new StatementCollector that stores reported statements in the supplied collection and that uses a new LinkedHashMap to store the reported namespaces.
    `StatementCollector​(Collection<Statement> statements, Map<String,​String> namespaces)` | Creates a new StatementCollector that stores reported statements and namespaces in the supplied containers.

  - ### Method Summary

    - ### Methods inherited from class org.eclipse.rdf4j.rio.helpers.ContextStatementCollector

      `clear, getNamespaces, getStatements, handleNamespace, handleStatement`

    - ### Methods inherited from class org.eclipse.rdf4j.rio.helpers.AbstractRDFHandler

      `endRDF, handleComment, startRDF`

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

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

- - ### Constructor Detail

    - #### StatementCollector

          public StatementCollector()

      Creates a new StatementCollector that uses a new ArrayList to store the reported statements and a new LinkedHashMap to store the reported namespaces.

    - #### StatementCollector

          public StatementCollector​(Collection<Statement> statements)

      Creates a new StatementCollector that stores reported statements in the supplied collection and that uses a new LinkedHashMap to store the reported namespaces.

    - #### StatementCollector

          public StatementCollector​(Collection<Statement> statements,
                                    Map<String,​String> namespaces)

      Creates a new StatementCollector that stores reported statements and namespaces in the supplied containers.