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

Crud Delete Query to a OSF Crud Delete web service endpoint. More...

Inheritance diagram for CrudDeleteQuery:

Public Member Functions

 __construct ($network, $appID, $apiKey, $userID)
 Constructor. More...
 
 uri ($uri)
 Specifies the URI of the record to be deleted from the system. More...
 
 dataset ($uri)
 Set the URI(s) of the dataset where the instance record is indexed. More...
 
 soft ()
 Specify that this query will only delete the published record and not any of its possible revision. More...
 
 hard ()
 Specify that this query will delete the published record and all its revisions. More...
 

Detailed Description

Crud Delete Query to a OSF Crud Delete web service endpoint.

The CRUD: Delete Web service is used to delete an existing instance record indexed in some target dataset of a WSF. When the instance record gets deleted, all of the information archived in the dataset is deleted as well.

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

// Use the CrudDeleteQuery class
use \StructuredDynamics\osf\php\api\ws\crud\delete\CrudDeleteQuery;
// Create the CrudDeleteQuery object
$crudDelete = new CrudDeleteQuery("http://localhost/ws/");
// Specifies where the record we want to delete is indexed
$crudDelete->dataset("http://localhost/ws/dataset/my-new-dataset/");
// Specifies the URI of the record we want to delete from the system
$crudDelete->uri("http://www.w3.org/");
// Import that new RDF data
$crudDelete->send();
if($crudDelete->isSuccessful())
{
echo "Record deleted";
}
else
{
echo "Deletation failed: ".$crudDelete->getStatus()." (".$crudDelete->getStatusMessage().")\n";
echo $crudDelete->getStatusMessageDescription();
}
See also
http://wiki.opensemanticframework.org/index.php/CRUD:_Delete
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 54 of file CrudDeleteQuery.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 CrudDeleteQuery.php.

Member Function Documentation

dataset (   $uri)

Set the URI(s) of the dataset where the instance record is indexed.

Required: This function must be called before sending the query

Parameters
mixed$uriDataset URI where to index the RDF document
See also
http://wiki.opensemanticframework.org/index.php/CRUD:_Delete#Web_Service_Endpoint_Information
Author
Frederick Giasson, Structured Dynamics LLC.*

Definition at line 119 of file CrudDeleteQuery.php.

hard ( )

Specify that this query will delete the published record and all its revisions.

Required: This function must be called before sending the query

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

Definition at line 152 of file CrudDeleteQuery.php.

soft ( )

Specify that this query will only delete the published record and not any of its possible revision.

Required: This function must be called before sending the query

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

Definition at line 136 of file CrudDeleteQuery.php.

uri (   $uri)

Specifies the URI of the record to be deleted from the system.

Required: This function must be called before sending the query

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

Definition at line 101 of file CrudDeleteQuery.php.