Inherits SMWSparqlDatabase.
Public Member Functions | |
| doQuery ($sparql) | |
| Execute a SPARQL query and return an SMWSparqlResultWrapper object that contains the results. | |
| deleteContentByValue ($propertyName, $objectName, $extraNamespaces=array()) | |
| Complex SPARQL Update delete operations are not supported in 4Store as of v1.1.3, hence this implementation uses a less efficient method for accomplishing this. | |
| doHttpPost ($payload) | |
| Execute a HTTP-based SPARQL POST request according to http://www.w3.org/2009/sparql/docs/http-rdf-update/. | |
Definition at line 19 of file SMW_SparqlDatabase4Store.php.
| SMWSparqlDatabase4Store::doQuery | ( | $ | sparql | ) |
Execute a SPARQL query and return an SMWSparqlResultWrapper object that contains the results.
Compared to SMWSparqlDatabase::doQuery(), this also supports the parameter "restricted=1" which 4Store provides to enforce strict resource bounds on query answering. The method also checks if these bounds have been met, and records this in the query result.
| $sparql | string with the complete SPARQL query (SELECT or ASK) |
Reimplemented from SMWSparqlDatabase.
Definition at line 36 of file SMW_SparqlDatabase4Store.php.
References SMWSparqlResultWrapper::ERROR_INCOMPLETE, SMWSparqlResultWrapper::ERROR_UNREACHABLE, and SMWSparqlDatabase::throwSparqlErrors().
| SMWSparqlDatabase4Store::deleteContentByValue | ( | $ | propertyName, | |
| $ | objectName, | |||
| $ | extraNamespaces = array() | |||
| ) |
Complex SPARQL Update delete operations are not supported in 4Store as of v1.1.3, hence this implementation uses a less efficient method for accomplishing this.
| $propertyName | string Turtle name of marking property | |
| $objectName | string Turtle name of marking object/value | |
| $extraNamespaces | array (associative) of namespaceId => namespaceUri |
Reimplemented from SMWSparqlDatabase.
Definition at line 73 of file SMW_SparqlDatabase4Store.php.
References SMWSparqlResultWrapper::ERROR_NOERROR, SMWTurtleSerializer::getTurtleNameForExpElement(), and SMWSparqlDatabase::select().
| SMWSparqlDatabase4Store::doHttpPost | ( | $ | payload | ) |
Execute a HTTP-based SPARQL POST request according to http://www.w3.org/2009/sparql/docs/http-rdf-update/.
The method throws exceptions based on SMWSparqlDatabase::throwSparqlErrors(). If errors occur and this method does not throw anything, then an empty result with an error code is returned.
This method is specific to 4Store since it uses POST parameters that are not given in the specification.
| $payload | string Turtle serialization of data to send |
TODO The error reporting based on SPARQL (Update) is not adequate for the HTTP POST protocol
Reimplemented from SMWSparqlDatabase.
Definition at line 99 of file SMW_SparqlDatabase4Store.php.
References SMWSparqlDatabaseError::ERROR_NOSERVICE, and SMWSparqlDatabase::throwSparqlErrors().
1.5.6