public class DatasetGraphFactory extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
DatasetGraphFactory.GraphMaker
Interface for making graphs when a dataset needs to add a new graph.
|
| Modifier and Type | Field and Description |
|---|---|
static DatasetGraphFactory.GraphMaker |
graphMakerMem
A graph maker that creates unnamed Jena default graphs
|
static DatasetGraphFactory.GraphMaker |
graphMakerNamedGraphMem
A graph maker that creates
NamedGraphs around a Jena default graphs |
static DatasetGraphFactory.GraphMaker |
graphMakerNull
A graph maker that doesn't make graphs.
|
| Constructor and Description |
|---|
DatasetGraphFactory() |
| Modifier and Type | Method and Description |
|---|---|
static DatasetGraph |
cloneStructure(DatasetGraph dsg)
Clone the structure of a
DatasetGraph. |
static DatasetGraph |
create()
Create an in-memory
Dataset. |
static DatasetGraph |
create(DatasetGraph dsg)
Deprecated.
|
static DatasetGraph |
create(Graph graph)
Create a DatasetGraph starting with a single graph.
|
static DatasetGraph |
createGeneral()
Create a general-purpose
Dataset.Any graphs needed are in-memory unless explicitly added with Dataset.addNamedModel(java.lang.String, org.apache.jena.rdf.model.Model). |
static DatasetGraph |
createMem()
Deprecated.
Prefer
createTxnMem() or create() or, for special cases, createGeneral(). |
static DatasetGraph |
createOneGraph(Graph graph)
Deprecated.
Use {#wrap(Graph)}
|
static DatasetGraph |
createTxnMem()
Create an in-memory, transactional
Dataset. |
static DatasetGraph |
wrap(Graph graph)
Create a DatasetGraph which only ever has a single default graph.
|
public static DatasetGraphFactory.GraphMaker graphMakerNull
public static DatasetGraphFactory.GraphMaker graphMakerMem
public static DatasetGraphFactory.GraphMaker graphMakerNamedGraphMem
NamedGraphs around a Jena default graphspublic static DatasetGraph create()
Dataset.
See also createTxnMem() for a transactional dataset.
This implementation copies models when Dataset.addNamedModel(String, Model) is called.
This implementation provides "best effort" transactions; it only provides MRSW locking.
Use createTxnMem() for a proper in-memory transactional DatasetGraph.
createTxnMem()public static DatasetGraph createTxnMem()
Dataset.
This fully supports transactions, including abort to roll-back changes. It provides "autocommit" if operations are performed outside a transaction but with a performance impact (the implementation adds a begin/commit around each add or delete so overheads can accumulate).
public static DatasetGraph createGeneral()
Dataset.Dataset.addNamedModel(java.lang.String, org.apache.jena.rdf.model.Model).
This dataset type can contain graphs from any source when added via Dataset.addNamedModel(java.lang.String, org.apache.jena.rdf.model.Model).
These are held as links to the supplied graph and not copied.
This dataset does not support the graph indexing feature of jena-text.
This dataset does not support serialized transactions (it only provides MRSW locking).
createTxnMem()@Deprecated public static DatasetGraph createMem()
createTxnMem() or create() or, for special cases, createGeneral().Dataset.
See also createTxnMem() for a transactional dataset.
Use createGeneral() when needing to add graphs with mixed characteristics,
e.g. inference graphs, or specific graphs from TDB.
It does not support the graph indexing feature of jena-text.
This factory operation is marked "deprecated" because the general purpose "add named graph of any implementation"
feature will be removed; this feature is now provided by createGeneral().
createTxnMem()@Deprecated public static DatasetGraph create(DatasetGraph dsg)
cloneStructure(org.apache.jena.sparql.core.DatasetGraph)public static DatasetGraph cloneStructure(DatasetGraph dsg)
DatasetGraph.public static DatasetGraph create(Graph graph)
public static DatasetGraph wrap(Graph graph)
@Deprecated public static DatasetGraph createOneGraph(Graph graph)
Licenced under the Apache License, Version 2.0