Semantic MediaWiki and related extensions
|
Public Member Functions | |
delete ( $deletePattern, $where, $extraNamespaces=[]) | |
insertDelete ( $insertPattern, $deletePattern, $where, $extraNamespaces=[]) | |
insertData ( $triples, $extraNamespaces=[]) | |
deleteData ( $triples, $extraNamespaces=[]) | |
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 | |
Virtuoso specific adjustments for GenericRepositoryConnector
Specific modifications of the SPARQL database implementation for Virtuoso. In particular, Virtuoso does not support SPARQL Update but only the non-standard SPARUL protocol that requires different syntax for update queries. If future versions of Virtuoso support SPARQL Update, the standard SPARQL database connector should work properly.
Virtuoso uses the SPARQL query endpoint for updates as well. So both
A graph is always needed, i.e., $smwgSparqlDefaultGraph must be set to some graph name (URI).
Known limitations: (might be fixed in recent Virtuoso versions, please let us know)
GNU GPL v2+
SMW\SPARQLStore\RepositoryConnectors\VirtuosoRepositoryConnector::delete | ( | $deletePattern, | |
$where, | |||
$extraNamespaces = [] |
|||
) |
DELETE wrapper. The function declares the standard namespaces wiki, swivt, rdf, owl, rdfs, property, xsd, so these do not have to be included in $extraNamespaces.
$deletePattern | string CONSTRUCT pattern of tripples to delete |
$where | string condition for data to delete |
$extraNamespaces | array (associative) of namespaceId => namespaceUri |
Implements SMW\SPARQLStore\RepositoryConnection.
SMW\SPARQLStore\RepositoryConnectors\VirtuosoRepositoryConnector::deleteData | ( | $triples, | |
$extraNamespaces = [] |
|||
) |
DELETE DATA wrapper. The function declares the standard namespaces wiki, swivt, rdf, owl, rdfs, property, xsd, so these do not have to be included in $extraNamespaces.
$triples | string of triples to delete |
$extraNamespaces | array (associative) of namespaceId => namespaceUri |
SMW\SPARQLStore\RepositoryConnectors\VirtuosoRepositoryConnector::doUpdate | ( | $sparql | ) |
Execute a SPARQL update and return a boolean to indicate if the operations was successful.
Virtuoso expects SPARQL updates to be posted using the "query" parameter (rather than "update").
$sparql | string with the complete SPARQL update query (INSERT or DELETE) |
Implements SMW\SPARQLStore\RepositoryConnection.
SMW\SPARQLStore\RepositoryConnectors\VirtuosoRepositoryConnector::insertData | ( | $triples, | |
$extraNamespaces = [] |
|||
) |
INSERT DATA wrapper. The function declares the standard namespaces wiki, swivt, rdf, owl, rdfs, property, xsd, so these do not have to be included in $extraNamespaces.
$triples | string of triples to insert |
$extraNamespaces | array (associative) of namespaceId => namespaceUri |
SMW\SPARQLStore\RepositoryConnectors\VirtuosoRepositoryConnector::insertDelete | ( | $insertPattern, | |
$deletePattern, | |||
$where, | |||
$extraNamespaces = [] |
|||
) |
INSERT DELETE wrapper. The function declares the standard namespaces wiki, swivt, rdf, owl, rdfs, property, xsd, so these do not have to be included in $extraNamespaces.
$insertPattern | string CONSTRUCT pattern of tripples to insert |
$deletePattern | string CONSTRUCT pattern of tripples to delete |
$where | string condition for data to delete |
$extraNamespaces | array (associative) of namespaceId => namespaceUri |