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

Revision Lister Query to a OSF Revision Lister web service endpoint. More...

Inheritance diagram for RevisionListerQuery:

Public Member Functions

 __construct ($network, $appID, $apiKey, $userID)
 Constructor. More...
 
 uri ($uri)
 Specifies the URI of the record for which you want the list of revisions. More...
 
 dataset ($dataset)
 Specifies the dataset URI where the record is indexed. More...
 
 shortResults ()
 Specifies that we want the short description of the results record. More...
 
 longResults ()
 Specifies that we want the long description of the results record. More...
 

Detailed Description

Revision Lister Query to a OSF Revision Lister web service endpoint.

The Revision: Lister web service endpoint is used to list all the revisions existing for a record. All the revision records have a unix timestamp in microseconds. This timestamp is defined as a double. All the revisions records can be sorted using this timestamp. If a user want to see what was the description of a record at a specific time, then he will use the Revision: Read web service endpoint to get all the triple of that record, for that revision.

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

// Use the RevisionListerQuery class
use \StructuredDynamics\osf\php\api\ws\revision\lister\RevisionListerQuery;
// Create the RevisionListerQuery object
$revisionlister = new RevisionListerQuery("http://demo.citizen-dan.org/ws/");
// Specifies that we want the short results description
$revisionlister->shortResults();
$revisionlister->uri('http://demo.citizen-dan.org/datasets/test/1/');
$revisionlister->dataset('http://demo.citizen-dan.org/datasets/test/');
// Send the revision lister query to the endpoint
$revisionlister->send();
// Get back the resultset returned by the endpoint
$resultset = $revisionlister->getResultset();
// Print different serializations for that resultset
print_r($resultset->getResultset());
See also
http://wiki.opensemanticframework.org/index.php/Revision:_Lister
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 55 of file RevisionListerQuery.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 65 of file RevisionListerQuery.php.

Member Function Documentation

dataset (   $dataset)

Specifies the dataset URI where the record is indexed.

Parameters
$datasetThe dataset URI where the record is indexed. This is the URI of the dataset, and not the URI of the revisions dataset.
See also
http://wiki.opensemanticframework.org/index.php/Revision:_Lister#Web_Service_Endpoint_Information
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 118 of file RevisionListerQuery.php.

longResults ( )

Specifies that we want the long description of the results record.

Returned record is described using their date stamp (for ordering purposes) their URI, the performer of the revision and their lifecycle stage status.

Note: this is the default behvior of the endpoint

See also
http://wiki.opensemanticframework.org/index.php/Revision:_Lister#Web_Service_Endpoint_Information
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 151 of file RevisionListerQuery.php.

shortResults ( )

Specifies that we want the short description of the results record.

Returned record is described using their date stamp (for ordering purposes) and their URI.

See also
http://wiki.opensemanticframework.org/index.php/Revision:_Lister#Web_Service_Endpoint_Information
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 133 of file RevisionListerQuery.php.

uri (   $uri)

Specifies the URI of the record for which you want the list of revisions.

Parameters
$uriURI of the record for which you want its list of revisions
See also
http://wiki.opensemanticframework.org/index.php/Revision:_Lister#Web_Service_Endpoint_Information
Author
Frederick Giasson, Structured Dynamics LLC.*

Definition at line 101 of file RevisionListerQuery.php.