class Modelabstract |
|
|
|
Model instances are not meant to be copied. |
|
Add the Statement to the Model.
statement - The Statement to add. |
|
|
|
Check if the model contains certain statements.
statement - A partially defined statement that serves as a pattern. Returns true if the Model contains a Statement matching the given statement pattern. |
|
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. |
|
Convenience method which is based on containsAnyStatement |
|
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. Returns true if the Model contains the Statement, false otherwise or is statement is invalid. |
|
|
Creates a new blank node with a unique identifier.
Returns A blank node that can be used to create new statements. |
|
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. Returns An iterator over all results matching the query, on error an invalid iterator is returned. |
|
Returns true if the Model doesn't contains any Statement. |
|
List all contexts in the model, i.e. all named graphs.
Returns An iterator over context Nodes, on error an invalid iterator is returned. |
|
Return an iterator over Model Statements that "partial"
match the input Statement.
partial - The partial Statement to match. Returns An iterator for all the matched Statements, on error an invalid iterator is returned. |
|
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. Returns An iterator for all the matched Statements, on error an invalid iterator is returned. |
|
Returns An iterator for all statements in the model, on error an invalid iterator is returned. |
|
Convenience method which lists all statements in context.
Returns An iterator for all the matched Statements, on error an invalid iterator is returned. |
|
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. |
|
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. |
|
Convenience method that clear the Model of all statements |
|
Convenience method that removes all statements in the context. |
|
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. Returns Error.ErrorNone on success and an error code if statement was invalid or an error occured. |
|
|
Convenience method which removes all %statements in statements. |
|
Notification signal for new statements. Model implementations should emit this signal for each newly added statement. |
|
The number of statements stored in this Model. Returns The size of the Model, or -1 on error. |
|
Notification signal for removed statements. Model implementations
should emit this signal for each removed statement.
Backends may choose not to emit this signal for each removed statement but only for a statement pattern (i.e. an invalid statement as used in removeAllStatements()) to prevent massive performance loss. |
|
Emitted when new statements have been added to the model.
Implementations of this interface have to emit this signal. |
|
Emitted when statements have been removed from the model.
Implementations of this interface have to emit this signal. |
|
Write all statements in this Model to os.
Default implementation is based on Model.listStatements |