Class WrapperDataset

  • All Implemented Interfaces:
    AutoCloseable, org.apache.commons.rdf.api.Dataset, org.apache.commons.rdf.api.GraphLike<org.apache.commons.rdf.api.Quad>

    public class WrapperDataset
    extends Object
    implements org.apache.commons.rdf.api.Dataset
    A wrapper class for Dataset objects.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected WrapperDataset​(org.apache.commons.rdf.api.Dataset original)
      Create a new dataset wrapper object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.BlankNodeOrIRI subject, org.apache.commons.rdf.api.IRI predicate, org.apache.commons.rdf.api.RDFTerm object)  
      void add​(org.apache.commons.rdf.api.Quad quad)  
      void clear()  
      boolean contains​(Optional<org.apache.commons.rdf.api.BlankNodeOrIRI> graphName, org.apache.commons.rdf.api.BlankNodeOrIRI subject, org.apache.commons.rdf.api.IRI predicate, org.apache.commons.rdf.api.RDFTerm object)  
      boolean contains​(org.apache.commons.rdf.api.Quad quad)  
      org.apache.commons.rdf.api.Graph getGraph()  
      Optional<org.apache.commons.rdf.api.Graph> getGraph​(org.apache.commons.rdf.api.BlankNodeOrIRI graphName)  
      Stream<org.apache.commons.rdf.api.BlankNodeOrIRI> getGraphNames()  
      void remove​(Optional<org.apache.commons.rdf.api.BlankNodeOrIRI> graphName, org.apache.commons.rdf.api.BlankNodeOrIRI subject, org.apache.commons.rdf.api.IRI predicate, org.apache.commons.rdf.api.RDFTerm object)  
      void remove​(org.apache.commons.rdf.api.Quad quad)  
      long size()  
      Stream<? extends org.apache.commons.rdf.api.Quad> stream()  
      Stream<? extends org.apache.commons.rdf.api.Quad> stream​(Optional<org.apache.commons.rdf.api.BlankNodeOrIRI> graphName, org.apache.commons.rdf.api.BlankNodeOrIRI subject, org.apache.commons.rdf.api.IRI predicate, org.apache.commons.rdf.api.RDFTerm object)  
      • Methods inherited from interface org.apache.commons.rdf.api.Dataset

        close, iterate, iterate
    • Constructor Detail

      • WrapperDataset

        protected WrapperDataset​(org.apache.commons.rdf.api.Dataset original)
        Create a new dataset wrapper object.
        Parameters:
        original - The original dataset to be wrapped, may not be null
    • Method Detail

      • add

        public void add​(org.apache.commons.rdf.api.Quad quad)
        Specified by:
        add in interface org.apache.commons.rdf.api.Dataset
        Specified by:
        add in interface org.apache.commons.rdf.api.GraphLike<org.apache.commons.rdf.api.Quad>
      • add

        public void add​(org.apache.commons.rdf.api.BlankNodeOrIRI graphName,
                        org.apache.commons.rdf.api.BlankNodeOrIRI subject,
                        org.apache.commons.rdf.api.IRI predicate,
                        org.apache.commons.rdf.api.RDFTerm object)
        Specified by:
        add in interface org.apache.commons.rdf.api.Dataset
      • contains

        public boolean contains​(org.apache.commons.rdf.api.Quad quad)
        Specified by:
        contains in interface org.apache.commons.rdf.api.Dataset
        Specified by:
        contains in interface org.apache.commons.rdf.api.GraphLike<org.apache.commons.rdf.api.Quad>
      • contains

        public boolean contains​(Optional<org.apache.commons.rdf.api.BlankNodeOrIRI> graphName,
                                org.apache.commons.rdf.api.BlankNodeOrIRI subject,
                                org.apache.commons.rdf.api.IRI predicate,
                                org.apache.commons.rdf.api.RDFTerm object)
        Specified by:
        contains in interface org.apache.commons.rdf.api.Dataset
      • getGraph

        public org.apache.commons.rdf.api.Graph getGraph()
        Specified by:
        getGraph in interface org.apache.commons.rdf.api.Dataset
      • getGraph

        public Optional<org.apache.commons.rdf.api.Graph> getGraph​(org.apache.commons.rdf.api.BlankNodeOrIRI graphName)
        Specified by:
        getGraph in interface org.apache.commons.rdf.api.Dataset
      • getGraphNames

        public Stream<org.apache.commons.rdf.api.BlankNodeOrIRI> getGraphNames()
        Specified by:
        getGraphNames in interface org.apache.commons.rdf.api.Dataset
      • remove

        public void remove​(org.apache.commons.rdf.api.Quad quad)
        Specified by:
        remove in interface org.apache.commons.rdf.api.Dataset
        Specified by:
        remove in interface org.apache.commons.rdf.api.GraphLike<org.apache.commons.rdf.api.Quad>
      • remove

        public void remove​(Optional<org.apache.commons.rdf.api.BlankNodeOrIRI> graphName,
                           org.apache.commons.rdf.api.BlankNodeOrIRI subject,
                           org.apache.commons.rdf.api.IRI predicate,
                           org.apache.commons.rdf.api.RDFTerm object)
        Specified by:
        remove in interface org.apache.commons.rdf.api.Dataset
      • clear

        public void clear()
        Specified by:
        clear in interface org.apache.commons.rdf.api.Dataset
        Specified by:
        clear in interface org.apache.commons.rdf.api.GraphLike<org.apache.commons.rdf.api.Quad>
      • size

        public long size()
        Specified by:
        size in interface org.apache.commons.rdf.api.Dataset
        Specified by:
        size in interface org.apache.commons.rdf.api.GraphLike<org.apache.commons.rdf.api.Quad>
      • stream

        public Stream<? extends org.apache.commons.rdf.api.Quad> stream()
        Specified by:
        stream in interface org.apache.commons.rdf.api.Dataset
        Specified by:
        stream in interface org.apache.commons.rdf.api.GraphLike<org.apache.commons.rdf.api.Quad>
      • stream

        public Stream<? extends org.apache.commons.rdf.api.Quad> stream​(Optional<org.apache.commons.rdf.api.BlankNodeOrIRI> graphName,
                                                                        org.apache.commons.rdf.api.BlankNodeOrIRI subject,
                                                                        org.apache.commons.rdf.api.IRI predicate,
                                                                        org.apache.commons.rdf.api.RDFTerm object)
        Specified by:
        stream in interface org.apache.commons.rdf.api.Dataset