Open Semantic Framework PHP API  3.0
 All Data Structures Namespaces Files Functions Variables Pages
SparqlQuery Class Reference

SPARQL Query to a OSF SPARQL web service endpoint. More...

Inheritance diagram for SparqlQuery:

Public Member Functions

 __construct ($network, $appID, $apiKey, $userID)
 Constructor. More...
 
 query ($query)
 SPARQL query to send to the endpoint. More...
 
 dataset ($dataset)
 URI of the dataset to query. More...
 
 defaultGraphUri ($defaultGraph)
 Specify the URI of the default graph to use for this SPARQL query. More...
 
 namedGraphUri ($namedGraph)
 Specify the URI of the named graph to use for this SPARQL query. More...
 

Detailed Description

SPARQL Query to a OSF SPARQL web service endpoint.

The SPARQL Web service is used to send custom SPARQL queries against the OSF data structure. This is a general purpose querying Web service.

Here is a code example of how this class can be used by developers:

See also
http://wiki.opensemanticframework.org/index.php/SPARQL
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 28 of file SparqlQuery.php.

Constructor & Destructor Documentation

__construct (   $network,
  $appID,
  $apiKey,
  $userID 
)

Constructor.

Parameters
mixed$networkOSF network where to send this query. Ex: http://localhost/ws/
mixed$appIDThe Application ID of the instance instance to key. The APP-ID is related to the API-KEY
mixed$apiKeyThe API Key of the OSF web service endpoints
mixed$userIDThe ID of the user that is doing the query

Definition at line 38 of file SparqlQuery.php.

Member Function Documentation

dataset (   $dataset)

URI of the dataset to query.

Only use this function when you don't have FROM NAMED clauses in your SPARQL query.

Optional: This function could be called before sending the query

See also
http://wiki.opensemanticframework.org/index.php/SPARQL#Web_Service_Endpoint_Information
Parameters
mixed$datasetURI of the dataset to query

Definition at line 99 of file SparqlQuery.php.

defaultGraphUri (   $defaultGraph)

Specify the URI of the default graph to use for this SPARQL query.

Optional: This function could be called before sending the query

See also
http://wiki.opensemanticframework.org/index.php/SPARQL#Web_Service_Endpoint_Information
Parameters
mixed$defaultGraphURI of the default graph

Definition at line 115 of file SparqlQuery.php.

namedGraphUri (   $namedGraph)

Specify the URI of the named graph to use for this SPARQL query.

Optional: This function could be called before sending the query

See also
http://wiki.opensemanticframework.org/index.php/SPARQL#Web_Service_Endpoint_Information
Parameters
mixed$namedGraphURI of the named graph

Definition at line 131 of file SparqlQuery.php.

query (   $query)

SPARQL query to send to the endpoint.

Required: This function must be called before sending the query

See also
http://wiki.opensemanticframework.org/index.php/SPARQL#Web_Service_Endpoint_Information
Parameters
mixed$querySPARQL query to send to the endpoint

Definition at line 82 of file SparqlQuery.php.