Semantic MediaWiki and related extensions
Public Member Functions | List of all members
SMW\SPARQLStore\RepositoryConnectors\FourstoreRepositoryConnector Class Reference
Inheritance diagram for SMW\SPARQLStore\RepositoryConnectors\FourstoreRepositoryConnector:
Inheritance graph
[legend]
Collaboration diagram for SMW\SPARQLStore\RepositoryConnectors\FourstoreRepositoryConnector:
Collaboration graph
[legend]

Public Member Functions

 doQuery ( $sparql)
 
 deleteContentByValue ( $propertyName, $objectName, $extraNamespaces=[])
 
 doHttpPost ( $payload)
 
 doUpdate ( $sparql)
 
- Public Member Functions inherited from SMW\SPARQLStore\RepositoryConnectors\GenericRepositoryConnector
 __construct (RepositoryClient $repositoryClient, HttpRequest $httpRequest)
 
 getRepositoryClient ()
 
 getEndpoint ( $type)
 
 getLastErrorCode ()
 
 getDefaultGraph ()
 
 setConnectionTimeout ( $timeout=10)
 
 shouldPing ()
 
 ping ( $endpointType=self::ENDP_QUERY)
 
 select ( $vars, $where, $options=[], $extraNamespaces=[])
 
 getSparqlForSelect ( $vars, $where, $options=[], $extraNamespaces=[])
 
 ask ( $where, $extraNamespaces=[])
 
 getSparqlForAsk ( $where, $extraNamespaces=[])
 
 selectCount ( $variable, $where, $options=[], $extraNamespaces=[])
 
 delete ( $deletePattern, $where, $extraNamespaces=[])
 
 deleteContentByValue ( $propertyName, $objectName, $extraNamespaces=[])
 
 deleteAll ()
 
 insertDelete ( $insertPattern, $deletePattern, $where, $extraNamespaces=[])
 
 insertData ( $triples, $extraNamespaces=[])
 
 deleteData ( $triples, $extraNamespaces=[])
 
 doQuery ( $sparql)
 
 doUpdate ( $sparql)
 
 doHttpPost ( $payload)
 
 getVersion ()
 

Additional Inherited Members

- Static Public Member Functions inherited from SMW\SPARQLStore\RepositoryConnectors\GenericRepositoryConnector
static getPrefixString ( $extraNamespaces=[], $forSparql=true)
 
- Public Attributes inherited from SMW\SPARQLStore\RepositoryConnectors\GenericRepositoryConnector
const ENDP_QUERY = RepositoryConnection::QUERY_ENDPOINT
 
const ENDP_UPDATE = RepositoryConnection::UPDATE_ENDPOINT
 
const ENDP_DATA = RepositoryConnection::DATA_ENDPOINT
 
- Public Attributes inherited from SMW\SPARQLStore\RepositoryConnection
const QUERY_ENDPOINT = 1
 
const UPDATE_ENDPOINT = 2
 
const DATA_ENDPOINT = 4
 
- Protected Member Functions inherited from SMW\SPARQLStore\RepositoryConnectors\GenericRepositoryConnector
 mapHttpRequestError ( $endpoint, $sparql)
 
- Protected Attributes inherited from SMW\SPARQLStore\RepositoryConnectors\GenericRepositoryConnector
 $repositoryClient
 
 $httpRequest
 

Detailed Description

Specific modifications of the SPARQL database implementation for 4Store.

GNU GPL v2+

Since
1.6
Author
Markus Krötzsch

Member Function Documentation

◆ deleteContentByValue()

SMW\SPARQLStore\RepositoryConnectors\FourstoreRepositoryConnector::deleteContentByValue (   $propertyName,
  $objectName,
  $extraNamespaces = [] 
)

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
$propertyNamestring Turtle name of marking property
$objectNamestring Turtle name of marking object/value
$extraNamespacesarray (associative) of namespaceId => namespaceUri
Returns
boolean stating whether the operations succeeded

◆ doHttpPost()

SMW\SPARQLStore\RepositoryConnectors\FourstoreRepositoryConnector::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 GenericHttpDatabaseConnector::mapHttpRequestError(). 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
$payloadstring Turtle serialization of data to send
Returns
boolean

Implements SMW\SPARQLStore\RepositoryConnection.

◆ doQuery()

SMW\SPARQLStore\RepositoryConnectors\FourstoreRepositoryConnector::doQuery (   $sparql)

Execute a SPARQL query and return an RepositoryResult object that contains the results. Compared to GenericHttpDatabaseConnector::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
$sparqlstring with the complete SPARQL query (SELECT or ASK)
Returns
RepositoryResult

Implements SMW\SPARQLStore\RepositoryConnection.

◆ doUpdate()

SMW\SPARQLStore\RepositoryConnectors\FourstoreRepositoryConnector::doUpdate (   $sparql)
See also
GenericHttpDatabaseConnector::doUpdate
Note
4store 1.1.4 breaks on update if charset is set in the Content-Type header
Since
2.0

Implements SMW\SPARQLStore\RepositoryConnection.


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

About | General disclaimer | Privacy policy