|
| __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 () |
|
Basic database connector for exchanging data via SPARQL.
GNU GPL v2+
- Since
- 1.6
- Author
- Markus Krötzsch
SMW\SPARQLStore\RepositoryConnectors\GenericRepositoryConnector::ask |
( |
|
$where, |
|
|
|
$extraNamespaces = [] |
|
) |
| |
ASK 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
-
$where | string WHERE part of the query, without surrounding { } |
$extraNamespaces | array (associative) of namespaceId => namespaceUri |
- Returns
- RepositoryResult
Implements SMW\SPARQLStore\RepositoryConnection.
SMW\SPARQLStore\RepositoryConnectors\GenericRepositoryConnector::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
-
$deletePattern | string CONSTRUCT pattern of tripples to delete |
$where | string condition for data to delete |
$extraNamespaces | array (associative) of namespaceId => namespaceUri |
- Returns
- boolean stating whether the operations succeeded
Implements SMW\SPARQLStore\RepositoryConnection.
SMW\SPARQLStore\RepositoryConnectors\GenericRepositoryConnector::deleteContentByValue |
( |
|
$propertyName, |
|
|
|
$objectName, |
|
|
|
$extraNamespaces = [] |
|
) |
| |
Convenience method for deleting all triples that have a subject that occurs in a triple with the given property and object. This is used in SMW to delete subobjects with all their data. Some RDF stores fail on complex delete queries, hence a wrapper function is provided to allow more pedestrian implementations.
The function declares the standard namespaces wiki, swivt, rdf, owl, rdfs, property, xsd, so these do not have to be included in $extraNamespaces.
- 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
SMW\SPARQLStore\RepositoryConnectors\GenericRepositoryConnector::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
-
$triples | string of triples to delete |
$extraNamespaces | array (associative) of namespaceId => namespaceUri |
- Returns
- boolean stating whether the operations succeeded
SMW\SPARQLStore\RepositoryConnectors\GenericRepositoryConnector::getSparqlForAsk |
( |
|
$where, |
|
|
|
$extraNamespaces = [] |
|
) |
| |
Build the SPARQL query that is used by GenericHttpDatabaseConnector::ask(). The function declares the standard namespaces wiki, swivt, rdf, owl, rdfs, property, xsd, so these do not have to be included in $extraNamespaces.
- Parameters
-
$where | string WHERE part of the query, without surrounding { } |
$extraNamespaces | array (associative) of namespaceId => namespaceUri |
- Returns
- string SPARQL query
SMW\SPARQLStore\RepositoryConnectors\GenericRepositoryConnector::getSparqlForSelect |
( |
|
$vars, |
|
|
|
$where, |
|
|
|
$options = [] , |
|
|
|
$extraNamespaces = [] |
|
) |
| |
Build the SPARQL query that is used by GenericHttpDatabaseConnector::select(). The function declares the standard namespaces wiki, swivt, rdf, owl, rdfs, property, xsd, so these do not have to be included in $extraNamespaces.
- Parameters
-
$where | string WHERE part of the query, without surrounding { } |
$extraNamespaces | array (associative) of namespaceId => namespaceUri |
- Returns
- string SPARQL query
SMW\SPARQLStore\RepositoryConnectors\GenericRepositoryConnector::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
-
$triples | string of triples to insert |
$extraNamespaces | array (associative) of namespaceId => namespaceUri |
- Returns
- boolean stating whether the operations succeeded
SMW\SPARQLStore\RepositoryConnectors\GenericRepositoryConnector::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
-
$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 |
- Returns
- boolean stating whether the operations succeeded
SMW\SPARQLStore\RepositoryConnectors\GenericRepositoryConnector::select |
( |
|
$vars, |
|
|
|
$where, |
|
|
|
$options = [] , |
|
|
|
$extraNamespaces = [] |
|
) |
| |
SELECT 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
-
$vars | mixed array or string, field name(s) to be retrieved, can be '*' |
$where | string WHERE part of the query, without surrounding { } |
$options | array (associative) of options, e.g. array( 'LIMIT' => '10' ) |
$extraNamespaces | array (associative) of namespaceId => namespaceUri |
- Returns
- RepositoryResult
Implements SMW\SPARQLStore\RepositoryConnection.
SMW\SPARQLStore\RepositoryConnectors\GenericRepositoryConnector::selectCount |
( |
|
$variable, |
|
|
|
$where, |
|
|
|
$options = [] , |
|
|
|
$extraNamespaces = [] |
|
) |
| |
SELECT wrapper for counting results. The function declares the standard namespaces wiki, swivt, rdf, owl, rdfs, property, xsd, so these do not have to be included in $extraNamespaces.
- Parameters
-
$variable | string variable name or '*' |
$where | string WHERE part of the query, without surrounding { } |
$options | array (associative) of options, e.g. array('LIMIT' => '10') |
$extraNamespaces | array (associative) of namespaceId => namespaceUri |
- Returns
- RepositoryResult