public interface Dataset extends Transactional
Transactional.Promote| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Abort a transaction - finish the transaction and undo any changes (if a "write" transaction)
|
Dataset |
addNamedModel(String uri,
Model model)
Set a named graph.
|
DatasetGraph |
asDatasetGraph()
Get the dataset in graph form
|
void |
begin(ReadWrite readWrite)
Start either a READ or WRITE transaction
|
void |
close()
Close the dataset, potentially releasing any associated resources.
|
void |
commit()
Commit a transaction - finish the transaction and make any changes permanent (if a "write" transaction)
|
boolean |
containsNamedModel(String uri)
Does the dataset contain a model with the name supplied?
|
void |
end()
Finish the transaction - if a write transaction and commit() has not been called, then abort
|
Context |
getContext()
Get the context associated with this dataset
|
Model |
getDefaultModel()
Get the default graph as a Jena Model
|
Lock |
getLock()
Get the lock for this dataset
|
Model |
getNamedModel(String uri)
Get a graph by name as a Jena Model
|
Model |
getUnionModel()
Get the graph which is the unionof all named graphs as a Jena Model
|
boolean |
isEmpty() |
boolean |
isInTransaction()
Say whether a transaction is active
|
Iterator<String> |
listNames()
List the names
|
Dataset |
removeNamedModel(String uri)
Remove a named graph.
|
Dataset |
replaceNamedModel(String uri,
Model model)
Change a named graph for another using the same name
|
Dataset |
setDefaultModel(Model model)
Set the default graph.
|
boolean |
supportsTransactionAbort()
Declare whether
abort() is supported. |
boolean |
supportsTransactions()
Does this dataset support transactions? Supporting transactions means that
the dataset implementation provides
begin(org.apache.jena.query.ReadWrite), commit(),
end() which otherwise may throw
UnsupportedOperationException. |
begin, begin, promote, promote, transactionMode, transactionTypeModel getDefaultModel()
Model getUnionModel()
Dataset setDefaultModel(Model model)
model - the default graph to setDataset for continued usageboolean containsNamedModel(String uri)
Dataset addNamedModel(String uri, Model model)
uri - the name of the graph to setmodel - the graph to setDataset for continued usageDataset removeNamedModel(String uri)
uri - the name of the gaph to removeDataset for continued usageDataset replaceNamedModel(String uri, Model model)
uri - the name of the graph to replacemodel - the graph with which to replace itDataset for continued usageLock getLock()
Context getContext()
boolean supportsTransactions()
begin(org.apache.jena.query.ReadWrite), commit(),
end() which otherwise may throw
UnsupportedOperationException.
See supportsTransactionAbort() for abort().
A Dataset that provides functionality across independent systems
can not provide all features strong guarantees. For example, they may use MRSW
locking and some isolation control. Specifically, they do not necessarily
provide abort().
In addition, check details of a specific implementation.
boolean supportsTransactionAbort()
abort() is supported.
This goes along with clearing up after exceptions inside application transaction code.void begin(ReadWrite readWrite)
begin in interface Transactionalvoid commit()
commit in interface Transactionalvoid abort()
abort in interface Transactionalboolean isInTransaction()
isInTransaction in interface Transactionalvoid end()
end in interface TransactionalDatasetGraph asDatasetGraph()
void close()
boolean isEmpty()
Dataset is empty of triples, whether in the default graph or in any named graph.Licenced under the Apache License, Version 2.0