SMWSparqlDatabase4Store Class Reference
[SWMSparql]

Specific modifications of the SPARQL database implementation for 4Store. More...

Inherits SMWSparqlDatabase.

List of all members.

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/.


Detailed Description

Specific modifications of the SPARQL database implementation for 4Store.

Since:
1.6
Author:
Markus Krötzsch

Definition at line 19 of file SMW_SparqlDatabase4Store.php.


Member Function Documentation

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.

Note:
The restricted option in 4Store mainly enforces the given soft limit more strictly. To disable/configure it, simply change the soft limit settings of your 4Store server.
Parameters:
$sparql string with the complete SPARQL query (SELECT or ASK)
Returns:
SMWSparqlResultWrapper

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.

Parameters:
$propertyName string Turtle name of marking property
$objectName string Turtle name of marking object/value
$extraNamespaces array (associative) of namespaceId => namespaceUri
Returns:
boolean stating whether the operations succeeded

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.

Parameters:
$payload string Turtle serialization of data to send
Returns:
SMWSparqlResultWrapper

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().


The documentation for this class was generated from the following file:

Generated on Sun Mar 18 07:15:43 2012 for Semantic MediaWiki by  doxygen 1.5.6