Class GraphFactory

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

public class GraphFactory extends Object
Ways to make graphs and models
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.jena.graph.Graph
    Create a graph - ARQ-wide default type.
    static org.apache.jena.graph.Graph
    Create a graph that is a Jena memory graph.
    static org.apache.jena.graph.Graph
    Create a graph - the Jena default graph for ARQ and RIOT
    static org.apache.jena.graph.Graph
    Graph that uses same-term for find() and contains().
    static GraphTxn
    Create an in-memory, thread-safe, transactional graph.
    static org.apache.jena.rdf.model.Model
    Create a model over a default graph (ARQ-wide for default graph type)
    static org.apache.jena.rdf.model.Model
    Guaranteed call-through to Jena's ModelFactory operation
    static org.apache.jena.rdf.model.Model
    Create a model over a plain graph (small-scale use only)
    static void
    setDftGraphSameTerm(boolean value)
    Set the default mode for in-memory graphs : same term (true) or same value (false).
    static org.apache.jena.graph.Graph
     

    Methods inherited from class java.lang.Object

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

    • GraphFactory

      public GraphFactory()
  • Method Details

    • setDftGraphSameTerm

      public static void setDftGraphSameTerm(boolean value)
      Set the default mode for in-memory graphs : same term (true) or same value (false).

      This is initially set with system property "jena:graphSameTerm" with the system default is same value (Jena4).

      This affects createDefaultGraph().

    • createGraphMem

      public static org.apache.jena.graph.Graph createGraphMem()
      Create a graph that is a Jena memory graph. The created graph is not thread safe. Inappropriate use of graph iterators and streams may cause ConcurrentModificationException.
      See Also:
    • createTxnGraph

      public static GraphTxn createTxnGraph()
      Create an in-memory, thread-safe, transactional graph.

      This fully supports transactions, including abort to roll-back changes. It provides "autocommit" if operations are performed outside a transaction. The implementation adds a begin/commit around each add or delete so overheads can accumulate).

    • createDefaultGraph

      public static org.apache.jena.graph.Graph createDefaultGraph()
      Create a graph - ARQ-wide default type. In Jena5, this is "same-term"
    • createJenaDefaultGraph

      public static org.apache.jena.graph.Graph createJenaDefaultGraph()
      Create a graph - the Jena default graph for ARQ and RIOT
    • createPlainGraph

      public static org.apache.jena.graph.Graph createPlainGraph()
      Graph that uses same-term for find() and contains().
    • sinkGraph

      public static org.apache.jena.graph.Graph sinkGraph()
    • makeJenaDefaultModel

      public static org.apache.jena.rdf.model.Model makeJenaDefaultModel()
      Guaranteed call-through to Jena's ModelFactory operation
    • makeDefaultModel

      public static org.apache.jena.rdf.model.Model makeDefaultModel()
      Create a model over a default graph (ARQ-wide for default graph type)
    • makePlainModel

      public static org.apache.jena.rdf.model.Model makePlainModel()
      Create a model over a plain graph (small-scale use only)