|
Soprano
2.7.5
|
A dummy model. All its methods do nothing and always fail with a default error. More...
#include <Soprano/Util/DummyModel>
Inheritance diagram for Soprano::Util::DummyModel:A dummy model. All its methods do nothing and always fail with a default error.
A dummy model might be useful in situations where a null pointer could lead to crashes if creating a real model fails.
Definition at line 42 of file dummymodel.h.
Create a new dummy model.
destructor
| Error::ErrorCode Soprano::Util::DummyModel::addStatement | ( | const Statement & | statement | ) | [virtual] |
Add the Statement to the Model.
| statement | The Statement to add. |
Implements Soprano::Model.
| Error::ErrorCode Soprano::Util::DummyModel::addStatement | ( | const Node & | subject, |
| const Node & | predicate, | ||
| const Node & | object, | ||
| const Node & | context = Node() |
||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reimplemented from Soprano::Model.
| Error::ErrorCode Soprano::Util::DummyModel::addStatements | ( | const QList< Statement > & | statements | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reimplemented from Soprano::Model.
| Error::ErrorCode Soprano::Util::DummyModel::removeStatement | ( | const Statement & | statement | ) | [virtual] |
Remove one statement. For removing statements with wildward matching see removeAllStatements().
| statement | The statement that should be removed. This has to be a valid statement. |
Implements Soprano::Model.
| Error::ErrorCode Soprano::Util::DummyModel::removeStatement | ( | const Node & | subject, |
| const Node & | predicate, | ||
| const Node & | object, | ||
| const Node & | context = Node() |
||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reimplemented from Soprano::Model.
| Error::ErrorCode Soprano::Util::DummyModel::removeAllStatements | ( | const Statement & | statement | ) | [virtual] |
Remove all statements that match the partial statement. For removing one specific statement see removeStatement().
| statement | A possible partially defined statement that serves as a filter for all statements that should be removed. |
Implements Soprano::Model.
| Error::ErrorCode Soprano::Util::DummyModel::removeStatements | ( | const QList< Statement > & | statements | ) |
Convenience method which removes all statements in statements.
Reimplemented from Soprano::Model.
Convenience method that removes all statements in the context.
Reimplemented from Soprano::Model.
Convenience method that clear the Model of all statements
Reimplemented from Soprano::Model.
| StatementIterator Soprano::Util::DummyModel::listStatements | ( | const Statement & | partial | ) | const [virtual] |
Return an iterator over Model Statements that "partial" match the input Statement.
| partial | The partial Statement to match. |
Implements Soprano::Model.
| StatementIterator Soprano::Util::DummyModel::listStatements | ( | const Node & | subject, |
| const Node & | predicate, | ||
| const Node & | object, | ||
| const Node & | context = Node() |
||
| ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| subject | The subject node to match. Can be empty as a wildcard. |
| predicate | The predicate node to match. Can be empty as a wildcard. |
| object | The object node to match. Can be empty as a wildcard. |
| context | The context node to match. Can be empty as a wildcard. |
Reimplemented from Soprano::Model.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reimplemented from Soprano::Model.
| StatementIterator Soprano::Util::DummyModel::listStatementsInContext | ( | const Node & | context | ) | const |
Convenience method which lists all statements in context.
Reimplemented from Soprano::Model.
| NodeIterator Soprano::Util::DummyModel::listContexts | ( | ) | const [virtual] |
List all contexts in the model, i.e. all named graphs.
Implements Soprano::Model.
| QueryResultIterator Soprano::Util::DummyModel::executeQuery | ( | const QString & | query, |
| Query::QueryLanguage | language, | ||
| const QString & | userQueryLanguage = QString() |
||
| ) | const [virtual] |
query_api_disabled Execute the given query over the Model.
This is a const read-only method. As such Model implementations should not support SPARQL extensions such as INSERT or UPDATE through this method. A future version of Soprano will provide an additional API for queries that change the Model.
| query | The query to evaluate. |
| language | The query language used to encode query. |
| userQueryLanguage | If language equals Query::QueryLanguageUser userQueryLanguage defines the language to use. |
Implements Soprano::Model.
| bool Soprano::Util::DummyModel::containsAnyStatement | ( | const Statement & | statement | ) | const [virtual] |
Check if the model contains certain statements.
| statement | A partially defined statement that serves as a pattern. |
Implements Soprano::Model.
| bool Soprano::Util::DummyModel::containsAnyStatement | ( | const Node & | subject, |
| const Node & | predicate, | ||
| const Node & | object, | ||
| const Node & | context = Node() |
||
| ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| subject | The subject node to match. Can be empty as a wildcard. |
| predicate | The predicate node to match. Can be empty as a wildcard. |
| object | The object node to match. Can be empty as a wildcard. |
| context | The context node to match. Can be empty as a wildcard. |
Reimplemented from Soprano::Model.
| bool Soprano::Util::DummyModel::containsStatement | ( | const Statement & | statement | ) | const [virtual] |
Check if the model contains a statements.
| statement | The statement in question. This has to be a valid statement, i.e. subject, predicate, and object need to be defined. If the context node is empty the default graph is searched. |
Implements Soprano::Model.
| bool Soprano::Util::DummyModel::containsStatement | ( | const Node & | subject, |
| const Node & | predicate, | ||
| const Node & | object, | ||
| const Node & | context = Node() |
||
| ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reimplemented from Soprano::Model.
| bool Soprano::Util::DummyModel::containsContext | ( | const Node & | context | ) | const |
Convenience method which is based on containsAnyStatement
Reimplemented from Soprano::Model.
| bool Soprano::Util::DummyModel::isEmpty | ( | ) | const [virtual] |
Implements Soprano::Model.
| int Soprano::Util::DummyModel::statementCount | ( | ) | const [virtual] |
The number of statements stored in this Model.
Implements Soprano::Model.
| Error::ErrorCode Soprano::Util::DummyModel::write | ( | QTextStream & | os | ) | const [virtual] |
Write all statements in this Model to os.
Default implementation is based on Model::listStatements
Reimplemented from Soprano::Model.
| Node Soprano::Util::DummyModel::createBlankNode | ( | ) | [virtual] |
Creates a new blank node with a unique identifier.
Implements Soprano::Model.
1.7.6.1