34#ifndef DATAQUAY_TRANSACTIONAL_STORE_H
35#define DATAQUAY_TRANSACTIONAL_STORE_H
137 void save(QString filename)
const;
174 bool contains(
Triple t)
const;
179 Node queryOnce(QString sparql, QString bindingName)
const;
180 Uri getUniqueUri(QString prefix)
const;
182 Uri expand(QString uri)
const;
183 void save(QString filename)
const;
185 void importString(QString encodedRdf,
Uri baseUri,
187 Features getSupportedFeatures()
const;
195 TSTransaction(TransactionalStore::D *td);
196 virtual ~TSTransaction();
199 TSTransaction(
const TSTransaction &);
200 TSTransaction &operator=(
const TSTransaction &);
Node represents a single RDF node, with conversions to and from variant types.
Store is an abstract interface for Dataquay RDF data stores.
ImportDuplicatesMode
ImportDuplicatesMode determines the outcome when an import operation encounters a triple in the impor...
Transaction is an abstract interface for classes that read and write an RDF Store within the context ...
TransactionalStore is an RDF data store implementing the Store interface, providing transaction suppo...
void change(ChangeSet changes)
Atomically apply the sequence of add/remove changes described in the given ChangeSet.
bool remove(Triple t)
Remove a triple from the store.
void importString(QString encodedRdf, Uri baseUri, ImportDuplicatesMode idm, QString format="")
Import the RDF document encoded in the given string into the current store (in addition to its existi...
Node addBlankNode()
Create and return a new blank node.
~TransactionalStore()
Delete the TransactionalStore.
bool contains(Triple t) const
Return true if the store contains the given triple, false otherwise.
void transactionCommitted(const ChangeSet &cs)
Emitted after a transaction has been committed.
ResultSet query(QString sparql) const
Run a SPARQL query against the store and return its results.
Node complete(Triple t) const
Given a triple in which any two nodes are specified and the other is a wildcard node of type Nothing,...
void transactionCommitted()
Emitted after a transaction has been committed.
void revert(ChangeSet changes)
Atomically apply the sequence of add/remove changes described in the given ChangeSet,...
DirectWriteBehaviour
DirectWriteBehaviour controls how TransactionalStore responds when called directly (not through a Tra...
Triples match(Triple t) const
Return all triples matching the given wildcard triple.
TransactionalStore(Store *store, DirectWriteBehaviour dwb=NoAutoTransaction)
Create a TransactionalStore operating on the given (presumably non-transactional) data store.
bool add(Triple t)
Add a triple to the store.
Uri getUniqueUri(QString prefix) const
Get a new URI, starting with the given prefix (e.g.
Transaction * startTransaction()
Start a transaction and obtain a Transaction through which to carry out its operations.
Features getSupportedFeatures() const
Retrieve the set of optional features supported by this Store implementation.
Triple matchOnce(Triple t) const
Return a triple from the store that matches the given wildcard triple, or the empty triple if none ma...
void save(QString filename) const
Export the store to an RDF/TTL file with the given filename.
Node queryOnce(QString sparql, QString bindingName) const
Run a SPARQL query against the store and return the node of the first result for the given query bind...
Uri expand(QString uri) const
Expand the given URI (which may use local namespaces) and prefix-expand it, returning the result as a...
Triple represents an RDF statement made up of three Node objects.
Uri represents a single URI.
QList< Change > ChangeSet
A sequence of add/remove operations such as may be enacted by a transaction.
QList< Dictionary > ResultSet
A list of Dictionary types, used to contain a sequence of query results.