Class AbstractRDFInserter

    • Field Detail

      • contexts

        protected Resource[] contexts
        The contexts to add the statements to. If this variable is a non-empty array, statements will be added to the corresponding contexts.
    • Constructor Detail

      • AbstractRDFInserter

        protected AbstractRDFInserter​(ValueFactory vf)
        Creates a new RDFInserter object that preserves bnode IDs and that does not enforce any context upon statements that are reported to it.
    • Method Detail

      • setPreserveBNodeIDs

        public void setPreserveBNodeIDs​(boolean preserveBNodeIDs)
        Sets whether this RDFInserter should preserve blank node IDs.
        preserveBNodeIDs - The new value for this flag.
      • preservesBNodeIDs

        public boolean preservesBNodeIDs()
        Checks whether this RDFInserter preserves blank node IDs.
      • enforceContext

        public void enforceContext​(Resource... contexts)
        Enforces the supplied contexts upon all statements that are reported to this RDFInserter.
        contexts - the contexts to use. Use an empty array (not null!) to indicate no context(s) should be enforced.
      • enforcesContext

        public boolean enforcesContext()
        Checks whether this RDFInserter enforces its contexts upon all statements that are reported to it.
        true if it enforces its contexts, false otherwise.
      • getContexts

        public Resource[] getContexts()
        Gets the contexts that this RDFInserter enforces upon all statements that are reported to it (in case enforcesContext() returns true).
        A Resource[] identifying the contexts, or an empty array if no contexts is enforced.
      • handleNamespace

        public void handleNamespace​(String prefix,
                                    String name)
        Description copied from interface: RDFHandler
        Handles a namespace declaration/definition. A namespace declaration associates a (short) prefix string with the namespace's URI. The prefix for default namespaces, which do not have an associated prefix, are represented as empty strings.
        Specified by:
        handleNamespace in interface RDFHandler
        handleNamespace in class AbstractRDFHandler
        prefix - The prefix for the namespace, or an empty string in case of a default namespace.
        name - The URI that the prefix maps to.