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

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

Inheritance diagram for RevisionUpdateQuery:

Public Member Functions

 __construct ($network, $appID, $apiKey, $userID)
 Constructor. More...
 
 revisionUri ($uri)
 Specifies the URI of the revision record to delete. More...
 
 dataset ($dataset)
 Specifies the dataset URI where the record is indexed. More...
 
 isPublished ()
 Specify that the record being updated has a lifecycle stage status 'published'. More...
 
 isArchive ()
 Specify that the record being updated has a lifecycle stage status 'archive'. More...
 
 isExperimental ()
 Specify that the record being updated has a lifecycle stage status 'experimental'. More...
 
 isPreRelease ()
 Specify that the record being updated has a lifecycle stage status 'pre-release'. More...
 
 isStaging ()
 Specify that the record being updated has a lifecycle stage status 'staging'. More...
 
 isHarvesting ()
 Specify that the record being updated has a lifecycle stage status 'harvesting'. More...
 
 isUnspecified ()
 Specify that the record being updated has a lifecycle stage status 'unspecified'. More...
 

Detailed Description

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

The Revision: Update web service endpoint is used to change the lifestage status of a revision record. If you change the lifecycle stage of a unpublished revision to published, then this will replace the currently published record by this newly published revision. If you change the status of a currently published record to something else than published, then it will unpublish the record, and this record won't be accessible anymore in the 'public' dataset. This record will always be available via its revisions, however if the CRUD: Read web service endpoint is used with its URI, then it will return an error saying the record is not existing in the dataset. However, you could re-publish this record anytime in the future using this Revision: Update web service endpoint.

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

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

Definition at line 57 of file RevisionUpdateQuery.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 67 of file RevisionUpdateQuery.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:_Update#Web_Service_Endpoint_Information
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 120 of file RevisionUpdateQuery.php.

isArchive ( )

Specify that the record being updated has a lifecycle stage status 'archive'.

Required: This function must be called before sending the query

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

Definition at line 152 of file RevisionUpdateQuery.php.

isExperimental ( )

Specify that the record being updated has a lifecycle stage status 'experimental'.

Required: This function must be called before sending the query

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

Definition at line 168 of file RevisionUpdateQuery.php.

isHarvesting ( )

Specify that the record being updated has a lifecycle stage status 'harvesting'.

Required: This function must be called before sending the query

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

Definition at line 216 of file RevisionUpdateQuery.php.

isPreRelease ( )

Specify that the record being updated has a lifecycle stage status 'pre-release'.

Required: This function must be called before sending the query

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

Definition at line 184 of file RevisionUpdateQuery.php.

isPublished ( )

Specify that the record being updated has a lifecycle stage status 'published'.

Required: This function must be called before sending the query

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

Definition at line 136 of file RevisionUpdateQuery.php.

isStaging ( )

Specify that the record being updated has a lifecycle stage status 'staging'.

Required: This function must be called before sending the query

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

Definition at line 200 of file RevisionUpdateQuery.php.

isUnspecified ( )

Specify that the record being updated has a lifecycle stage status 'unspecified'.

Required: This function must be called before sending the query

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

Definition at line 232 of file RevisionUpdateQuery.php.

revisionUri (   $uri)

Specifies the URI of the revision record to delete.

This URI can be found using the RevisionUpdateQuery() call.

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

Definition at line 103 of file RevisionUpdateQuery.php.