class EasyRdf_Sparql_Client
Class for making SPARQL queries using the SPARQL 1.1 Protocol
Methods
__construct(string $queryUri, string $updateUri = null)
Create a new SPARQL endpoint client |
||
string |
getQueryUri()
Get the URI of the SPARQL query endpoint |
|
string |
getUpdateUri()
Get the URI of the SPARQL update endpoint |
|
getUri()
|
||
object |
query(string $query)
Make a query to the SPARQL endpoint |
|
integer |
countTriples(string $condition = '?s ?p ?o')
Count the number of triples in a SPARQL 1.1 endpoint |
|
array |
listNamedGraphs(string $limit = null)
Get a list of named graphs from a SPARQL 1.1 endpoint |
|
object |
update(string $query)
Make an update request to the SPARQL endpoint |
|
insert($data, $graphUri = null)
|
||
clear($graphUri, $silent = false)
|
Details
at line 63
public
__construct(string $queryUri, string $updateUri = null)
Create a new SPARQL endpoint client
If the query and update endpoints are the same, then you only need to give a single URI.
at line 84
public string
getQueryUri()
Get the URI of the SPARQL query endpoint
at line 93
public string
getUpdateUri()
Get the URI of the SPARQL update endpoint
at line 102
public
getUri()
at line 118
public object
query(string $query)
Make a query to the SPARQL endpoint
SELECT and ASK queries will return an object of type EasyRdfSparqlResult.
CONSTRUCT and DESCRIBE queries will return an object of type EasyRdf_Graph.
at line 133
public integer
countTriples(string $condition = '?s ?p ?o')
Count the number of triples in a SPARQL 1.1 endpoint
Performs a SELECT query to estriblish the total number of triples.
Counts total number of triples by default but a conditional triple pattern can be given to count of a subset of all triples.
at line 152
public array
listNamedGraphs(string $limit = null)
Get a list of named graphs from a SPARQL 1.1 endpoint
Performs a SELECT query to get a list of the named graphs
at line 177
public object
update(string $query)
Make an update request to the SPARQL endpoint
Successful responses will return the HTTP response object
Unsuccessful responses will throw an exception
at line 182
public
insert($data, $graphUri = null)
at line 211
public
clear($graphUri, $silent = false)