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

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

Inheritance diagram for RevisionReadQuery:

Public Member Functions

 __construct ($network, $appID, $apiKey, $userID)
 Constructor. More...
 
 revisionUri ($uri)
 Specifies the URI of the revision URI record to read. More...
 
 dataset ($dataset)
 Specifies the dataset URI where the record is indexed. More...
 
 getRevision ()
 Specifies that you want the endpoint to return the full revision record, with all the information specific to the revision (status, revision time, performed, etc). More...
 
 getRecord ()
 Specifies that you want the endpoint to return the record of that revision, without all the meta information about the revision. More...
 

Detailed Description

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

The Revision: Read web service endpoint is used to read a specific revision of a record. This endpoint will return all the triples, including reification triples, of a specific revision record. This web service endpoint can be used to get all the triples, which includes the triples that defines the revision itself. But it can also be used to re-create the original state of the record when it got revisioned. This "original" state simple remove the revision specific triples and change the URI to its original one (and not the revision URI).

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

// Use the RevisionReadQuery class
use \StructuredDynamics\osf\php\api\ws\revision\read\RevisionReadQuery;
// Create the RevisionReadQuery object
$revisionread = new RevisionReadQuery("http://demo.citizen-dan.org/ws/");
$revisionread->getRevision();
$revisionread->recordUri('http://demo.citizen-dan.org/datasets/test/1/revision/12335.123');
$revisionread->dataset('http://demo.citizen-dan.org/datasets/test/');
// Send the revision read query to the endpoint
$revisionread->send();
// Get back the resultset returned by the endpoint
$resultset = $revisionread->getResultset();
// Print different serializations for that resultset
print_r($resultset->getResultset());
See also
http://wiki.opensemanticframework.org/index.php/Revision:_Read
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 54 of file RevisionReadQuery.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 64 of file RevisionReadQuery.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:_Read#Web_Service_Endpoint_Information
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 117 of file RevisionReadQuery.php.

getRecord ( )

Specifies that you want the endpoint to return the record of that revision, without all the meta information about the revision.

The URI of the record that will be returned will be different the one specified in this. parameter. The URI that will be used is the one of the actual record, so the one specified by the wsf:revisionUri property if the mode revision is used

This is the default behavior for this endpoint

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

Definition at line 152 of file RevisionReadQuery.php.

getRevision ( )

Specifies that you want the endpoint to return the full revision record, with all the information specific to the revision (status, revision time, performed, etc).

The URI of the record that will be returned will be the same as the one used for this parameter

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

Definition at line 133 of file RevisionReadQuery.php.

revisionUri (   $uri)

Specifies the URI of the revision URI record to read.

Parameters
$uriURI of the revision record to read
See also
http://wiki.opensemanticframework.org/index.php/Revision:_Read#Web_Service_Endpoint_Information
Author
Frederick Giasson, Structured Dynamics LLC.*

Definition at line 100 of file RevisionReadQuery.php.