Class WrapperGraph

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

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

      Constructors 
      Modifier Constructor Description
      protected WrapperGraph​(org.apache.commons.rdf.api.Graph original)
      Create a new graph wrapper object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(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.Triple triple)  
      void clear()  
      boolean contains​(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.Triple triple)  
      void remove​(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.Triple triple)  
      long size()  
      Stream<? extends org.apache.commons.rdf.api.Triple> stream()  
      Stream<? extends org.apache.commons.rdf.api.Triple> stream​(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.Graph

        close, getTriples, getTriples, iterate, iterate
    • Constructor Detail

      • WrapperGraph

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

      • add

        public void add​(org.apache.commons.rdf.api.Triple triple)
        Specified by:
        add in interface org.apache.commons.rdf.api.Graph
        Specified by:
        add in interface org.apache.commons.rdf.api.GraphLike<org.apache.commons.rdf.api.Triple>
      • add

        public void add​(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.Graph
      • contains

        public boolean contains​(org.apache.commons.rdf.api.Triple triple)
        Specified by:
        contains in interface org.apache.commons.rdf.api.Graph
        Specified by:
        contains in interface org.apache.commons.rdf.api.GraphLike<org.apache.commons.rdf.api.Triple>
      • contains

        public boolean contains​(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.Graph
      • remove

        public void remove​(org.apache.commons.rdf.api.Triple triple)
        Specified by:
        remove in interface org.apache.commons.rdf.api.Graph
        Specified by:
        remove in interface org.apache.commons.rdf.api.GraphLike<org.apache.commons.rdf.api.Triple>
      • remove

        public void remove​(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.Graph
      • clear

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

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

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

        public Stream<? extends org.apache.commons.rdf.api.Triple> stream​(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.Graph