Class BufferingGraph

java.lang.Object
org.apache.jena.sparql.graph.GraphWrapper
org.apache.jena.system.buffering.BufferingGraph
All Implemented Interfaces:
org.apache.jena.graph.Graph, BufferingCtl

public class BufferingGraph extends GraphWrapper implements BufferingCtl
A graph that buffers changes (including prefixes changes) until flush() or flushDirect() is called.
  • Field Summary

    Fields inherited from interface org.apache.jena.graph.Graph

    emptyGraph
  • Constructor Summary

    Constructors
    Constructor
    Description
    BufferingGraph(org.apache.jena.graph.Graph graph)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(org.apache.jena.graph.Triple t)
     
    org.apache.jena.graph.Graph
     
    boolean
    contains(org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
     
    boolean
    contains(org.apache.jena.graph.Triple triple)
     
    create(org.apache.jena.graph.Graph graph)
     
    void
    delete(org.apache.jena.graph.Triple t)
     
    org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Triple>
    find(org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
     
    org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Triple>
    find(org.apache.jena.graph.Triple m)
     
    void
    Flush the changes to the base graph, using a Graph transaction if possible.
    void
    Flush the changes directly to the base graph.
    org.apache.jena.graph.Graph
     
    Set<org.apache.jena.graph.Triple>
     
    org.apache.jena.shared.PrefixMapping
     
    boolean
     
    int
     

    Methods inherited from class org.apache.jena.sparql.graph.GraphWrapper

    clear, close, dependsOn, get, getCapabilities, getEventManager, getTransactionHandler, isClosed, isIsomorphicWith, remove

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.jena.graph.Graph

    add, delete, find, sizeLong, stream, stream
  • Constructor Details

    • BufferingGraph

      public BufferingGraph(org.apache.jena.graph.Graph graph)
  • Method Details

    • create

      public static BufferingGraph create(org.apache.jena.graph.Graph graph)
    • base

      public org.apache.jena.graph.Graph base()
    • flush

      public void flush()
      Flush the changes to the base graph, using a Graph transaction if possible.
      Specified by:
      flush in interface BufferingCtl
    • flushDirect

      public void flushDirect()
      Flush the changes directly to the base graph.
    • add

      public void add(org.apache.jena.graph.Triple t)
      Specified by:
      add in interface org.apache.jena.graph.Graph
      Overrides:
      add in class GraphWrapper
    • delete

      public void delete(org.apache.jena.graph.Triple t)
      Specified by:
      delete in interface org.apache.jena.graph.Graph
      Overrides:
      delete in class GraphWrapper
    • getAdded

      public org.apache.jena.graph.Graph getAdded()
    • getDeleted

      public Set<org.apache.jena.graph.Triple> getDeleted()
    • contains

      public boolean contains(org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
      Specified by:
      contains in interface org.apache.jena.graph.Graph
      Overrides:
      contains in class GraphWrapper
    • contains

      public boolean contains(org.apache.jena.graph.Triple triple)
      Specified by:
      contains in interface org.apache.jena.graph.Graph
      Overrides:
      contains in class GraphWrapper
    • find

      public org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Triple> find(org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
      Specified by:
      find in interface org.apache.jena.graph.Graph
      Overrides:
      find in class GraphWrapper
    • find

      public org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Triple> find(org.apache.jena.graph.Triple m)
      Specified by:
      find in interface org.apache.jena.graph.Graph
      Overrides:
      find in class GraphWrapper
    • getPrefixMapping

      public org.apache.jena.shared.PrefixMapping getPrefixMapping()
      Specified by:
      getPrefixMapping in interface org.apache.jena.graph.Graph
      Overrides:
      getPrefixMapping in class GraphWrapper
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface org.apache.jena.graph.Graph
      Overrides:
      isEmpty in class GraphWrapper
    • size

      public int size()
      Specified by:
      size in interface org.apache.jena.graph.Graph
      Overrides:
      size in class GraphWrapper