com.hp.hpl.jena.query
Interface Dataset

All Known Implementing Classes:
DatasetImpl

public interface Dataset

Query is over a Dataset, a collection of named graphs and a background graph (also called the default graph or unnamed graph).


Method Summary
 void abort()
          Abort a transaction - finish the transaction and undo any changes (if a "write" transaction)
 void 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
 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, Model model)
          Change a named graph for another using the same name
 void setDefaultModel(Model model)
          Set the background graph.
 boolean supportsTransactions()
          Does this dataset support transactions? Supporting transactions mean that the dataset implementation provides begin(com.hp.hpl.jena.query.ReadWrite), commit(), abort(), end() which otherwise may throw UnsupportedOperationException
 

Method Detail

getDefaultModel

Model getDefaultModel()
Get the default graph as a Jena Model


setDefaultModel

void setDefaultModel(Model model)
Set the background graph. Can be set to null for none.


getNamedModel

Model getNamedModel(String uri)
Get a graph by name as a Jena Model


containsNamedModel

boolean containsNamedModel(String uri)
Does the dataset contain a model with the name supplied?


addNamedModel

void addNamedModel(String uri,
                   Model model)
                   throws LabelExistsException
Set a named graph.

Throws:
LabelExistsException

removeNamedModel

void removeNamedModel(String uri)
Remove a named graph.


replaceNamedModel

void replaceNamedModel(String uri,
                       Model model)
Change a named graph for another using the same name


listNames

Iterator<String> listNames()
List the names


getLock

Lock getLock()
Get the lock for this dataset


getContext

Context getContext()
Get the context associated with this dataset


supportsTransactions

boolean supportsTransactions()
Does this dataset support transactions? Supporting transactions mean that the dataset implementation provides begin(com.hp.hpl.jena.query.ReadWrite), commit(), abort(), end() which otherwise may throw UnsupportedOperationException


begin

void begin(ReadWrite readWrite)
Start either a READ or WRITE transaction


commit

void commit()
Commit a transaction - finish the transaction and make any changes permanent (if a "write" transaction)


abort

void abort()
Abort a transaction - finish the transaction and undo any changes (if a "write" transaction)


isInTransaction

boolean isInTransaction()
Say whether a transaction is active


end

void end()
Finish the transaction - if a write transaction and commit() has not been called, then abort


asDatasetGraph

DatasetGraph asDatasetGraph()
Get the dataset in graph form


close

void close()
Close the dataset, potentially releasing any associated resources. The dataset can not be used for query after this call.



Licenced under the Apache License, Version 2.0