java.lang.Object
org.apache.jena.sparql.graph.GraphFactory
Ways to make graphs and models
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.jena.graph.GraphCreate a graph.static org.apache.jena.graph.GraphCreate a graph that is a Jena memory graph.static org.apache.jena.graph.GraphDeprecated, for removal: This API element is subject to removal in a future version.static GraphTxnCreate an in-memory, thread-safe, transactional graph.static org.apache.jena.graph.GraphReturn an immutable, transactional, empty graph.static org.apache.jena.rdf.model.ModelCreate a model over a default graph (system-wide for default graph type)static org.apache.jena.rdf.model.ModelDeprecated, for removal: This API element is subject to removal in a future version.static voidsetDftGraphSameTerm(boolean value) Deprecated, for removal: This API element is subject to removal in a future version.Do not use.static org.apache.jena.graph.Graph
-
Constructor Details
-
GraphFactory
public GraphFactory()
-
-
Method Details
-
setDftGraphSameTerm
Deprecated, for removal: This API element is subject to removal in a future version.Do not use.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 causeConcurrentModificationException.- See Also:
-
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).
-
emptyGraph
public static org.apache.jena.graph.Graph emptyGraph()Return an immutable, transactional, empty graph.This fully supports transactions.
-
createDefaultGraph
public static org.apache.jena.graph.Graph createDefaultGraph()Create a graph.From Jena5, this is "same-term"
-
createJenaDefaultGraph
Deprecated, for removal: This API element is subject to removal in a future version.Create a graph - the Jena default graph. -
sinkGraph
public static org.apache.jena.graph.Graph sinkGraph() -
makeJenaDefaultModel
Deprecated, for removal: This API element is subject to removal in a future version. -
makeDefaultModel
public static org.apache.jena.rdf.model.Model makeDefaultModel()Create a model over a default graph (system-wide for default graph type)
-
createDefaultGraph()