Semantic MediaWiki and related extensions
|
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 | |
Specific modifications of the SPARQL database implementation for 4Store.
GNU GPL v2+
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.
$propertyName | string Turtle name of marking property |
$objectName | string Turtle name of marking object/value |
$extraNamespaces | array (associative) of namespaceId => namespaceUri |
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.
$payload | string Turtle serialization of data to send |
Implements SMW\SPARQLStore\RepositoryConnection.
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.
$sparql | string with the complete SPARQL query (SELECT or ASK) |
Implements SMW\SPARQLStore\RepositoryConnection.
SMW\SPARQLStore\RepositoryConnectors\FourstoreRepositoryConnector::doUpdate | ( | $sparql | ) |
Implements SMW\SPARQLStore\RepositoryConnection.