Class GraphFactory

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

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

    • GraphFactory

      public GraphFactory()
  • Method Details

    • createGraphMem

      public static 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 Graph createDefaultGraph()
      Create a graph - ARQ-wide default type
    • createJenaDefaultGraph

      public static Graph createJenaDefaultGraph()
      Create a graph - always the Jena default graph type
    • createPlainGraph

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

      public static Graph sinkGraph()
    • makeJenaDefaultModel

      public static Model makeJenaDefaultModel()
      Guaranteed call-through to Jena's ModelFactory operation
    • makeDefaultModel

      public static Model makeDefaultModel()
      Create a model over a default graph (ARQ-wide for default graph type)
    • makePlainModel

      public static Model makePlainModel()
      Create a model over a plain graph (small-scale use only)