|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hp.hpl.jena.sparql.core.DatasetImpl
public class DatasetImpl
A implementation of a Dataset. This is the "usual" implementation based on wrapping a DatasetGraph and providing an adapter layer from Model/Resource to Graph/Node The characteristics of this adpter depend on the charcateristics of DatasetGraph.
| Constructor Summary | |
|---|---|
DatasetImpl(Dataset ds)
|
|
DatasetImpl(com.hp.hpl.jena.rdf.model.Model model)
Create a Dataset with the model as default model. |
|
| Method Summary | |
|---|---|
void |
abort()
Abort a transaction - finish the transaction and undo any changes (if a "write" transaction) |
void |
addNamedModel(String uri,
com.hp.hpl.jena.rdf.model.Model model)
Set a named graph. |
DatasetGraph |
asDatasetGraph()
Get the dataset in graph form |
void |
begin(ReadWrite mode)
Start either a READ or WRITE transaction |
static Dataset |
cloneStructure(DatasetGraph datasetGraph)
Clone the structure of a DatasetGraph. |
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 |
com.hp.hpl.jena.rdf.model.Model |
getDefaultModel()
Get the default graph as a Jena Model |
com.hp.hpl.jena.shared.Lock |
getLock()
Get the lock for this dataset |
com.hp.hpl.jena.rdf.model.Model |
getNamedModel(String uri)
Get a graph by name as a Jena Model |
boolean |
isInTransaction()
Say whether a transaction is active |
Iterator<String> |
listNames()
List the names |
void |
removeNamedModel(String uri)
Remove a named graph. |
void |
replaceNamedModel(String uri,
com.hp.hpl.jena.rdf.model.Model model)
Change a named graph for another using the same name |
void |
setDefaultModel(com.hp.hpl.jena.rdf.model.Model model)
Set the background graph. |
boolean |
supportsTransactions()
Does this dataset support transactions? Supporting transactions mean that the dataset implementation provides Dataset.begin(com.hp.hpl.jena.query.ReadWrite), Dataset.commit(), Dataset.abort(), Dataset.end()
which otherwise may throw UnsupportedOperationException |
static Dataset |
wrap(DatasetGraph datasetGraph)
Wrap an existing DatasetGraph |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DatasetImpl(com.hp.hpl.jena.rdf.model.Model model)
public DatasetImpl(Dataset ds)
| Method Detail |
|---|
public static Dataset wrap(DatasetGraph datasetGraph)
public static Dataset cloneStructure(DatasetGraph datasetGraph)
public com.hp.hpl.jena.rdf.model.Model getDefaultModel()
Dataset
getDefaultModel in interface Datasetpublic com.hp.hpl.jena.shared.Lock getLock()
Dataset
getLock in interface Datasetpublic boolean supportsTransactions()
DatasetDataset.begin(com.hp.hpl.jena.query.ReadWrite), Dataset.commit(), Dataset.abort(), Dataset.end()
which otherwise may throw UnsupportedOperationException
supportsTransactions in interface Datasetpublic void begin(ReadWrite mode)
Dataset
begin in interface Datasetpublic boolean isInTransaction()
isInTransaction in interface Datasetpublic void commit()
Dataset
commit in interface Datasetpublic void abort()
Dataset
abort in interface Datasetpublic void end()
Dataset
end in interface Datasetpublic DatasetGraph asDatasetGraph()
Dataset
asDatasetGraph in interface Datasetpublic com.hp.hpl.jena.rdf.model.Model getNamedModel(String uri)
Dataset
getNamedModel in interface Dataset
public void addNamedModel(String uri,
com.hp.hpl.jena.rdf.model.Model model)
throws LabelExistsException
Dataset
addNamedModel in interface DatasetLabelExistsExceptionpublic void removeNamedModel(String uri)
Dataset
removeNamedModel in interface Dataset
public void replaceNamedModel(String uri,
com.hp.hpl.jena.rdf.model.Model model)
Dataset
replaceNamedModel in interface Datasetpublic void setDefaultModel(com.hp.hpl.jena.rdf.model.Model model)
Dataset
setDefaultModel in interface Datasetpublic boolean containsNamedModel(String uri)
Dataset
containsNamedModel in interface Datasetpublic Iterator<String> listNames()
Dataset
listNames in interface Datasetpublic void close()
Dataset
close in interface Dataset
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||