34#ifndef DATAQUAY_BASIC_STORE_H
35#define DATAQUAY_BASIC_STORE_H
118 void save(QString filename)
const;
BasicStore is an in-memory RDF data store implementing the Store interface, providing add,...
void change(ChangeSet changes)
Atomically apply the sequence of add/remove changes described in the given ChangeSet.
Uri getBaseUri() const
Retrieve the base URI for the store.
void addPrefix(QString prefix, Uri uri)
Add a prefix/uri pair (an XML namespace, except that this class doesn't directly deal in XML) for use...
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...
void clear()
Empty the store of triples.
Triples match(Triple t) const
Return all triples matching the given wildcard triple.
Node addBlankNode()
Create and return a new blank node.
void setBaseUri(Uri uri)
Set the base URI for the store.
static BasicStore * load(QUrl url, QString format="")
Construct a new BasicStore from the RDF document at the given URL.
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,...
bool remove(Triple t)
Remove a triple from the store.
Uri expand(QString uri) const
Expand the given URI (which may use local namespaces) and prefix-expand it, returning the result as a...
Uri getUniqueUri(QString prefix) const
Get a new URI, starting with the given prefix (e.g.
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...
Features getSupportedFeatures() const
Retrieve the set of optional features supported by this Store implementation.
bool contains(Triple t) const
Return true if the store contains the given triple, false otherwise.
void revert(ChangeSet changes)
Atomically apply the sequence of add/remove changes described in the given ChangeSet,...
ResultSet query(QString sparql) const
Run a SPARQL query against the store and return its results.
static BasicStore * loadString(QString encodedRdf, Uri baseUri, QString format="")
Construct a new BasicStore from the RDF document encoded in the given string.
Triple matchOnce(Triple t) const
Return a triple from the store that matches the given wildcard triple, or the empty triple if none ma...
bool add(Triple t)
Add a triple to the store.
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...
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.