|NRLModel (Model *parent)|
|void||setIgnoreContext (bool b)|
|bool||ignoreContext () const|
|void||setEnableQueryPrefixExpansion (bool enable)|
|bool||queryPrefixExpansionEnabled () const|
|QHash< QString, QUrl >||queryPrefixes () const|
|Error::ErrorCode||addNrlStatement (const Statement &s)|
|QUrl||createGraph (const QUrl &type, QUrl *metadataGraph=0)|
|Error::ErrorCode||removeGraph (const QUrl &graph)|
|virtual QueryResultIterator||executeQuery (const QString &query, Query::QueryLanguage language, const QString &userQueryLanguage=QString()) const|
|virtual Error::ErrorCode||removeAllStatements (const Statement &statement)|
Model filter that makes working with NRL data simpler.
The NRLModel enforces NRL cardinality rules. That means predicates with a cardinality of maximum 1 are always udpated while statements that define predicates with a maximum cardinality bigger than 1 are rejected once the maximum is reached (future versions might remove an earlier defined statement based on the time the old statements were added).
Thus, at the moment NRLModel is mostly usable for handling properties with a maximum cardinality of 1.
NRLModel also provides automatic query prefix expansion and named graph creation and removal with automatic metadata graph handling.
THE API AND EVEN THE COMPLETE CLASS IS SUBJECT TO CHANGE!
When enforcing the NRL cardinality rules NRLModel can either ignore the context of statements or treat different contexts as separate sets, each resetting the cardinality.
By default contexts are ignored.
trueif contexts should be ignored when enforcing NRL rules.
Enable automatic query prefix expansion based on nao:hasDefaultNamespaceAbbreviation. This will trigger reading all prefixes stored in the underlying model.
By default query prefix expansion is disabled.
trueif query prefix expansion is enabled.
The prefixes that have been read from the underlying model.
Add a statement.
|s||The statement containing the property to be set. If the predicate has NRL cardinality restrictions existing statements will be updated. Otherwise this method has the same effect as Model::addStatement().|
Adding a statement that defines a predicate with a maximum cardinality bigger than 1 which has already been reached fails with an error.
Create a new graph of type
This will actually create two graphs: the requested one and its metadata graph which will already contain basic metadata like creation date.
Remove a complete graph including its metadata graph
This method can be seen as the counterpart to createGraph
|virtual QueryResultIterator Soprano::NRLModel::executeQuery||(||const QString &||query,|
|const QString &||userQueryLanguage =
If queryPrefixExpansionEnabled is
true query prefixes will be expanded before sending the query to the underlying model.
Reimplemented from Soprano::FilterModel.
|virtual Error::ErrorCode Soprano::NRLModel::removeAllStatements||(||const Statement &||statement||)||