| Constructor and Description |
|---|
DatasetFactory() |
| Modifier and Type | Method and Description |
|---|---|
static Dataset |
assemble(Model model)
Assemble a dataset from the model
|
static Dataset |
assemble(Resource resource)
Assemble a dataset from a resource
|
static Dataset |
assemble(String filename)
Assemble a dataset from the model in a file
|
static Dataset |
assemble(String filename,
String resourceURI)
Assemble a dataset from the model in a file
|
static Dataset |
create()
Create an in-memory
Dataset. |
static Dataset |
create(Dataset dataset)
Deprecated.
This operation may be removed.
|
static Dataset |
create(DatasetGraph dataset)
Deprecated.
|
static Dataset |
create(List<String> uriList) |
static Dataset |
create(List<String> uriList,
List<String> namedSourceList)
Create a dataset based on two list of URIs.
|
static Dataset |
create(List<String> uriList,
List<String> namedSourceList,
String baseURI)
Create a named graph container based on two list of URIs.
|
static Dataset |
create(Model model)
Create a dataset, starting with the model argument as the default graph of the
dataset.
|
static Dataset |
create(String uri) |
static Dataset |
create(String uri,
List<String> namedSourceList)
Create a dataset container based on two list of URIs.
|
static Dataset |
create(String uri,
List<String> namedSourceList,
String baseURI)
Create a named graph container based on two list of URIs.
|
static Dataset |
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 Dataset |
createMem()
Deprecated.
Prefer
createTxnMem() or create() or, for special cases, createGeneral(). |
static Dataset |
createNamed(List<String> namedSourceList) |
static Dataset |
createTxnMem()
Create an in-memory.
|
static Dataset |
wrap(DatasetGraph dataset)
Wrap a
DatasetGraph to make a dataset |
static Dataset |
wrap(Model model)
Wrap a
Model to make a dataset; the model is the default graph of the RDF Dataset. |
public static Dataset create()
Dataset.
See also createTxnMem() for a transactional dataset.
This implementation copies models when Dataset.addNamedModel(String, Model) is called.
This implementation does not support serialized transactions (it only provides MRSW locking).
createTxnMem()public static Dataset 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 Dataset 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 Dataset 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()public static Dataset create(Model model)
Use wrap(Model) to put dataset functionality around a single
model when named graphs will not be added.
model - The model for the default graph@Deprecated public static Dataset create(Dataset dataset)
dataset - Dataset to clone structure from.public static Dataset wrap(DatasetGraph dataset)
DatasetGraph to make a datasetdataset - DatasetGraphpublic static Dataset wrap(Model model)
Model to make a dataset; the model is the default graph of the RDF Dataset.
This dataset can not have additional models
added to it, including indirectly through SPARQL Update
adding new graphs.model - @Deprecated public static Dataset create(DatasetGraph dataset)
wrap(org.apache.jena.sparql.core.DatasetGraph)DatasetGraph to make a datasetdataset - DatasetGraphpublic static Dataset create(List<String> uriList)
uriList - URIs merged to form the default datasetpublic static Dataset create(String uri)
uri - URIs merged to form the default datasetpublic static Dataset createNamed(List<String> namedSourceList)
namedSourceList - public static Dataset create(List<String> uriList, List<String> namedSourceList)
uriList - graphs to be loaded into the unnamed, default graphnamedSourceList - graphs to be attached as named graphspublic static Dataset create(String uri, List<String> namedSourceList)
uri - graph to be loaded into the unnamed, default graphnamedSourceList - graphs to be attached as named graphspublic static Dataset create(String uri, List<String> namedSourceList, String baseURI)
uri - graph to be loaded into the unnamed, default graphnamedSourceList - graphs to be attached as named graphsbaseURI - baseURI for relative URI expansionpublic static Dataset create(List<String> uriList, List<String> namedSourceList, String baseURI)
uriList - graphs to be loaded into the unnamed, default graphnamedSourceList - graphs to be attached as named graphsbaseURI - baseURI for relative URI expansionpublic static Dataset assemble(String filename)
filename - The filenamepublic static Dataset assemble(String filename, String resourceURI)
filename - The filenameresourceURI - URI for the dataset to assemblerpublic static Dataset assemble(Model model)
model - Licenced under the Apache License, Version 2.0