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

Dataset Read Query to a OSF Dataset Read web service endpoint. More...

Inheritance diagram for DatasetReadQuery:

Public Member Functions

 __construct ($network, $appID, $apiKey, $userID)
 Constructor. More...
 
 uri ($uri)
 Set the URI of the dataset to get information about. More...
 

Detailed Description

Dataset Read Query to a OSF Dataset Read web service endpoint.

The Dataset: Read Web service is used to get information (title, description, creator, contributor(s), creation date and last modification date) for a dataset belonging to the WSF (Web Services Framework).

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

use \StructuredDynamics\osf\php\api\ws\dataset\read\DatasetReadQuery;
$dRead = new DatasetReadQuery("http://localhost/ws/");
// Specify the Dataset URI for which we want its description
$dRead->uri("http://localhost/ws/dataset/my-new-dataset-3/");
$dRead->send();
if($dRead->isSuccessful())
{
// Get the RDF+N3 serialization of the resultset
echo $dRead->getResultset()->getResultsetRDFN3();
}
else
{
echo "Dataset read failed: ".$dRead->getStatus()." (".$dRead->getStatusMessage().")\n";
echo $dRead->getStatusMessageDescription();
}
See also
http://wiki.opensemanticframework.org/index.php/Dataset:_Read
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 49 of file DatasetReadQuery.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 59 of file DatasetReadQuery.php.

Member Function Documentation

uri (   $uri)

Set the URI of the dataset to get information about.

If the value of the URI is "all", then the description of all the datasets accessible to the requester will be returned.

Parameters
mixed$uriURI of the new dataset to create
See also
http://wiki.opensemanticframework.org/index.php/Dataset:_Read#Web_Service_Endpoint_Information
Author
Frederick Giasson, Structured Dynamics LLC.*

Definition at line 97 of file DatasetReadQuery.php.