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

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
 

Detailed Description

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+

Since
1.7.1
Author
Markus Krötzsch

Member Function Documentation

◆ delete()

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.

Parameters
$deletePatternstring CONSTRUCT pattern of tripples to delete
$wherestring condition for data to delete
$extraNamespacesarray (associative) of namespaceId => namespaceUri
Returns
boolean stating whether the operations succeeded

Implements SMW\SPARQLStore\RepositoryConnection.

◆ deleteData()

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.

Parameters
$triplesstring of triples to delete
$extraNamespacesarray (associative) of namespaceId => namespaceUri
Returns
boolean stating whether the operations succeeded

◆ doUpdate()

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

Parameters
$sparqlstring with the complete SPARQL update query (INSERT or DELETE)
Returns
boolean

Implements SMW\SPARQLStore\RepositoryConnection.

◆ insertData()

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.

Parameters
$triplesstring of triples to insert
$extraNamespacesarray (associative) of namespaceId => namespaceUri
Returns
boolean stating whether the operations succeeded

◆ insertDelete()

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.

Parameters
$insertPatternstring CONSTRUCT pattern of tripples to insert
$deletePatternstring CONSTRUCT pattern of tripples to delete
$wherestring condition for data to delete
$extraNamespacesarray (associative) of namespaceId => namespaceUri
Returns
boolean stating whether the operations succeeded

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

About | General disclaimer | Privacy policy