The abstract class that define a compound web service. More...

Inheritance diagram for CompoundWebService:
Collaboration diagram for CompoundWebService:

Public Member Functions

 __construct ()
 __destruct ()
 setSupportedSerializations ($supportedSerializations)
 ws_conneg ($accept, $accept_charset, $accept_encoding, $accept_language)
 does the content negotiation for the queries that come from the Web (when this class acts as a Web Service)
 ws_serialize ()
 Output the content generated by the class in some serialization format.
 ws_respond ($content)
 Sends the respond to the user. The $content should come from ws_serialize() to be valid according to the conneg with the user.
 process ()
 Process the functionality of the web service.
 pipeline_conneg ($accept, $accept_charset, $accept_encoding, $accept_language)
 Propagate the conneg to the nodes that belong to the current pipeline of web services.
 pipeline_getResponseHeaderStatus ()
 Returns the response HTTP header status.
 pipeline_getError ()
 Returns the error structure.
 pipeline_getResponseHeaderStatusMsg ()
 Returns the response HTTP header status message.
 pipeline_getResponseHeaderStatusMsgExt ()
 Returns the response HTTP header status message extension.
 pipeline_getResultset ()
 Create a resultset in a pipelined mode based on the processed information by the Web service.
 pipeline_serialize ()
 Serialize content into different serialization formats.
 pipeline_serialize_reification ()
 Returns the description of the reification of some triples defined by pipeline_serialize().
 injectDoctype ($xmlDoc)
 Inject the DOCType in a XML document.
 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 $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.
 $track_create = FALSE
 Enable the tracking of records changes from the Crud Create web service endpoint.
 $track_update = FALSE
 Enable the tracking of records changes from the Crud Update web service endpoint.
 $track_delete = FALSE
 Enable the tracking of records changes from the Crud Delete web service endpoint.
 $tracking_endpoint = ""
 Specifies a specific WSF tracking web service endpoint URL to access the tracking endpoint. This is useful to put all the record changes tracking on a different, dedicated purposes, WSF server. If this parameter is commented, we will use the wsf_base_url to access the tracking endpoints. If it is uncommented, then we will use the endpoint specified by this parameter.
 $triplestore_port = "8890"
 Port number where the triple store server is reachable.
 $solr_port = "8983"
 Port number where the Solr store server is reachable.
 $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.
 $fields_index_folder = "/tmp/"
 This is the folder there the file of the index where all the fields defined in Solr are indexed. You have to make sure that the web server has write access to this folder. This folder path has to end with a slash "/".
 $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.
 $owlapiNbSessions
 Number of sessions (threads) to use in parallel.
 $owlapiBridgeURI
 URL where the Java Bridge can be accessed from this server.
 $geoEnabled = FALSE

Detailed Description

The abstract class that define a compound web service.


Author:
Frederick Giasson, Structured Dynamics LLC.




Definition at line 25 of file CompoundWebService.php.


Constructor & Destructor Documentation

__construct (  ) 

Reimplemented from WebService.

Definition at line 27 of file CompoundWebService.php.

__destruct (  ) 

Reimplemented from WebService.

Definition at line 29 of file CompoundWebService.php.


Member Function Documentation

injectDoctype ( xmlDoc  )  [abstract, inherited]

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 in AuthLister, AuthRegistrarAccess, AuthRegistrarWs, AuthValidator, Browse, ConverterBibtex, ConverterCommON, ConverterIrJSON, ConverterTsv, CrudCreate, CrudDelete, CrudRead, CrudUpdate, DatasetCreate, DatasetDelete, DatasetRead, DatasetUpdate, Sparql, Search, Sparql, and TrackerCreate.

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 591 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().

pipeline_conneg ( accept,
accept_charset,
accept_encoding,
accept_language 
) [abstract, inherited]

Propagate the conneg to the nodes that belong to the current pipeline of web services.


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)
Author:
Frederick Giasson, Structured Dynamics LLC.




Reimplemented in AuthLister, AuthRegistrarAccess, AuthRegistrarWs, AuthValidator, Browse, ConverterBibtex, ConverterCommON, ConverterIrJSON, ConverterTsv, CrudCreate, CrudDelete, CrudRead, CrudUpdate, DatasetCreate, DatasetDelete, DatasetRead, DatasetUpdate, Sparql, Search, Sparql, and TrackerCreate.

pipeline_getError (  )  [abstract, inherited]

Returns the error structure.


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




Reimplemented in AuthLister, AuthRegistrarAccess, AuthRegistrarWs, AuthValidator, Browse, ConverterCommON, ConverterIrJSON, ConverterTsv, CrudCreate, CrudDelete, CrudRead, CrudUpdate, DatasetCreate, DatasetDelete, DatasetRead, DatasetUpdate, Sparql, Search, Sparql, and TrackerCreate.

pipeline_getResponseHeaderStatus (  )  [abstract, inherited]

Returns the response HTTP header status.


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




Reimplemented in AuthLister, AuthRegistrarAccess, AuthRegistrarWs, AuthValidator, Browse, ConverterBibtex, ConverterCommON, ConverterIrJSON, ConverterTsv, CrudCreate, CrudDelete, CrudRead, CrudUpdate, DatasetCreate, DatasetDelete, DatasetRead, DatasetUpdate, Sparql, Search, Sparql, and TrackerCreate.

pipeline_getResponseHeaderStatusMsg (  )  [abstract, inherited]

Returns the response HTTP header status message.


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




Reimplemented in AuthLister, AuthRegistrarAccess, AuthRegistrarWs, AuthValidator, Browse, ConverterBibtex, ConverterCommON, ConverterIrJSON, ConverterTsv, CrudCreate, CrudDelete, CrudRead, CrudUpdate, DatasetCreate, DatasetDelete, DatasetRead, DatasetUpdate, Sparql, Search, Sparql, and TrackerCreate.

pipeline_getResponseHeaderStatusMsgExt (  )  [abstract, inherited]

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 in AuthLister, AuthRegistrarAccess, AuthRegistrarWs, AuthValidator, Browse, ConverterBibtex, ConverterCommON, ConverterIrJSON, ConverterTsv, CrudCreate, CrudDelete, CrudRead, CrudUpdate, DatasetCreate, DatasetDelete, DatasetRead, DatasetUpdate, Sparql, Search, Sparql, and TrackerCreate.

pipeline_getResultset (  )  [abstract, inherited]

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 in AuthLister, AuthRegistrarAccess, AuthRegistrarWs, AuthValidator, Browse, ConverterBibtex, ConverterCommON, ConverterIrJSON, ConverterTsv, CrudCreate, CrudDelete, CrudRead, CrudUpdate, DatasetCreate, DatasetDelete, DatasetRead, DatasetUpdate, Sparql, Search, Sparql, and TrackerCreate.

pipeline_serialize (  )  [abstract, inherited]

Serialize content into different serialization formats.


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




Reimplemented in AuthLister, AuthRegistrarAccess, AuthRegistrarWs, AuthValidator, Browse, ConverterBibtex, ConverterCommON, ConverterIrJSON, ConverterTsv, CrudCreate, CrudDelete, CrudRead, CrudUpdate, DatasetCreate, DatasetDelete, DatasetRead, DatasetUpdate, Sparql, Search, Sparql, and TrackerCreate.

pipeline_serialize_reification (  )  [abstract, inherited]

Returns the description of the reification of some triples defined by pipeline_serialize().


Note:
most of the web services won't implement this procedure.
Author:
Frederick Giasson, Structured Dynamics LLC.




Reimplemented in AuthLister, AuthRegistrarAccess, AuthRegistrarWs, AuthValidator, Browse, ConverterBibtex, ConverterCommON, ConverterIrJSON, ConverterTsv, CrudCreate, CrudDelete, CrudRead, CrudUpdate, DatasetCreate, DatasetDelete, DatasetRead, DatasetUpdate, Sparql, Search, Sparql, and TrackerCreate.

process (  )  [abstract, inherited]

Process the functionality of the web service.


Author:
Frederick Giasson, Structured Dynamics LLC.




Reimplemented in AuthLister, AuthRegistrarAccess, AuthRegistrarWs, AuthValidator, Browse, ConverterBibtex, ConverterCommON, ConverterIrJSON, ConverterTsv, CrudCreate, CrudDelete, CrudRead, CrudUpdate, DatasetCreate, DatasetDelete, DatasetRead, DatasetUpdate, Sparql, Search, Sparql, and TrackerCreate.

setSupportedSerializations ( supportedSerializations  ) 

Definition at line 37 of file CompoundWebService.php.

References $mime.

validateQuery (  )  [abstract, protected, inherited]

Validate a query to this web service.


Returns:
TRUE if valid; FALSE otherwise
Note:
Usually, this function sends a query to the Authentication web service in order to be validated.
Author:
Frederick Giasson, Structured Dynamics LLC.




Reimplemented in AuthLister, AuthRegistrarAccess, AuthRegistrarWs, AuthValidator, Browse, ConverterBibtex, ConverterCommON, ConverterIrJSON, ConverterTsv, CrudCreate, CrudDelete, CrudRead, CrudUpdate, DatasetCreate, DatasetDelete, DatasetRead, DatasetUpdate, Sparql, Search, Sparql, and TrackerCreate.

ws_conneg ( accept,
accept_charset,
accept_encoding,
accept_language 
) [abstract, inherited]

does the content negotiation for the queries that come from the Web (when this class acts as a 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)
Author:
Frederick Giasson, Structured Dynamics LLC.




Reimplemented in AuthLister, AuthRegistrarAccess, AuthRegistrarWs, AuthValidator, Browse, ConverterBibtex, ConverterCommON, ConverterIrJSON, ConverterTsv, CrudCreate, CrudDelete, CrudRead, CrudUpdate, DatasetCreate, DatasetDelete, DatasetRead, DatasetUpdate, Sparql, Search, Sparql, and TrackerCreate.

ws_respond ( content  )  [abstract, inherited]

Sends the respond to the user. The $content should come from ws_serialize() to be valid according to the conneg with the user.


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




Reimplemented in AuthLister, AuthRegistrarAccess, AuthRegistrarWs, AuthValidator, Browse, ConverterBibtex, ConverterCommON, ConverterIrJSON, ConverterTsv, CrudCreate, CrudDelete, CrudRead, CrudUpdate, DatasetCreate, DatasetDelete, DatasetRead, DatasetUpdate, Sparql, Search, Sparql, and TrackerCreate.

ws_serialize (  )  [abstract, inherited]

Output the content generated by the class in some serialization format.


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




Reimplemented in AuthLister, AuthRegistrarAccess, AuthRegistrarWs, AuthValidator, Browse, ConverterBibtex, ConverterCommON, ConverterIrJSON, ConverterTsv, CrudCreate, CrudDelete, CrudRead, CrudUpdate, DatasetCreate, DatasetDelete, DatasetRead, DatasetUpdate, Sparql, Search, Sparql, and TrackerCreate.


Field Documentation

$crud_usage [protected, inherited]

The CRUD usage of the Authentication Registrar web service.

Definition at line 122 of file WebService.php.

Referenced by AuthRegistrarWs::ws_conneg().

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

data.ini file folder

Definition at line 32 of file WebService.php.

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

$db_dsn = "" [protected, inherited]

Database DSN connection.

Definition at line 44 of file WebService.php.

$db_host = "localhost" [protected, inherited]

Database host.

Definition at line 47 of file WebService.php.

$db_password = "" [protected, inherited]

Database password.

Definition at line 41 of file WebService.php.

$db_username = "" [protected, inherited]

Database user name.

Definition at line 38 of file WebService.php.

$dtdBaseURL = "" [protected, inherited]

DTD URL of the web service.

Definition at line 50 of file WebService.php.

$endpoint [protected, inherited]

The endpoint of the Authentication Registrar web service.

Definition at line 125 of file WebService.php.

Referenced by CrudUpdate::process(), CrudDelete::process(), and CrudCreate::process().

$fields_index_folder = "/tmp/" [protected, inherited]

This is the folder there the file of the index where all the fields defined in Solr are indexed. You have to make sure that the web server has write access to this folder. This folder path has to end with a slash "/".

Definition at line 113 of file WebService.php.

$geoEnabled = FALSE [protected, inherited]

Definition at line 133 of file WebService.php.

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

Name of the logging table on the Virtuoso instance.

Definition at line 100 of file WebService.php.

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

network.ini file folder

Definition at line 35 of file WebService.php.

Referenced by WebService::__construct().

$ontological_structure_folder = "" [protected, inherited]

Path to the structWSF ontological structure.

Definition at line 74 of file WebService.php.

$ontologies_files_folder = "" [protected, inherited]

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

Definition at line 68 of file WebService.php.

$owlapiBridgeURI [protected, inherited]

URL where the Java Bridge can be accessed from this server.

Definition at line 131 of file WebService.php.

$owlapiNbSessions [protected, inherited]

Number of sessions (threads) to use in parallel.

Definition at line 128 of file WebService.php.

$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 107 of file WebService.php.

$solr_host = "localhost" [protected, inherited]

Hostname where to send queries to the Solr instance.

Definition at line 71 of file WebService.php.

$solr_port = "8983" [protected, inherited]

Port number where the Solr store server is reachable.

Definition at line 96 of file WebService.php.

$title [protected, inherited]

The Title of the Authentication Registrar web service.

Definition at line 119 of file WebService.php.

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

$track_create = FALSE [protected, inherited]

Enable the tracking of records changes from the Crud Create web service endpoint.

Definition at line 77 of file WebService.php.

$track_delete = FALSE [protected, inherited]

Enable the tracking of records changes from the Crud Delete web service endpoint.

Definition at line 83 of file WebService.php.

$track_update = FALSE [protected, inherited]

Enable the tracking of records changes from the Crud Update web service endpoint.

Definition at line 80 of file WebService.php.

$tracking_endpoint = "" [protected, inherited]

Specifies a specific WSF tracking web service endpoint URL to access the tracking endpoint. This is useful to put all the record changes tracking on a different, dedicated purposes, WSF server. If this parameter is commented, we will use the wsf_base_url to access the tracking endpoints. If it is uncommented, then we will use the endpoint specified by this parameter.

Definition at line 90 of file WebService.php.

$triplestore_port = "8890" [protected, inherited]

Port number where the triple store server is reachable.

Definition at line 93 of file WebService.php.

$wsf_base_path = "" [protected, inherited]

Local server path of the WSF files.

Definition at line 59 of file WebService.php.

$wsf_base_url = "" [protected, inherited]

Base URL of the WSF.

Definition at line 56 of file WebService.php.

$wsf_graph = "" [protected, inherited]

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

Definition at line 53 of file WebService.php.

$wsf_local_ip = "" [protected, inherited]

Local server path of the WSF files.

Definition at line 62 of file WebService.php.

$wsf_solr_core = "" [protected, inherited]

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

Definition at line 65 of file WebService.php.


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