org.eclipse.rdf4j.repository.util

## Class RDFInserter

- java.lang.Object
- - org.eclipse.rdf4j.rio.helpers.AbstractRDFHandler
  - - org.eclipse.rdf4j.repository.util.AbstractRDFInserter
    - - org.eclipse.rdf4j.repository.util.RDFInserter

- All Implemented Interfaces:
    RDFHandler

      public class RDFInserter
      extends AbstractRDFInserter

  An RDFHandler that adds RDF data to a repository.
  Author:
    jeen

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected RepositoryConnection` | `con` The connection to use for the add operations.

    - ### Fields inherited from class org.eclipse.rdf4j.repository.util.AbstractRDFInserter

      `contexts`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RDFInserter(RepositoryConnection con)` Creates a new RDFInserter object that preserves bnode IDs and that does not enforce any context upon statements that are reported to it.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addNamespace(String prefix, String name)`
    `protected void` | `addStatement(Resource subj, IRI pred, Value obj, Resource ctxt)`

    - ### Methods inherited from class org.eclipse.rdf4j.repository.util.AbstractRDFInserter

      `endRDF, enforceContext, enforcesContext, getContexts, handleNamespace, handleStatement, preservesBNodeIDs, setPreserveBNodeIDs`

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

      `handleComment, startRDF`

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

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

- - ### Field Detail

    - #### con

          protected final RepositoryConnection con

      The connection to use for the add operations.

  - ### Constructor Detail

    - #### RDFInserter

          public RDFInserter(RepositoryConnection con)

      Creates a new RDFInserter object that preserves bnode IDs and that does not enforce any context upon statements that are reported to it.
      Parameters:
        `con` - The connection to use for the add operations.

  - ### Method Detail

    - #### addNamespace

          protected void addNamespace(String prefix,
                                      String name)
                               throws RDF4JException

      Specified by:
        `addNamespace` in class `AbstractRDFInserter`
      Throws:
        `RDF4JException`

    - #### addStatement

          protected void addStatement(Resource subj,
                                      IRI pred,
                                      Value obj,
                                      Resource ctxt)
                               throws RDF4JException

      Specified by:
        `addStatement` in class `AbstractRDFInserter`
      Throws:
        `RDF4JException`

Copyright © 2015-2021 Eclipse Foundation. All Rights Reserved.