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, non-transactional Dataset.
|
static Dataset |
create(Dataset dataset) |
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) |
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 explciitly added with Dataset.addNamedModel(java.lang.String, org.apache.jena.rdf.model.Model) . |
static Dataset |
createMem()
Deprecated.
Prefer
createGeneral() or createTxnMem() or create() |
static Dataset |
createMemFixed()
Deprecated.
This operation may be removed.
|
static Dataset |
createNamed(List<String> namedSourceList) |
static Dataset |
createTxnMem()
Create an in-memory.
|
static Dataset |
make(Dataset ds,
Model defaultModel) |
static Dataset |
wrap(DatasetGraph dataset)
Wrap a
DatasetGraph to make a dataset |
public static Dataset create()
See also createTxnMem()
for a transactional dataset.
This implementation copies models when Dataset.addNamedModel(String, Model)
is called.
@Deprecated public static Dataset createMem()
createGeneral()
or createTxnMem()
or create()
See also createTxnMem()
for a transactional dataset.
Use createGeneral()
when needing to add graphs with mixed charcateristics,
e.g. inference graphs, specific graphs from TDB.
This 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()
.
public static Dataset createTxnMem()
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.addNamedModel(java.lang.String, org.apache.jena.rdf.model.Model)
.
This dataset 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 transactions.
@Deprecated public static Dataset createMemFixed()
public static Dataset create(Model model)
model
- The model for the default graphpublic static Dataset create(Dataset dataset)
dataset
- Dataset to clone structure from.public static Dataset wrap(DatasetGraph dataset)
DatasetGraph
to make a datasetdataset
- DatasetGraph@Deprecated public static Dataset create(DatasetGraph dataset)
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 atatched 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 atatched 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 atatched 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