34#ifndef DATAQUAY_OBJECT_STORER_H
35#define DATAQUAY_OBJECT_STORER_H
Node represents a single RDF node, with conversions to and from variant types.
ObjectStorer is a storage handler capable of turning objects derived from QObject into RDF triples in...
Uri store(QObject *o)
Store the given object and return its URI in the datastore.
void setTypeMapping(const TypeMapping &)
Provide a TypeMapping object, which controls the URIs chosen by ObjectStorer to represent object type...
void setFollowPolicy(FollowPolicy policy)
Set the policy used to determine which objects to store, based on their relationship to an object who...
void addStoreCallback(StoreCallback *callback)
Register the given callback (a subclass of the abstract StoreCallback class) as providing a "stored" ...
void removeObject(Node node)
Remove an object from the store, given its node.
void store(QObjectList o, ObjectNodeMap &map)
Store the given objects, and add them and their nodes to the ObjectNodeMap.
PropertyStorePolicy getPropertyStorePolicy() const
Retrieve the current policy used to determine whether to store a property.
FollowPolicy getFollowPolicy() const
const TypeMapping & getTypeMapping() const
Retrieve the current TypeMapping object.
void setBlankNodePolicy(BlankNodePolicy policy)
Set the policy used to determine whether to give an object a URI or use a blank node for it.
void store(QObjectList o)
Store the given objects.
BlankNodePolicy getBlankNodePolicy() const
Retrieve the current policy used to determine whether to give an object a URI or use a blank node for...
QHash< QObject *, Node > ObjectNodeMap
ObjectNodeMap contains a record of the RDF node used for each object.
Uri store(QObject *o, ObjectNodeMap &map)
Store the given object; add the object and its node to the ObjectNodeMap, and return its URI in the d...
void setPropertyStorePolicy(PropertyStorePolicy policy)
Set the policy used to determine whether to store a property.
Store * getStore()
Retrieve the store object that was passed to the constructor.
@ StoreIfChanged
Store only properties that differ from default object.
@ StoreAlways
Store all properties (if storable, readable & writable) (default)
ObjectStorer(Store *s)
Create an ObjectStorer ready to store objects to the given datastore.
Store is an abstract interface for Dataquay RDF data stores.
TypeMapping describes a set of relationships between RDF entity and property URIs,...
Uri represents a single URI.
virtual void stored(ObjectStorer *, ObjectNodeMap &, QObject *, Node)=0
An object has been stored by the given ObjectStorer, resulting in the given RDF node.