Class GraphOps

java.lang.Object
org.apache.jena.sparql.graph.GraphOps

public class GraphOps extends Object
Some operations on graphs
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addAll(org.apache.jena.graph.Graph g, Iterable<org.apache.jena.graph.Triple> iter)
     
    static void
    addAll(org.apache.jena.graph.Graph g, Iterator<org.apache.jena.graph.Triple> iter)
     
    static boolean
    containsGraph(DatasetGraph dsg, org.apache.jena.graph.Node gn)
    Check whether a dataset contains a named graph of the given name.
    static void
    deleteAll(org.apache.jena.graph.Graph g, Iterable<org.apache.jena.graph.Triple> iter)
     
    static void
    deleteAll(org.apache.jena.graph.Graph g, Iterator<org.apache.jena.graph.Triple> iter)
     
    static org.apache.jena.graph.Graph
    getGraph(DatasetGraph dsg, org.apache.jena.graph.Node gn)
    Get a graph from the dataset - the graph name may be special - the union graph (which is immutable) or a special name for the default graph.
    static boolean
    isWrapped(org.apache.jena.graph.Graph graph)
    Remove one layer of graph wrapping.
    static org.apache.jena.graph.Graph
    Create an immutable union graph of all the named graphs in the dataset.
    static org.apache.jena.graph.Graph
    unionGraph(DatasetGraph dsg, Set<org.apache.jena.graph.Node> graphNames)
    Create an immutable union graph comprised of a set of named graphs.
    static org.apache.jena.graph.Graph
    unwrapAll(org.apache.jena.graph.Graph graph)
    Remove all layers of graph wrapping.
    static org.apache.jena.graph.Graph
    unwrapOne(org.apache.jena.graph.Graph graph)
    Remove one layer of graph wrapping.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GraphOps

      public GraphOps()
  • Method Details

    • containsGraph

      public static boolean containsGraph(DatasetGraph dsg, org.apache.jena.graph.Node gn)
      Check whether a dataset contains a named graph of the given name. Graph with special names (union and default) return true.
    • getGraph

      public static org.apache.jena.graph.Graph getGraph(DatasetGraph dsg, org.apache.jena.graph.Node gn)
      Get a graph from the dataset - the graph name may be special - the union graph (which is immutable) or a special name for the default graph.

      A graph name of "null" is interpreted as the default graph.

    • unionGraph

      public static org.apache.jena.graph.Graph unionGraph(DatasetGraph dsg, Set<org.apache.jena.graph.Node> graphNames)
      Create an immutable union graph comprised of a set of named graphs.
    • unionGraph

      public static org.apache.jena.graph.Graph unionGraph(DatasetGraph dsg)
      Create an immutable union graph of all the named graphs in the dataset. Future changes to the set of graphs in the dataset will be seen.
    • addAll

      public static void addAll(org.apache.jena.graph.Graph g, Iterator<org.apache.jena.graph.Triple> iter)
    • addAll

      public static void addAll(org.apache.jena.graph.Graph g, Iterable<org.apache.jena.graph.Triple> iter)
    • deleteAll

      public static void deleteAll(org.apache.jena.graph.Graph g, Iterator<org.apache.jena.graph.Triple> iter)
    • deleteAll

      public static void deleteAll(org.apache.jena.graph.Graph g, Iterable<org.apache.jena.graph.Triple> iter)
    • unwrapAll

      public static org.apache.jena.graph.Graph unwrapAll(org.apache.jena.graph.Graph graph)
      Remove all layers of graph wrapping. Returns the original graph if not wrapped at all.
    • isWrapped

      public static boolean isWrapped(org.apache.jena.graph.Graph graph)
      Remove one layer of graph wrapping.
    • unwrapOne

      public static org.apache.jena.graph.Graph unwrapOne(org.apache.jena.graph.Graph graph)
      Remove one layer of graph wrapping. Returns the original graph if not wrapped at all.