EndpointSparql HTTP Client for BorderCloud's Endpoint around basic php function.
You can send a query to any endpoint sparql and read the result in an array.
Example : send a simple query to DBpedia
With a query ASK, you can use the parameter 'raw' in the function query and read directly the result true or false.
Example : send a query ASK with the parameter raw
You can insert data also with SPARQL and the function query in your graphs. The BorderCloud's service can host your graphs ( http://www.bordercloud.com ). You can choose your graph's name and Bordercloud will give you a code. With 3 parameters, you are alone to update your graph.
Example : send a query Insert
Example : send a query Delete
You can import a file of type rdfxml, ntriples or turtle in your graph.
Example : Push a file RDF
Located in /bordercloud/Endpoint.php (line 177)
Endpoint
__construct
(string $endpoint, [string $jeton = null], [string $graph = null], [boolean $debug = false], [ $proxy_host = null], [ $proxy_port = null])
Constructor of Graph
Give the number of triples in a graph
Import a file in your graph.
The file can have the format :
Import a file of type rdfxml, ntriples or turtle
This function parse a SPARQL query, send the query and parse the SPARQL result in a array.
You can custom the result with the parameter $result_format :
Send a request SPARQL of type select or ask to endpoint directly and output the response of server. If you want parse the result of this function, it's better and simpler to use the function query().
if you want use another format, you can use directly the function queryReadJSON and queryReadTabSeparated
Send a request SPARQL of type select or ask to endpoint directly and output the response
of server in the format JSON
Send a request SPARQL of type select or ask to endpoint directly and output the response
of server in the format TabSeparated
Send a request SPARQL of type insert data or delete data to endpoint directly.
If you want check the query before to send, it's better to use the function query() in the class StorePlus.
Refresh the information of this graph in the graph http://www.bordercloud.com/dataset
Save the graph in a file
Give the size of graph (Bytes)
Documentation generated on Fri, 19 Aug 2011 16:45:09 +0200 by phpDocumentor 1.4.3