DatasetCreate Class Reference
[Dataset Management Web Service]

Dataset Create Web Service. It creates a new graph for this dataset & indexation of its description. More...

Inherits WebService.

Collaboration diagram for DatasetCreate:

List of all members.

Public Member Functions

 __construct ($uri, $datasetTitle="", $description="", $creator="", $requester_ip)
 Constructor.
 __destruct ()
 pipeline_getError ()
 Returns the error structure.
 pipeline_getResultset ()
 Create a resultset in a pipelined mode based on the processed information by the Web service.
 injectDoctype ($xmlDoc)
 Inject the DOCType in a XML document.
 ws_conneg ($accept, $accept_charset, $accept_encoding, $accept_language)
 Do content negotiation as an external Web Service.
 pipeline_conneg ($accept, $accept_charset, $accept_encoding, $accept_language)
 Do content negotiation as an internal, pipelined, Web Service that is part of a Compound Web Service.
 pipeline_getResponseHeaderStatus ()
 Returns the response HTTP header status.
 pipeline_getResponseHeaderStatusMsg ()
 Returns the response HTTP header status message.
 pipeline_getResponseHeaderStatusMsgExt ()
 Returns the response HTTP header status message extension.
 pipeline_serialize ()
 Serialize the web service answer.
 pipeline_serialize_reification ()
 Non implemented method (only defined).
 ws_serialize ()
 Serialize the web service answer.
 ws_respond ($content)
 Sends the HTTP response to the requester.
 process ()
 Create a new dataset within the WSF.
 xmlEncode ($string)
 Encode content to be included in XML files.
 jsonEncode ($string)
 Encode a string to put in a JSON value.

Static Public Attributes

static $supportedSerializations
 Supported serialization mime types by this Web service.
static $data_ini = "/data/"
 data.ini file folder
static $network_ini = "/usr/share/structwsf/"
 network.ini file folder

Protected Member Functions

 validateQuery ()
 Validate a query to this web service.

Protected Attributes

 $db_username = ""
 Database user name.
 $db_password = ""
 Database password.
 $db_dsn = ""
 Database DSN connection.
 $db_host = "localhost"
 Database host.
 $dtdBaseURL = ""
 DTD URL of the web service.
 $wsf_graph = ""
 The graph where the Web Services Framework description has been indexed.
 $wsf_base_url = ""
 Base URL of the WSF.
 $wsf_base_path = ""
 Local server path of the WSF files.
 $wsf_local_ip = ""
 Local server path of the WSF files.
 $wsf_solr_core = ""
 The core to use for Solr; "" for no core.
 $ontologies_files_folder = ""
 Path to the ontologies description files (in RDFS and OWL).
 $solr_host = "localhost"
 Hostname where to send queries to the Solr instance.
 $ontological_structure_folder = ""
 Path to the structWSF ontological structure.
 $log_table = "SD.WSF.ws_queries_log"
 Name of the logging table on the Virtuoso instance.
 $solr_auto_commit = FALSE
 Auto commit handled by the Solr data management systems. If this parameter is true, then this means Solr will handle the commit operation by itself. If it is false, then the web services will trigger the commit operations. Usually, Auto-commit should be handled by Solr when the size of the dataset is too big, otherwise operation such as delete could take much time.
 $uri
 The URI of the Authentication Registrar web service.
 $title
 The Title of the Authentication Registrar web service.
 $crud_usage
 The CRUD usage of the Authentication Registrar web service.
 $endpoint
 The endpoint of the Authentication Registrar web service.

Private Attributes

 $db
 Database connection.
 $conneg
 Conneg object that manage the content negotiation capabilities of the web service.
 $dtdURL
 URL where the DTD of the XML document can be located on the Web.
 $requester_ip = ""
 IP of the requester.
 $datasetUri = ""
 Unique ID for the dataset.
 $datasetTitle = ""
 Title of the dataset.
 $description = ""
 Description of the dataset.
 $creator = ""
 URI of the creator of the dataset.
 $errorMessenger
 Error messages of this web service.


Detailed Description

Dataset Create Web Service. It creates a new graph for this dataset & indexation of its description.


Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 26 of file DatasetCreate.php.


Constructor & Destructor Documentation

DatasetCreate::__construct ( uri,
datasetTitle = "",
description = "",
creator = "",
requester_ip 
)

Constructor.

Initialize the Auth Web Service

Parameters:
[in] $uri URI to refer to this new dataset
[in] $datasetTitle Title of the dataset to create
[in] $description Description of the dataset to create
[in] $creator Unique identifier used to refer to the creator of this dataset
[in] $requester_ip IP address of the requester

Returns:
returns NULL
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 105 of file DatasetCreate.php.

References $creator, $datasetTitle, $description, $requester_ip, WebService::$uri, and WebService::__construct().

Here is the call graph for this function:

DatasetCreate::__destruct (  ) 

Reimplemented from WebService.

Definition at line 127 of file DatasetCreate.php.

Referenced by ws_respond().


Member Function Documentation

DatasetCreate::injectDoctype ( xmlDoc  ) 

Inject the DOCType in a XML document.


Parameters:
[in] $xmlDoc The XML document where to inject the doctype
Returns:
a XML document with a doctype
Author:
Frederick Giasson, Structured Dynamics LLC.



Reimplemented from WebService.

Definition at line 222 of file DatasetCreate.php.

WebService::jsonEncode ( string  )  [inherited]

Encode a string to put in a JSON value.

Parameters:
[in] $string The string to escape

Returns:
returns the escaped string
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 398 of file WebService.php.

Referenced by Sparql::pipeline_serialize(), Search::pipeline_serialize(), DatasetRead::pipeline_serialize(), CrudRead::pipeline_serialize(), Browse::pipeline_serialize(), and AuthLister::pipeline_serialize().

DatasetCreate::pipeline_conneg ( accept,
accept_charset,
accept_encoding,
accept_language 
)

Do content negotiation as an internal, pipelined, Web Service that is part of a Compound Web Service.


Parameters:
[in] $accept Accepted mime types (HTTP header)
[in] $accept_charset Accepted charsets (HTTP header)
[in] $accept_encoding Accepted encodings (HTTP header)
[in] $accept_language Accepted languages (HTTP header)
Returns:
returns NULL
Author:
Frederick Giasson, Structured Dynamics LLC.



Reimplemented from WebService.

Definition at line 323 of file DatasetCreate.php.

References ws_conneg().

Here is the call graph for this function:

DatasetCreate::pipeline_getError (  ) 

Returns the error structure.


Returns:
returns the error structure
Author:
Frederick Giasson, Structured Dynamics LLC.



Reimplemented from WebService.

Definition at line 195 of file DatasetCreate.php.

DatasetCreate::pipeline_getResponseHeaderStatus (  ) 

Returns the response HTTP header status.


Returns:
returns the response HTTP header status
Author:
Frederick Giasson, Structured Dynamics LLC.



Reimplemented from WebService.

Definition at line 336 of file DatasetCreate.php.

DatasetCreate::pipeline_getResponseHeaderStatusMsg (  ) 

Returns the response HTTP header status message.


Returns:
returns the response HTTP header status message
Author:
Frederick Giasson, Structured Dynamics LLC.



Reimplemented from WebService.

Definition at line 348 of file DatasetCreate.php.

DatasetCreate::pipeline_getResponseHeaderStatusMsgExt (  ) 

Returns the response HTTP header status message extension.


Returns:
returns the response HTTP header status message extension
Note:
The extension of a HTTP status message is
Author:
Frederick Giasson, Structured Dynamics LLC.



Reimplemented from WebService.

Definition at line 362 of file DatasetCreate.php.

DatasetCreate::pipeline_getResultset (  ) 

Create a resultset in a pipelined mode based on the processed information by the Web service.


Returns:
a resultset XML document
Author:
Frederick Giasson, Structured Dynamics LLC.



Reimplemented from WebService.

Definition at line 208 of file DatasetCreate.php.

DatasetCreate::pipeline_serialize (  ) 

Serialize the web service answer.


Returns:
returns the serialized content
Author:
Frederick Giasson, Structured Dynamics LLC.



Reimplemented from WebService.

Definition at line 374 of file DatasetCreate.php.

DatasetCreate::pipeline_serialize_reification (  ) 

Non implemented method (only defined).


Author:
Frederick Giasson, Structured Dynamics LLC.



Reimplemented from WebService.

Definition at line 384 of file DatasetCreate.php.

DatasetCreate::process (  ) 

Create a new dataset within the WSF.


Author:
Frederick Giasson, Structured Dynamics LLC.



Reimplemented from WebService.

Definition at line 435 of file DatasetCreate.php.

References $query, and $ws_al.

DatasetCreate::validateQuery (  )  [protected]

Validate a query to this web service.

If a user wants to create a new dataset on a given structWSF web service endpoint, he has to have access to the "http://.../wsf/datasets/" graph with Create privileges. If the users doesn't have these permissions, then he won't be able to create a new dataset on the instance.

By default, only the administrators have such an access on a structWSF instance. However a system administrator can choose to make the "http://.../wsf/datasets/" world creatable, which would mean that anybody could create new datasets on the instance. Additionally an administrator could setup these permissions for a single user too. This user could create new datasets, but he won't be able to delete the ones from others, etc.


Returns:
TRUE if valid; FALSE otherwise
Note:
This function is not used by the authentication validator web service
Author:
Frederick Giasson, Structured Dynamics LLC.



Reimplemented from WebService.

Definition at line 160 of file DatasetCreate.php.

References $ws_av.

Referenced by ws_conneg().

DatasetCreate::ws_conneg ( accept,
accept_charset,
accept_encoding,
accept_language 
)

Do content negotiation as an external Web Service.


Parameters:
[in] $accept Accepted mime types (HTTP header)
[in] $accept_charset Accepted charsets (HTTP header)
[in] $accept_encoding Accepted encodings (HTTP header)
[in] $accept_language Accepted languages (HTTP header)
Returns:
returns NULL
Author:
Frederick Giasson, Structured Dynamics LLC.



Reimplemented from WebService.

Definition at line 242 of file DatasetCreate.php.

References $query, $supportedSerializations, and validateQuery().

Referenced by pipeline_conneg().

Here is the call graph for this function:

DatasetCreate::ws_respond ( content  ) 

Sends the HTTP response to the requester.


Parameters:
[in] $content The content (body) of the response.
Returns:
NULL
Author:
Frederick Giasson, Structured Dynamics LLC.



Reimplemented from WebService.

Definition at line 410 of file DatasetCreate.php.

References __destruct().

Here is the call graph for this function:

DatasetCreate::ws_serialize (  ) 

Serialize the web service answer.


Returns:
returns the serialized content
Author:
Frederick Giasson, Structured Dynamics LLC.



Reimplemented from WebService.

Definition at line 396 of file DatasetCreate.php.


Member Data Documentation

DatasetCreate::$conneg [private]

Conneg object that manage the content negotiation capabilities of the web service.

Definition at line 32 of file DatasetCreate.php.

DatasetCreate::$creator = "" [private]

URI of the creator of the dataset.

Definition at line 50 of file DatasetCreate.php.

Referenced by __construct().

WebService::$crud_usage [protected, inherited]

The CRUD usage of the Authentication Registrar web service.

Definition at line 95 of file WebService.php.

Referenced by AuthRegistrarWs::ws_conneg().

WebService::$data_ini = "/data/" [static, inherited]

data.ini file folder

Definition at line 34 of file WebService.php.

Referenced by WebService::__construct(), and Logger::__construct().

DatasetCreate::$datasetTitle = "" [private]

Title of the dataset.

Definition at line 44 of file DatasetCreate.php.

Referenced by __construct().

DatasetCreate::$datasetUri = "" [private]

Unique ID for the dataset.

Definition at line 41 of file DatasetCreate.php.

DatasetCreate::$db [private]

Database connection.

Definition at line 29 of file DatasetCreate.php.

WebService::$db_dsn = "" [protected, inherited]

Database DSN connection.

Definition at line 46 of file WebService.php.

WebService::$db_host = "localhost" [protected, inherited]

Database host.

Definition at line 49 of file WebService.php.

WebService::$db_password = "" [protected, inherited]

Database password.

Definition at line 43 of file WebService.php.

WebService::$db_username = "" [protected, inherited]

Database user name.

Definition at line 40 of file WebService.php.

DatasetCreate::$description = "" [private]

Description of the dataset.

Definition at line 47 of file DatasetCreate.php.

Referenced by __construct().

WebService::$dtdBaseURL = "" [protected, inherited]

DTD URL of the web service.

Definition at line 52 of file WebService.php.

DatasetCreate::$dtdURL [private]

URL where the DTD of the XML document can be located on the Web.

Definition at line 35 of file DatasetCreate.php.

WebService::$endpoint [protected, inherited]

The endpoint of the Authentication Registrar web service.

Definition at line 98 of file WebService.php.

DatasetCreate::$errorMessenger [private]

Initial value:

    '{
                        "ws": "/ws/dataset/create/",
                        "_200": {
                          "id": "WS-DATASET-CREATE-200",
                          "level": "Warning",
                          "name": "No unique identifier specified for this dataset",
                          "description": "No URI defined for this new dataset"
                        },
                        "_201": {
                          "id": "WS-DATASET-CREATE-201",
                          "level": "Fatal",
                          "name": "Can\'t check if the dataset is already existing",
                          "description": "An error occured when we tried to check if the dataset was already existing in the system"
                        },
                        "_202": {
                          "id": "WS-DATASET-CREATE-202",
                          "level": "Warning",
                          "name": "Dataset already existing",
                          "description": "This dataset is already existing in this web services framework"
                        },
                        "_300": {
                          "id": "WS-DATASET-CREATE-300",
                          "level": "Fatal",
                          "name": "Can\'t create the dataset",
                          "description": "An error occured when we tried to register the new dataset to the web service framework"
                        }  
                      }'
Error messages of this web service.

Definition at line 58 of file DatasetCreate.php.

WebService::$log_table = "SD.WSF.ws_queries_log" [protected, inherited]

Name of the logging table on the Virtuoso instance.

Definition at line 79 of file WebService.php.

WebService::$network_ini = "/usr/share/structwsf/" [static, inherited]

network.ini file folder

Definition at line 37 of file WebService.php.

Referenced by WebService::__construct().

WebService::$ontological_structure_folder = "" [protected, inherited]

Path to the structWSF ontological structure.

Definition at line 76 of file WebService.php.

WebService::$ontologies_files_folder = "" [protected, inherited]

Path to the ontologies description files (in RDFS and OWL).

Definition at line 70 of file WebService.php.

DatasetCreate::$requester_ip = "" [private]

IP of the requester.

Definition at line 38 of file DatasetCreate.php.

Referenced by __construct().

WebService::$solr_auto_commit = FALSE [protected, inherited]

Auto commit handled by the Solr data management systems. If this parameter is true, then this means Solr will handle the commit operation by itself. If it is false, then the web services will trigger the commit operations. Usually, Auto-commit should be handled by Solr when the size of the dataset is too big, otherwise operation such as delete could take much time.

Definition at line 86 of file WebService.php.

WebService::$solr_host = "localhost" [protected, inherited]

Hostname where to send queries to the Solr instance.

Definition at line 73 of file WebService.php.

DatasetCreate::$supportedSerializations [static]

Initial value:

    array ("application/json", "application/rdf+xml", "application/rdf+n3", "application/*", "text/xml", "text/*",
      "*/*")
Supported serialization mime types by this Web service.

Definition at line 53 of file DatasetCreate.php.

Referenced by ws_conneg().

WebService::$title [protected, inherited]

The Title of the Authentication Registrar web service.

Definition at line 92 of file WebService.php.

Referenced by DatasetUpdate::__construct(), and DatasetRead::process().

WebService::$wsf_base_path = "" [protected, inherited]

Local server path of the WSF files.

Definition at line 61 of file WebService.php.

WebService::$wsf_base_url = "" [protected, inherited]

Base URL of the WSF.

Definition at line 58 of file WebService.php.

WebService::$wsf_graph = "" [protected, inherited]

The graph where the Web Services Framework description has been indexed.

Definition at line 55 of file WebService.php.

WebService::$wsf_local_ip = "" [protected, inherited]

Local server path of the WSF files.

Definition at line 64 of file WebService.php.

WebService::$wsf_solr_core = "" [protected, inherited]

The core to use for Solr; "" for no core.

Definition at line 67 of file WebService.php.


The documentation for this class was generated from the following file:
Copyright © 2009. Structured Dynamics LLC Structured Dynamics LLC. All rights reserved.