コード例 #1
0
 /** Constructor
 
       @param $document Text of a Bibtex document
       @param $docmime The mime type of the incoming document to convert
       @param $base_uri The base URI to use to create the URIs of the resources created by this web service
       @param $registered_ip Target IP address registered in the WSF
       @param $requester_ip IP address of the requester
     
       @return returns NULL
     
       @author Frederick Giasson, Structured Dynamics LLC.
   */
 function __construct($document = "", $docmime = "application/x-bibtex", $base_uri = "http://www.baseuri.com/resource/", $registered_ip, $requester_ip)
 {
     parent::__construct();
     $this->db = new DBVirtuoso($this->db_username, $this->db_password, $this->db_dsn, $this->db_host);
     $this->docmime = $docmime;
     $this->text = $document;
     $this->baseURI = $base_uri;
     $this->requester_ip = $requester_ip;
     if ($registered_ip == "") {
         $this->registered_ip = $requester_ip;
     } else {
         $this->registered_ip = $registered_ip;
     }
     if (strtolower(substr($this->registered_ip, 0, 4)) == "self") {
         $pos = strpos($this->registered_ip, "::");
         if ($pos !== FALSE) {
             $account = substr($this->registered_ip, $pos + 2, strlen($this->registered_ip) - ($pos + 2));
             $this->registered_ip = $requester_ip . "::" . $account;
         } else {
             $this->registered_ip = $requester_ip;
         }
     }
     $this->bibItems = array();
     $this->uri = $this->wsf_base_url . "/wsf/ws/converter/bibtex/";
     $this->title = "Bibtex Converter Web Service";
     $this->crud_usage = new CrudUsage(FALSE, TRUE, FALSE, FALSE);
     $this->endpoint = $this->wsf_base_url . "/ws/converter/bibtex/";
     $this->dtdURL = "converter/bibtex/bibtex.dtd";
 }
コード例 #2
0
 /** Constructor
 
       @param $document Text of a irJSON document
       @param $docmime Mime type of the document
       @param $include_dataset_description Specifies if you want to include the description of the dataset in the
                                               resultset output
       @param $registered_ip Target IP address registered in the WSF
       @param $requester_ip IP address of the requester
     
       @return returns NULL
     
       @author Frederick Giasson, Structured Dynamics LLC.
   */
 function __construct($document = "", $docmime = "application/iron+json", $include_dataset_description = "false", $registered_ip, $requester_ip)
 {
     parent::__construct();
     $this->text = $document;
     $this->docmime = $docmime;
     $this->include_dataset_description = $include_dataset_description;
     $this->requester_ip = $requester_ip;
     if ($registered_ip == "") {
         $this->registered_ip = $requester_ip;
     } else {
         $this->registered_ip = $registered_ip;
     }
     if (strtolower(substr($this->registered_ip, 0, 4)) == "self") {
         $pos = strpos($this->registered_ip, "::");
         if ($pos !== FALSE) {
             $account = substr($this->registered_ip, $pos + 2, strlen($this->registered_ip) - ($pos + 2));
             $this->registered_ip = $requester_ip . "::" . $account;
         } else {
             $this->registered_ip = $requester_ip;
         }
     }
     $this->irJSONResources = array();
     $this->uri = $this->wsf_base_url . "/wsf/ws/converter/irjson/";
     $this->title = "irJSON Converter Web Service";
     $this->crud_usage = new CrudUsage(FALSE, TRUE, FALSE, FALSE);
     $this->endpoint = $this->wsf_base_url . "/ws/converter/irjson/";
     $this->dtdURL = "converter/irjson/irjson.dtd";
     $this->customLinkageSchema = new LinkageSchema();
     $this->customLinkageSchema->setLinkedType("application/rdf+xml");
     $this->errorMessenger = json_decode($this->errorMessenger);
 }
コード例 #3
0
 /** Constructor
         
       @param $uri Unique identifier used to refer to the dataset to update
       @param $title (optional).  Title of the dataset to update
       @param $description (optional).Description of the dataset to update
       @param $contributors (optional).List of contributor URIs seperated by ";"
       @param $modified (optional).Date of the modification of the dataset
       @param $registered_ip Target IP address registered in the WSF  
       @param $requester_ip IP address of the requester
       @param $requestedInterfaceVersion Version used for the requested source interface. The default is the latest 
                                         version of the interface.
 
       @return returns NULL
     
       @author Frederick Giasson, Structured Dynamics LLC.
   */
 function __construct($uri, $title, $description, $contributors, $modified, $registered_ip, $requester_ip, $interface = 'default', $requestedInterfaceVersion = "")
 {
     parent::__construct();
     $this->version = "1.0";
     $this->db = new DBVirtuoso($this->db_username, $this->db_password, $this->db_dsn, $this->db_host);
     $this->datasetUri = $uri;
     $this->datasetTitle = $title;
     $this->description = $description;
     $this->contributors = $contributors;
     $this->modified = $modified;
     $this->requester_ip = $requester_ip;
     if ($registered_ip == "") {
         $this->registered_ip = $requester_ip;
     } else {
         $this->registered_ip = $registered_ip;
     }
     $this->requestedInterfaceVersion = $requestedInterfaceVersion;
     if (strtolower($interface) == "default") {
         $this->interface = $this->default_interfaces["dataset_update"];
     } else {
         $this->interface = $interface;
     }
     if (strtolower(substr($this->registered_ip, 0, 4)) == "self") {
         $pos = strpos($this->registered_ip, "::");
         if ($pos !== FALSE) {
             $account = substr($this->registered_ip, $pos + 2, strlen($this->registered_ip) - ($pos + 2));
             $this->registered_ip = $requester_ip . "::" . $account;
         } else {
             $this->registered_ip = $requester_ip;
         }
     }
     $this->uri = $this->wsf_base_url . "/wsf/ws/dataset/update/";
     $this->title = "Dataset Update Web Service";
     $this->crud_usage = new CrudUsage(FALSE, FALSE, TRUE, FALSE);
     $this->endpoint = $this->wsf_base_url . "/ws/dataset/update/";
     $this->errorMessenger = json_decode($this->errorMessenger);
 }
コード例 #4
0
 /** Constructor
       
       @param $uri URI of the instance record to delete
       @param $dataset URI of the dataset where the instance record is indexed
       @param $registered_ip Target IP address registered in the WSF
       @param $requester_ip IP address of the requester
       @param $interface Name of the source interface to use for this web service query. Default value: 'default'                            
       @param $requestedInterfaceVersion Version used for the requested source interface. The default is the latest 
                                         version of the interface.
 
       @return returns NULL
     
       @author Frederick Giasson, Structured Dynamics LLC.
   */
 function __construct($uri, $dataset, $registered_ip, $requester_ip, $interface = 'default', $requestedInterfaceVersion = "")
 {
     parent::__construct();
     $this->version = "1.0";
     $this->db = new DBVirtuoso($this->db_username, $this->db_password, $this->db_dsn, $this->db_host);
     $this->requester_ip = $requester_ip;
     $this->dataset = $dataset;
     $this->resourceUri = $uri;
     if ($registered_ip == "") {
         $this->registered_ip = $requester_ip;
     } else {
         $this->registered_ip = $registered_ip;
     }
     if (strtolower($interface) == "default") {
         $this->interface = $this->default_interfaces["crud_delete"];
     } else {
         $this->interface = $interface;
     }
     $this->requestedInterfaceVersion = $requestedInterfaceVersion;
     if (strtolower(substr($this->registered_ip, 0, 4)) == "self") {
         $pos = strpos($this->registered_ip, "::");
         if ($pos !== FALSE) {
             $account = substr($this->registered_ip, $pos + 2, strlen($this->registered_ip) - ($pos + 2));
             $this->registered_ip = $requester_ip . "::" . $account;
         } else {
             $this->registered_ip = $requester_ip;
         }
     }
     $this->uri = $this->wsf_base_url . "/wsf/ws/crud/delete/";
     $this->title = "Crud Delete Web Service";
     $this->crud_usage = new CrudUsage(FALSE, FALSE, FALSE, TRUE);
     $this->endpoint = $this->wsf_base_url . "/ws/crud/delete/";
     $this->errorMessenger = json_decode($this->errorMessenger);
 }
コード例 #5
0
 /** Constructor
       
     @param $fromDataset Dataset where the record is indexed
     @param $record Record that got changed
     @param $action Action that has been performed on the record
     @param $previousState Serialization of the state (usually RDF description) of the record prior the 
                               performance of the action on the record.
     @param $previousStateMime MIME type of the serialization of the previous state of a record. Usually, 
                                   application/rdf+xml or application/rdf+n3.
     @param $performer Performer of the action on the target record.
     @param $registered_ip Target IP address registered in the WSF
     @param $requester_ip IP address of the requester
     @param $interface Name of the source interface to use for this web service query. Default value: 'default'                               
     @param $requestedInterfaceVersion Version used for the requested source interface. The default is the latest 
                                       version of the interface.
 
     @return returns NULL
   
     @author Frederick Giasson, Structured Dynamics LLC.
 */
 function __construct($fromDataset, $record, $action, $previousState, $previousStateMime, $performer, $registered_ip, $requester_ip, $interface = 'default', $requestedInterfaceVersion = "")
 {
     parent::__construct();
     $this->version = "1.0";
     $this->db = new DBVirtuoso($this->db_username, $this->db_password, $this->db_dsn, $this->db_host);
     $this->requester_ip = $requester_ip;
     $this->fromDataset = $fromDataset;
     $this->record = $record;
     $this->action = $action;
     //    $this->previousState = urlencode(gzencode($previousState));
     $this->previousState = base64_encode(gzencode($previousState));
     $this->previousStateMime = $previousStateMime;
     $this->performer = $performer;
     if (strtolower($interface) == "default") {
         $this->interface = $this->default_interfaces["tracker_create"];
     } else {
         $this->interface = $interface;
     }
     $this->requestedInterfaceVersion = $requestedInterfaceVersion;
     if ($registered_ip == "") {
         $this->registered_ip = $requester_ip;
     } else {
         $this->registered_ip = $registered_ip;
     }
     if (strtolower(substr($this->registered_ip, 0, 4)) == "self") {
         $pos = strpos($this->registered_ip, "::");
         if ($pos !== FALSE) {
             $account = substr($this->registered_ip, $pos + 2, strlen($this->registered_ip) - ($pos + 2));
             $this->registered_ip = $requester_ip . "::" . $account;
         } else {
             $this->registered_ip = $requester_ip;
         }
     }
     $this->uri = $this->wsf_base_url . "/wsf/ws/tracker/create/";
     $this->title = "Tracker Create Web Service";
     $this->crud_usage = new CrudUsage(TRUE, FALSE, FALSE, FALSE);
     $this->endpoint = $this->wsf_base_url . "/ws/tracker/create/";
     $this->errorMessenger = json_decode($this->errorMessenger);
 }
コード例 #6
0
 /** Constructor
               
       @param $ontologyUri URI of the ontology where to delete something
       @param $function The function to use for this web service call. Refers you to the documentation to ge the 
                            list of functions and their usage.
       @param $parameters List of parameters for the target function. The parameters are split by a ";" character.
                              The parameter and its value are defined as "param-1=value-1". This tuple has to be
                              encoded. So, the parameters should be constructed that way in the URL:
                              &parameters=urlencode("param-1=value-1");urlencode("param-2=value-2")...
       @param $registered_ip Target IP address registered in the WSF
       @param $requester_ip IP address of the requester
       @param $interface Name of the source interface to use for this web service query. Default value: 'default'                            
       @param $requestedInterfaceVersion Version used for the requested source interface. The default is the latest 
                                         version of the interface.
       @param $lang Language of the records to be returned by the search endpoint. Only the textual information
                    of the requested language will be returned to the user. If no textual information is available
                    for a record, for a requested language, then only non-textual information will be returned
                    about the record. The default is "en"; however, if the parameter is an empty string, then
                    all the language strings for the record(s) will be returned.  
                          
       @return returns NULL
     
       @author Frederick Giasson, Structured Dynamics LLC.
   */
 function __construct($ontologyUri, $function, $parameters, $registered_ip, $requester_ip, $interface = 'default', $requestedInterfaceVersion = "", $lang = "en")
 {
     parent::__construct();
     $this->version = "1.0";
     $this->ontologyUri = $ontologyUri;
     $this->function = $function;
     $params = explode(";", $parameters);
     foreach ($params as $param) {
         $p = explode("=", $param);
         $this->parameters[$p[0]] = urldecode($p[1]);
     }
     $this->requester_ip = $requester_ip;
     if ($registered_ip == "") {
         $this->registered_ip = $requester_ip;
     } else {
         $this->registered_ip = $registered_ip;
     }
     $this->requestedInterfaceVersion = $requestedInterfaceVersion;
     if (strtolower($interface) == "default") {
         $this->interface = $this->default_interfaces["ontology_read"];
     } else {
         $this->interface = $interface;
     }
     if (strtolower(substr($this->registered_ip, 0, 4)) == "self") {
         $pos = strpos($this->registered_ip, "::");
         if ($pos !== FALSE) {
             $account = substr($this->registered_ip, $pos + 2, strlen($this->registered_ip) - ($pos + 2));
             $this->registered_ip = $requester_ip . "::" . $account;
         } else {
             $this->registered_ip = $requester_ip;
         }
     }
     $this->lang = $lang;
     $this->uri = $this->wsf_base_url . "/wsf/ws/ontology/read/";
     $this->title = "Ontology Read Web Service";
     $this->crud_usage = new CrudUsage(FALSE, TRUE, FALSE, FALSE);
     $this->endpoint = $this->wsf_base_url . "/ws/ontology/read/";
     $this->dtdURL = "ontology/read/ontologyRead.dtd";
     $this->errorMessenger = json_decode($this->errorMessenger);
 }
コード例 #7
0
 /** Constructor
 
       @param $crud   A quadruple with a value "True" or "False" defined as <Create;Read;Update;Delete>. 
                     Each value is separated by the ";" character. an example of such a quadruple is:
                     "crud=True;True;False;False", meaning: Create = True,
                     Read = True, Update = False and Delete = False
       @param $ws_uris A list of ";" separated Web services URI accessible by this access  definition
       @param $dataset URI of the target dataset of this access  description
       @param $action One of:  (1)"create (default)": Create a new access description
                               (2) "delete_target": Delete target access permissions records for a specific IP address and a specific dataset. This deletes all the access permissions of a user for a target dataset. 
                               (3) "delete_specific": Delete a specific access permissions records
                               (4) "delete_all": Delete all access descriptions for a target dataset
                               (5) "update": Update an existing access description 
       @param $target_access_uri Target URI of the access resource to update. Only used when param4 = update
       @param $registered_ip Target IP address registered in the WSF
       @param $requester_ip IP address of the requester
       @param $interface Name of the source interface to use for this web service query. Default value: 'default'                                  
       @param $requestedInterfaceVersion Version used for the requested source interface. The default is the latest 
                                         version of the interface.
       
       @return returns NULL
     
       @author Frederick Giasson, Structured Dynamics LLC.
   */
 function __construct($crud, $ws_uris, $dataset, $action, $target_access_uri, $registered_ip, $requester_ip, $interface = 'default', $requestedInterfaceVersion = "")
 {
     parent::__construct();
     $this->version = "1.0";
     $this->db = new DBVirtuoso($this->db_username, $this->db_password, $this->db_dsn, $this->db_host);
     $this->registered_ip = $registered_ip;
     $this->target_access_uri = $target_access_uri;
     $crud = explode(";", $crud);
     $this->crud = new CrudUsage(strtolower($crud[0]) == "true" ? TRUE : FALSE, strtolower($crud[1]) == "true" ? TRUE : FALSE, strtolower($crud[2]) == "true" ? TRUE : FALSE, strtolower($crud[3]) == "true" ? TRUE : FALSE);
     $this->ws_uris = explode(";", $ws_uris);
     $this->dataset = $dataset;
     $this->requester_ip = $requester_ip;
     $this->action = $action;
     if (strtolower(substr($this->registered_ip, 0, 4)) == "self") {
         $pos = strpos($this->registered_ip, "::");
         if ($pos !== FALSE) {
             $account = substr($this->registered_ip, $pos + 2, strlen($this->registered_ip) - ($pos + 2));
             $this->registered_ip = $requester_ip . "::" . $account;
         } else {
             $this->registered_ip = $requester_ip;
         }
     }
     if (strtolower($interface) == "default") {
         $this->interface = $this->default_interfaces["auth_registrar_access"];
     } else {
         $this->interface = $interface;
     }
     $this->requestedInterfaceVersion = $requestedInterfaceVersion;
     $this->uri = $this->wsf_base_url . "/wsf/ws/auth/registrar/access/";
     $this->title = "Authentication Access Registration Web Service";
     $this->crud_usage = new CrudUsage(TRUE, TRUE, FALSE, FALSE);
     $this->endpoint = $this->wsf_base_url . "/ws/auth/registrar/access/";
     $this->errorMessenger = json_decode($this->errorMessenger);
 }
コード例 #8
0
 /** Constructor
           
       @param $ontologyUri URI of the ontology where to delete something
       @param $registered_ip Target IP address registered in the WSF
       @param $requester_ip IP address of the requester
       @param $interface Name of the source interface to use for this web service query. Default value: 'default'                            
       @param $requestedInterfaceVersion Version used for the requested source interface. The default is the latest 
                                         version of the interface.
       
       @return returns NULL
     
       @author Frederick Giasson, Structured Dynamics LLC.
   */
 function __construct($ontologyUri, $registered_ip, $requester_ip, $interface = 'default', $requestedInterfaceVersion = "")
 {
     parent::__construct();
     $this->version = "1.0";
     $this->registered_ip = $registered_ip;
     $this->requester_ip = $requester_ip;
     $this->ontologyUri = $ontologyUri;
     if ($this->registered_ip == "") {
         $this->registered_ip = $requester_ip;
     }
     if (strtolower($interface) == "default") {
         $this->interface = $this->default_interfaces["ontology_update"];
     } else {
         $this->interface = $interface;
     }
     $this->requestedInterfaceVersion = $requestedInterfaceVersion;
     if (strtolower(substr($this->registered_ip, 0, 4)) == "self") {
         $pos = strpos($this->registered_ip, "::");
         if ($pos !== FALSE) {
             $account = substr($this->registered_ip, $pos + 2, strlen($this->registered_ip) - ($pos + 2));
             $this->registered_ip = $requester_ip . "::" . $account;
         } else {
             $this->registered_ip = $requester_ip;
         }
     }
     $this->uri = $this->wsf_base_url . "/wsf/ws/ontology/update/";
     $this->title = "Ontology Update Web Service";
     $this->crud_usage = new CrudUsage(TRUE, FALSE, TRUE, FALSE);
     $this->endpoint = $this->wsf_base_url . "/ws/ontology/update/";
     $this->errorMessenger = json_decode($this->errorMessenger);
 }
コード例 #9
0
 /** Constructor
 
       @param $document Text of a Bibtex document
       @param $docmime The mime type of the incoming document to convert      
       @param $delimiter Delimiter used to split fields of a record row
       @param $base_uri The base URI to use to create the URIs of the resources created by this web service
       @param $registered_ip Target IP address registered in the WSF
       @param $requester_ip IP address of the requester
     
       @return returns NULL
     
       @author Frederick Giasson, Structured Dynamics LLC.
   */
 function __construct($document = "", $docmime = "text/tsv", $delimiter = "\t", $base_uri = "http://www.baseuri.com/resource/", $registered_ip, $requester_ip)
 {
     parent::__construct();
     $this->text = $document;
     $this->baseURI = $base_uri;
     $this->docmime = $docmime;
     $this->delimiter = $delimiter;
     $this->requester_ip = $requester_ip;
     if ($registered_ip == "") {
         $this->registered_ip = $requester_ip;
     } else {
         $this->registered_ip = $registered_ip;
     }
     if (strtolower(substr($this->registered_ip, 0, 4)) == "self") {
         $pos = strpos($this->registered_ip, "::");
         if ($pos !== FALSE) {
             $account = substr($this->registered_ip, $pos + 2, strlen($this->registered_ip) - ($pos + 2));
             $this->registered_ip = $requester_ip . "::" . $account;
         } else {
             $this->registered_ip = $requester_ip;
         }
     }
     $this->tsvResources = array();
     $this->uri = $this->wsf_base_url . "/wsf/ws/converter/tsv/";
     $this->title = "TSV/CSV Converter Web Service";
     $this->crud_usage = new CrudUsage(FALSE, TRUE, FALSE, FALSE);
     $this->endpoint = $this->wsf_base_url . "/ws/converter/tsv/";
     $this->dtdURL = "converter/tsv/tsv.dtd";
     $this->errorMessenger = json_decode($this->errorMessenger);
 }
コード例 #10
0
 /** Constructor
 
       @param $requestedInterfaceVersion Version used for the requested source interface. The default is the latest 
                                         version of the interface.
   
       @return returns NULL
     
       @author Frederick Giasson, Structured Dynamics LLC.
   */
 function __construct($document, $mime, $dataset, $registered_ip, $requester_ip, $interface = 'default', $requestedInterfaceVersion = "")
 {
     parent::__construct();
     $this->db = new DBVirtuoso($this->db_username, $this->db_password, $this->db_dsn, $this->db_host);
     $this->requester_ip = $requester_ip;
     $this->dataset = $dataset;
     $this->mime = $mime;
     if (extension_loaded("mbstring") && mb_detect_encoding($document, "UTF-8", TRUE) != "UTF-8") {
         $this->document = utf8_encode($document);
     } else {
         $this->document = $document;
     }
     if ($registered_ip == "") {
         $this->registered_ip = $requester_ip;
     } else {
         $this->registered_ip = $registered_ip;
     }
     if (strtolower($interface) == "default") {
         $this->interface = $this->default_interfaces["crud_update"];
     } else {
         $this->interface = $interface;
     }
     $this->requestedInterfaceVersion = $requestedInterfaceVersion;
     if (strtolower(substr($this->registered_ip, 0, 4)) == "self") {
         $pos = strpos($this->registered_ip, "::");
         if ($pos !== FALSE) {
             $account = substr($this->registered_ip, $pos + 2, strlen($this->registered_ip) - ($pos + 2));
             $this->registered_ip = $requester_ip . "::" . $account;
         } else {
             $this->registered_ip = $requester_ip;
         }
     }
     $this->uri = $this->wsf_base_url . "/wsf/ws/crud/update/";
     $this->title = "Crud Update Web Service";
     $this->crud_usage = new CrudUsage(TRUE, FALSE, FALSE, FALSE);
     $this->endpoint = $this->wsf_base_url . "/ws/crud/update/";
     $this->errorMessenger = json_decode($this->errorMessenger);
 }
コード例 #11
0
 /** Constructor
 
       @param $document Text of a commON document
       @param $docmime Mime type of the document
       @param $registered_ip Target IP address registered in the WSF
       @param $requester_ip IP address of the requester
     
       @return returns NULL
     
       @author Frederick Giasson, Structured Dynamics LLC.
   */
 function __construct($document = "", $docmime = "application/iron+csv", $registered_ip, $requester_ip)
 {
     parent::__construct();
     $this->text = $document;
     $this->docmime = $docmime;
     $this->requester_ip = $requester_ip;
     if ($registered_ip == "") {
         $this->registered_ip = $requester_ip;
     } else {
         $this->registered_ip = $registered_ip;
     }
     if (strtolower(substr($this->registered_ip, 0, 4)) == "self") {
         $pos = strpos($this->registered_ip, "::");
         if ($pos !== FALSE) {
             $account = substr($this->registered_ip, $pos + 2, strlen($this->registered_ip) - ($pos + 2));
             $this->registered_ip = $requester_ip . "::" . $account;
         } else {
             $this->registered_ip = $requester_ip;
         }
     }
     $this->irJSONResources = array();
     $this->uri = $this->wsf_base_url . "/wsf/ws/converter/common/";
     $this->title = "CommON Converter Web Service";
     $this->crud_usage = new CrudUsage(FALSE, TRUE, FALSE, FALSE);
     $this->endpoint = $this->wsf_base_url . "/ws/converter/common/";
     $this->dtdURL = "converter/common/common.dtd";
     $this->errorMessenger = json_decode($this->errorMessenger);
 }
コード例 #12
0
ファイル: Scones.php プロジェクト: neuroidss/OSF-Web-Services
 /** Constructor
         
       @param $document Document content (in non-binary form). It can be a valid URL where the document is located on the web.    
       @param $docmime Document content's MIME type
       @param $application Name of the GATE application used to perform the tagging. This name is 
                               pre-defined by the administrator of the node.
       @param $registered_ip Target IP address registered in the WSF
       @param $requester_ip IP address of the requester
       @param $interface Name of the source interface to use for this web service query. Default value: 'default'                            
 
       @return returns NULL
     
       @author Frederick Giasson, Structured Dynamics LLC.
   */
 function __construct($document, $docmime, $application, $registered_ip, $requester_ip, $interface = 'default', $requestedInterfaceVersion = "")
 {
     parent::__construct();
     $this->version = "1.0";
     $this->document = $document;
     $this->docmime = $docmime;
     $this->application = $application;
     $this->requester_ip = $requester_ip;
     if ($registered_ip == "") {
         $this->registered_ip = $requester_ip;
     } else {
         $this->registered_ip = $registered_ip;
     }
     $this->requestedInterfaceVersion = $requestedInterfaceVersion;
     if (strtolower($interface) == "default") {
         $this->interface = $this->default_interfaces["scones"];
     } else {
         $this->interface = $interface;
     }
     if (strtolower(substr($this->registered_ip, 0, 4)) == "self") {
         $pos = strpos($this->registered_ip, "::");
         if ($pos !== FALSE) {
             $account = substr($this->registered_ip, $pos + 2, strlen($this->registered_ip) - ($pos + 2));
             $this->registered_ip = $requester_ip . "::" . $account;
         } else {
             $this->registered_ip = $requester_ip;
         }
     }
     $this->uri = $this->wsf_base_url . "/wsf/ws/scones/";
     $this->title = "Scones Web Service";
     $this->crud_usage = new CrudUsage(FALSE, TRUE, FALSE, FALSE);
     $this->endpoint = $this->wsf_base_url . "/ws/scones/";
     $this->errorMessenger = json_decode($this->errorMessenger);
 }
コード例 #13
0
 /** Constructor
 
       @param $registered_title Title of the web service to register
       @param $registered_endpoint URL of the endpoint where to send the HTTP queries
       @param $registered_crud_usage   A quadruple with a value "True" or "False" defined as 
                                 <Create;Read;Update;Delete>. Each value is separated by the ";" 
                                 character. an example of such a quadruple is: "crud_usage=True;True;False;False", 
                                 meaning: Create = True, Read = True, Update = False and Delete = False
       @param $registered_uri URI of the web service endpoint to register
       @param $registered_ip Target IP address registered in the WSF         
       @param $requester_ip IP address of the requester
       @param $interface Name of the source interface to use for this web service query. Default value: 'default'                            
       @param $requestedInterfaceVersion Version used for the requested source interface. The default is the latest 
                                         version of the interface.
       
       @return returns NULL
     
       @author Frederick Giasson, Structured Dynamics LLC.
   */
 function __construct($registered_title, $registered_endpoint, $registered_crud_usage, $registered_uri, $registered_ip, $requester_ip, $interface = 'default', $requestedInterfaceVersion = "")
 {
     parent::__construct();
     $this->version = "1.0";
     $this->db = new DBVirtuoso($this->db_username, $this->db_password, $this->db_dsn, $this->db_host);
     $this->registered_title = $registered_title;
     $this->registered_endpoint = $registered_endpoint;
     $this->registered_crud_usage = $registered_crud_usage;
     $this->registered_uri = $registered_uri;
     $this->requester_ip = $requester_ip;
     if ($registered_ip == "") {
         $this->registered_ip = $requester_ip;
     } else {
         $this->registered_ip = $registered_ip;
     }
     if (strtolower($interface) == "default") {
         $this->interface = $this->default_interfaces["auth_registrar_ws"];
     } else {
         $this->interface = $interface;
     }
     $this->requestedInterfaceVersion = $requestedInterfaceVersion;
     if (strtolower(substr($this->registered_ip, 0, 4)) == "self") {
         $pos = strpos($this->registered_ip, "::");
         if ($pos !== FALSE) {
             $account = substr($this->registered_ip, $pos + 2, strlen($this->registered_ip) - ($pos + 2));
             $this->registered_ip = $requester_ip . "::" . $account;
         } else {
             $this->registered_ip = $requester_ip;
         }
     }
     $this->uri = $this->wsf_base_url . "/wsf/ws/auth/registrar/ws/";
     $this->title = "Authentication Web Service Registration Web Service";
     $this->crud_usage = new CrudUsage(TRUE, TRUE, FALSE, FALSE);
     $this->endpoint = $this->wsf_base_url . "/ws/auth/registrar/ws/";
     $this->errorMessenger = json_decode($this->errorMessenger);
 }
コード例 #14
0
 /** Constructor
         
       @param $requester_ip IP address of the requester
       @param $requested_datasets Target dataset targeted by the query of the user
       @param $requested_ws_uri Target web service endpoint accessing the target dataset
       @param $interface Name of the source interface to use for this web service query. Default value: 'default'                            
       @param $requestedInterfaceVersion Version used for the requested source interface. The default is the latest 
                                         version of the interface.
 
       @return returns NULL
     
       @author Frederick Giasson, Structured Dynamics LLC.
   */
 function __construct($requester_ip, $requested_datasets, $requested_ws_uri, $interface = 'default', $requestedInterfaceVersion = "")
 {
     parent::__construct();
     $this->version = "1.0";
     $this->db = new DBVirtuoso($this->db_username, $this->db_password, $this->db_dsn, $this->db_host);
     $this->requester_ip = $requester_ip;
     $this->requested_datasets = $requested_datasets;
     $this->requested_ws_uri = $requested_ws_uri;
     if (strtolower($interface) == "default") {
         $this->interface = $this->default_interfaces["auth_validator"];
     } else {
         $this->interface = $interface;
     }
     $this->requestedInterfaceVersion = $requestedInterfaceVersion;
     $this->uri = $this->wsf_base_url . "/wsf/ws/auth/validator/";
     $this->title = "Authentication Validator Web Service";
     $this->crud_usage = new CrudUsage(FALSE, TRUE, FALSE, FALSE);
     $this->endpoint = $this->wsf_base_url . "/ws/auth/validator/";
     $this->errorMessenger = json_decode($this->errorMessenger);
 }
コード例 #15
0
ファイル: Search.php プロジェクト: neuroidss/OSF-Web-Services
 /** Constructor
       
       @param $query Global query filtering parameter  
       @param $types List of filtering types URIs separated by ";"
       @param $attributes List of filtering attributes (property) of (encoded) URIs separated 
                          by ";". Additionally, the URI can end with a (un-encoded) double-colon "::". 
                          What follows this double colons is a possible value restriction to be applied 
                          as a filter to this attribute to perform attribute/value filtered searches. 
                          The query syntax can be used for that filtering value. The value also has 
                          to be encoded. An example of this "attribute" parameter is: 
                          "http%3A%2F%2Fsome-attribute-uri::some%2Bfiltering%2Bvalue". There is a 
                          special markup used with the prefLabel attribute when the attribute/value 
                          filtering is used in this parameter. It is the double stars "**" that 
                          introduces an auto-completion behavior on the prefLabel core attribute. 
                          It should be used like: "attributes=prefLabel::te**"; this will tells the 
                          search endpoint that the requester is performing an auto-completion task. 
                          That way, the endpoint will ensure that the autocompletion task can be 
                          performed for more than one word, including spaces. If the target attribute 
                          is defined in the ontology with the xsd:dateTime datatype in its range, 
                          then date queries can be used in this filter. If a single date is specified, 
                          such as 2001-05-24, then all the records from that date until now will be 
                          returned by the query. If a range of date is specified such as [1999 to 2010], 
                          then all the records between these two dates will be returned. A range of 
                          dates has to be between double brackets. Also, the seperator of the two 
                          dates has to be " to " (space, the word "to" and another space). The format 
                          of a date description is about any English textual datetime description. If 
                          the target attribute is defined in the ontology with the xsd:int or the 
                          xsd:float datatype in its range, then numeric queries can be used in 
                          this filter. If a single number is specified, such as 235, then all the 
                          records with that attribute/value will be returned. If a range of numbers 
                          is specified such as [235 to 900], then all the records between these two 
                          numbers will be returned. A range of numbers has to be between double brackets. 
                          Also, the seperator of the two dates has to be " to " (space, the word "to" 
                          and another space). When a range is defined for an attribute/value filter, 
                          the star character (*) can be used to denote "any" (so, any number, any date, 
                          etc) like [235 to *].  
       @param $datasets List of filtering datasets URIs separated by ";"
       @param $items Number of items returned by resultset
       @param $page Starting item number of the returned resultset
       @param $inference Enabling inference on types
       @param $include_aggregates Including aggregates with returned resultsets
       @param $registered_ip Target IP address registered in the WSF
       @param $requester_ip IP address of the requester
       @param $distanceFilter The distance filter is a series of parameter that are used to
                                  filter records of the dataset according to the distance they
                                  are located from a given lat;long point. The values are
                                  seperated by a semi-column ";". The format is as follow:
                                  "lat;long;distance;distanceType". The distanceType can
                                  have two values "0" or "1": "0" means that the distance
                                  specified is in kilometers and "1" means that the distance
                                  specified is in miles. An example is:
                                  "-98.45;10.4324;5;0", which means getting all the results that
                                  are at maximum 5 kilometers from the lat/long position.
       @param $rangeFilter The range filter is a series of parameter that are used to
                               filter records of the dataset according to a rectangle bounds
                               they are located in given their lat;long position. The values are
                               seperated by a semi-colon ";". The format is as follow:
                               "top-left-lat;top-left-long;bottom-right-lat;bottom-right-long". 
       @param $aggregate_attributes Specify a set of attributes URI for which we want their aggregated
                                        values. The URIs should be url-encoded. Each attribute for which we
                                        want the aggregated values should be seperated by a semi-colon ";".
       @param $includeAttributesList A list of attribute URIs to include into the resultset. Sometime, you may 
                                         be dealing with datasets where the description of the entities are composed 
                                         of thousands of attributes/values. Since the Crud: Read web service endpoint 
                                         returns the complete entities descriptions in its resultsets, this parameter 
                                         enables you to restrict the attribute/values you want included in the 
                                         resultset which considerably reduce the size of the resultset to transmit 
                                         and manipulate. Multiple attribute URIs can be added to this parameter by 
                                         splitting them with ";".
       @param $attributesBooleanOperator Tells the endpoint what boolean operator to use ("or" or "and") when doing 
                                         attribute/value filtering. One of:
 
                                           + "or": Use the OR boolean operator between all attribute/value filters. 
                                                   This means that if the user filter with 3 attributes, then the 
                                                   returned records will be described using one of these three.
                                           + "and": Use the AND boolean operator between all attribute/value filters. 
                                                    this means that if the user filter with 3 attributes, then the 
                                                    returned records will be described using all the three. This 
                                                    parameter affects all the attribute/value filters. 
       @param $aggregate_attributes_object_type Determines what kind of object value you are want the search endpoint 
                                                to return as aggregate values for the list of attributes for which 
                                                you want their possible values. This list of attributes is determined 
                                                by the aggregate_attributes parameter.
 
                                                + "literal": The aggregated value returned by the endpoint is a literal. 
                                                             If the value is a URI (a reference to some record), then 
                                                             the literal value will be the preferred label of that 
                                                             referred record.
                                                + "uri": If the value of the attribute(s) is a URI (a reference to some 
                                                         record) then that URI will be returned as the aggregated value.  
       @param $aggregate_attributes_nb Determines the number of value to aggregate for each aggregated_attributes for 
                                       this query. If the value is -1, then it means that all possible values for the 
                                       target aggregated_attributes have to be returned.  
                                       
       @param $resultsLocationAggregator Specify a lat/long location where all the results should be aggregated around.
                                         For example, if we have a set of results compromised within a region.
                                         If we don't want the results spread everywhere in that region, we have to specify
                                         a location for this parameter such that all results get aggregated around
                                         that specific location within the region. The value should be: 
                                         "latitude,longitude". By example: "49.92545999127249,-97.14934608459475"
       @param $interface Name of the source interface to use for this web service query. Default value: 'default'                            
       @param $requestedInterfaceVersion Version used for the requested source interface. The default is the latest 
                                         version of the interface.
       @param $lang Language of the records to be returned by the search endpoint. Only the textual information
                    of the requested language will be returned to the user. If no textual information is available
                    for a record, for a requested language, then only non-textual information will be returned
                    about the record.
       @param $sort Sorting criterias for this query. Sort can be used for "type", "dataset", "uri", "preflabel", 
                    "score" or any other url-encoded attribute URIs that are defined with a maximum cardinality
                    of 1. Sorting fields needs to be followed by a space character and a direction "desc" or "asc". 
                    Multiple sorting criterias can be added by splitting them with ";". Here is an example of 
                    query using sort to sort by type: "type desc". Here is an example of sort that sort by 
                    type and dataset: "type desc; dataset asc". Here is an example of a sort that sort with 
                    a custom attribute: "http%3A%2F%2Fpurl.org%2Fontology%2Firon%23prefURL desc". By default
                    the sorting order is "asc".
       @param $extendedFilters Extended filters are used to define more complex search filtered searches. This
                               parameter uses a more complex syntax which enable the grouping of filter criterias
                               and the usage of the AND, OR and NOT boolean operators. The grouping is done with
                               the parenthesis. Each filter is composed of a url-encoded attribute URI to use 
                               as filters, followed by a colomn and the value to filter with. The full lucene
                               syntax can be used to define the value to filter. If all values are required, the
                               "*" (start) operator should be used as the value. If the value of an attribute
                               needs to be considered a URI, then the "[uri]" syntax should be added at the end
                               of the attribute filter like: 
                               "http%3A%2F%2Fpurl.org%2Fontology%2Ffoo%23friend[uri]:http%3A%2F%2Fbar.com%2Fmy-friend-uri  ".
                               That way, the value of that attribute filter will be handled as a URI. There are
                               a series of core attributes that can be used without specifying their full URI:
                               dataset, type, inferred_type, prefLabel, altLabel, lat, long, description, polygonCoordinates,
                               polylineCoordinates and located in. The extended filters are not a replacement to 
                               the attributes, types and datasets filtering parameters, they are an extension of it.
                               Subsequent filtering criterias can be defined in the extended filtering parameter.
                               The resolution logic by the Search endpoint is: 
                               attributes AND datasets AND types AND extended-filters.
                               An example of such an extended query is:
                               (http%3A%2F%2Fpurl.org%2Fontology%2Firon%23prefLabel:cancer AND NOT (breast OR ovarian)) 
                               AND (http%3A%2F%2Fpurl.org%2Fontology%2Fnhccn%23useGroupSignificant[uri]:
                               (http%3A%2F%2Fpurl.org%2Fontology%2Fdoha%23liver_cancer OR 
                               http%3A%2F%2Fpurl.org%2Fontology%2Fdoha%23cancers_by_histologic_type)) AND 
                               dataset:"file://localhost/data/ontologies/files/doha.owl"
                               Note: both the URI and the value (all kind of values: literals and URIs) need to be
                                     URL encoded before being sent to the Search endpoint.                              
       @param $typesBoost Modifying the score of the results returned by the Search endpoint by boosting the results 
                          that have that type, and boosting it by the modifier weight that boost the overall 
                          scoring algorithm. The types URI to boost are url-encoded and separated by semi-colomns. The
                          boosting factor is delemited with a "^" character at the end of the encoded type's URI
                          followed by the boosting factor. Boosting a type only impacts the scoring/relevancy of the
                          returned results. This doesn't affect what is returned by the endpoint in any ways, so this 
                          won't restrict results to be returned by the endpoint. Here is an example of two boosted types: 
                          urlencode(type-uri-1)^30;urlencode(type-uri-2)^300
       @param $attributesBoost Modifying the score of the results returned by the Search endpoint by boosting the results 
                               that have these attribute(s) or these attribute(s)/value(s), and boosting it by the 
                               modifier weight that boost the overall scoring algorithm. This parameter is used to boost
                               the relevancy of the returned records if they are described with a particular attribute 
                               URI, or if they are described with a particular attribute URI and a particual value for
                               that attribute. The attributes URI to boost are url-encoded and separated by semi-colomns. 
                               If a value is specified for this attribute, then it will be seperated with the attribute
                               URI by two colomns "::" followed by the url-encoded value. Then the boosting factor is 
                               delemited with a "^" character at the end of the encoded attribute's URI, or the encoded
                               value followed by the boosting factor. Boosting a attribute/value only impacts the 
                               scoring/relevancy of the returned results. This doesn't affect what is returned by the 
                               endpoint in any ways, so this won't restrict results to be returned by the endpoint.
                               Here is an example of a boosted attribute URI and another booster attribute URI with
                               a particular value: 
                               urlencode(attribute-uri-1)^30;urlencode(attribute-uri-2)::urlencode(some values)^300
       @param $datasetsBoost Modifying the score of the results returned by the Search endpoint by boosting the results 
                             that belongs to that dataset, and boosting it by the modifier weight that boost the overall 
                             scoring algorithm. The datasets URI to boost are url-encoded and separated by semi-colomns. The
                             boosting factor is delemited with a "^" character at the end of the encoded dataset's URI
                             followed by the boosting factor. Boosting a type only impacts the scoring/relevancy of the
                             returned results. This doesn't affect what is returned by the endpoint in any ways, so this 
                             won't restrict results to be returned by the endpoint.Here is an example of two boosted 
                             datasets: urlencode(dataset-uri-1)^30;urlencode(dataset-uri-2)^300
       @param $defaultOperator Specifies what should be the default boleean operator to use in the search query. The two
                               possible operators are: "and" and "or". If the "or" operator is used, you can optionally
                               define the minimal number of words that should be present in the returned records. You 
                               can define this value by seperating the "or" option with a double colon. For example,
                               if the value of this parameter is "or::3", it means that for all queries, the OR operator
                               will be used. However, even if the OR parameter is used, at least 3 terms of the ORed query
                               should match the returned records. More complex behaviors can be defined, the full syntax
                               is explained in this document: 
                               http://lucene.apache.org/solr/4_1_0/solr-core/org/apache/solr/util/doc-files/min-should-match.html
       @param $attributesPhraseBoost Consider the list of attribute(s) as phrases searches. The distance of the phrase searches
                                     is specified by the $phraseBoostDistance parameter. The scoring of the documents is 
                                     modified by the boosting factor specified for one of the field, depending if the query
                                     match field with the proper specified distance. The attributes URI to boost are url-encoded 
                                     and separated by semi-colomns. 
                                     The boosting factor is delemited with a "^" character at the end of the encoded 
                                     attribute's URI, or the encoded value followed by the boosting factor. Boosting a 
                                     phrase attribute only impacts the scoring/relevancy of the returned results. This doesn't 
                                     affect what is returned by the endpoint in any ways, so this won't restrict results to 
                                     be returned by the endpoint. Here is an example of a boosted attribute URI and another 
                                     booster attribute URI with a particular value: urlencode(attribute-uri-1)^30
       @param $phraseBoostDistance Define the maximum distance between the keywords of the search query that is used
                                   by the $attributesPhraseBoost parameter.
       @param $spellcheck Includes the spellchecking suggestions to the resultset in the case that the resultset is empty.
                          The search endpoint will create a resultset with a single result. This result will be of 
                          type "wsf:SpellSuggestion". The suggested query words will be returned with the property 
                          "wsf:suggestion" and the "wsf:frequency" and the collated search would be returned with the 
                          property "wsf:collation". Suggested terms can be ordered based on their frequency.
       
 
       @return returns NULL
     
       @author Frederick Giasson, Structured Dynamics LLC.
   */
 function __construct($query, $types, $attributes, $datasets, $items, $page, $inference, $include_aggregates, $registered_ip, $requester_ip, $distanceFilter = '', $rangeFilter = '', $aggregate_attributes = '', $attributesBooleanOperator = 'and', $includeAttributesList = '', $aggregate_attributes_object_type = 'literal', $aggregate_attributes_nb = 10, $resultsLocationAggregator = '', $interface = 'default', $requestedInterfaceVersion = '', $lang = 'en', $sort = '', $extendedFilters = '', $typesBoost = '', $attributesBoost = '', $datasetsBoost = '', $searchRestrictions = array(), $includeScores = 'false', $defaultOperator = 'and', $attributesPhraseBoost = '', $phraseBoostDistance = '3', $spellcheck = FALSE)
 {
     parent::__construct();
     $this->version = "1.0";
     $this->query = $query;
     $this->attributes = $attributes;
     $this->items = $items;
     $this->page = $page;
     $this->inference = $inference;
     $this->includeAggregates = $include_aggregates;
     $this->attributesBooleanOperator = strtoupper($attributesBooleanOperator);
     $this->aggregateAttributesObjectType = $aggregate_attributes_object_type;
     $this->aggregateAttributesNb = $aggregate_attributes_nb;
     $this->resultsLocationAggregator = explode(",", $resultsLocationAggregator);
     $this->lang = $lang;
     $this->defaultOperator = strtolower($defaultOperator);
     $this->attributesPhraseBoost = $attributesPhraseBoost;
     $this->phraseBoostDistance = $phraseBoostDistance;
     $this->searchRestrictions = $searchRestrictions;
     $this->includeScores = filter_var($includeScores, FILTER_VALIDATE_BOOLEAN, array('flags' => FILTER_NULL_ON_FAILURE));
     if ($this->includeScores === NULL) {
         $this->includeScores = FALSE;
     }
     $this->spellcheck = filter_var($spellcheck, FILTER_VALIDATE_BOOLEAN, array('flags' => FILTER_NULL_ON_FAILURE));
     if ($this->spellcheck === NULL) {
         $this->spellcheck = FALSE;
     }
     $this->extendedFilters = $extendedFilters;
     $this->typesBoost = $typesBoost;
     $this->attributesBoost = $attributesBoost;
     $this->datasetsBoost = $datasetsBoost;
     if (strtolower($interface) == "default") {
         $this->interface = $this->default_interfaces["search"];
     } else {
         $this->interface = $interface;
     }
     $this->requestedInterfaceVersion = $requestedInterfaceVersion;
     if ($includeAttributesList != "") {
         $this->includeAttributesList = explode(";", $includeAttributesList);
     }
     if ($aggregate_attributes != "") {
         $aas = explode(";", $aggregate_attributes);
         for ($i = 0; $i < count($aas); $i++) {
             if ($this->aggregateAttributesObjectType == "uri") {
                 $aas[$i] = $aas[$i] . "_attr_obj_uri";
             } elseif ($this->aggregateAttributesObjectType == "literal") {
                 $aas[$i] = $aas[$i] . "_attr_facets";
             } elseif ($this->aggregateAttributesObjectType == "uriliteral") {
                 $aas[$i] = $aas[$i] . "_attr_uri_label_facets";
             }
         }
         $this->aggregateAttributes = $aas;
     }
     $this->types = $types;
     $this->datasets = $datasets;
     $this->distanceFilter = $distanceFilter;
     $this->rangeFilter = $rangeFilter;
     $this->requester_ip = $requester_ip;
     if ($registered_ip == "") {
         $this->registered_ip = $requester_ip;
     } else {
         $this->registered_ip = $registered_ip;
     }
     if (strtolower(substr($this->registered_ip, 0, 4)) == "self") {
         $pos = strpos($this->registered_ip, "::");
         if ($pos !== FALSE) {
             $account = substr($this->registered_ip, $pos + 2, strlen($this->registered_ip) - ($pos + 2));
             $this->registered_ip = $requester_ip . "::" . $account;
         } else {
             $this->registered_ip = $requester_ip;
         }
     }
     $this->sort = $sort;
     if ($this->sort != "") {
         $sortingCriterias = array();
         $sorts = explode(";", $this->sort);
         foreach ($sorts as $s) {
             $s = trim($s);
             $parts = explode(" ", $s);
             $parts[0] = urldecode($parts[0]);
             if (!isset($parts[1])) {
                 $parts[1] = "asc";
             } else {
                 $parts[1] = strtolower($parts[1]);
                 if ($parts[1] != "asc" && $parts[1] != "desc") {
                     $parts[1] = "asc";
                 }
             }
             $sortingCriterias[$parts[0]] = $parts[1];
         }
         $this->sort = $sortingCriterias;
     } else {
         $this->sort = array();
     }
     $this->uri = $this->wsf_base_url . "/wsf/ws/search/";
     $this->title = "Search Web Service";
     $this->crud_usage = new CrudUsage(FALSE, TRUE, FALSE, FALSE);
     $this->endpoint = $this->wsf_base_url . "/ws/search/";
     $this->dtdURL = "search/search.dtd";
     $this->errorMessenger = json_decode($this->errorMessenger);
 }
コード例 #16
0
 /** Constructor
 
     @param $mode One of:  (1) "dataset (default)": List all datasets URI accessible by a user, 
                           (2) "ws": List all Web services registered in a WSF
                           (3) "access_dataset": List all the registered IP addresses and their CRUD permissions for a given dataset URI
                           (4) "access_user": List all datasets URI and CRUD permissions accessible by a user 
     @param $dataset URI referring to a target dataset. Needed when param1 = "dataset" or param1 = "access_datase". Otherwise this parameter as to be ommited.
     @param $registered_ip Target IP address registered in the WSF
     @param $requester_ip IP address of the requester
     @param $target_webservice Determine on what web service URI(s) we should focus on for the listing of the access records.
                               This parameter is used to improve the performance of the web service endpoint depending on the 
                               use case. If there are numerous datasets with a numerous number of access permissions defined 
                               for each of them, properly using this parameter can have a dramatic impact on the performances. 
                               This parameter should be used if the param1 = "access_dataset" or param1 = "access_user" This 
                               parameter can have any of these values:
                              
                                 + "all" (default): all the web service endpoints URIs for each access records will 
                                                    be taken into account and returned to the user (may be more time 
                                                    consuming).
                                 + "none": no web service URI, for any access record, will be returned. 
     @param $interface Name of the source interface to use for this web service query. Default value: 'default'                            
     @param $requestedInterfaceVersion Version used for the requested source interface. The default is the latest 
                                       version of the interface.
 
     
     @return returns NULL
   
     @author Frederick Giasson, Structured Dynamics LLC.
 */
 function __construct($mode, $dataset, $registered_ip, $requester_ip, $target_webservice = "all", $interface = 'default', $requestedInterfaceVersion = "")
 {
     parent::__construct();
     $this->version = "1.0";
     $this->db = new DBVirtuoso($this->db_username, $this->db_password, $this->db_dsn, $this->db_host);
     $this->requester_ip = $requester_ip;
     $this->mode = $mode;
     $this->dataset = $dataset;
     $this->targetWebservice = strtolower($target_webservice);
     if (strtolower($interface) == "default") {
         $this->interface = $this->default_interfaces["auth_lister"];
     } else {
         $this->interface = $interface;
     }
     $this->requestedInterfaceVersion = $requestedInterfaceVersion;
     if ($registered_ip == "") {
         $this->registered_ip = $requester_ip;
     } else {
         $this->registered_ip = $registered_ip;
     }
     if (strtolower(substr($this->registered_ip, 0, 4)) == "self") {
         $pos = strpos($this->registered_ip, "::");
         if ($pos !== FALSE) {
             $account = substr($this->registered_ip, $pos + 2, strlen($this->registered_ip) - ($pos + 2));
             $this->registered_ip = $requester_ip . "::" . $account;
         } else {
             $this->registered_ip = $requester_ip;
         }
     }
     $this->uri = $this->wsf_base_url . "/wsf/ws/auth/lister/";
     $this->title = "Authentication Lister Web Service";
     $this->crud_usage = new CrudUsage(FALSE, TRUE, FALSE, FALSE);
     $this->endpoint = $this->wsf_base_url . "/ws/auth/lister/";
     $this->dtdURL = "auth/lister/authLister.dtd";
     $this->errorMessenger = json_decode($this->errorMessenger);
 }
コード例 #17
0
 /** Constructor
               
       @param $uri URI of the instance record
       @param $dataset URI of the dataset where the instance record is indexed
       @param $include_linksback One of (1) True ? Means that the reference to the other instance records referring 
                              to the target instance record will be added in the resultset (2) False (default) ? No 
                              links-back will be added 
 
       @param $include_reification Include possible reification statements for a record
       @param $registered_ip Target IP address registered in the WSF
       @param $requester_ip IP address of the requester
       @param $include_attributes_list A list of attribute URIs to include into the resultset. Sometime, you may 
                                           be dealing with datasets where the description of the entities are composed 
                                           of thousands of attributes/values. Since the Crud: Read web service endpoint 
                                           returns the complete entities descriptions in its resultsets, this parameter 
                                           enables you to restrict the attribute/values you want included in the 
                                           resultset which considerably reduce the size of the resultset to transmit 
                                           and manipulate. Multiple attribute URIs can be added to this parameter by 
                                           splitting them with ";".
       @param $interface Name of the source interface to use for this web service query. Default value: 'default'                            
       @param $requestedInterfaceVersion Version used for the requested source interface. The default is the latest 
                                         version of the interface.
       @param $lang Language of the records to be returned by the search endpoint. Only the textual information
                    of the requested language will be returned to the user. If no textual information is available
                    for a record, for a requested language, then only non-textual information will be returned
                    about the record. The default is "en"; however, if the parameter is an empty string, then
                    all the language strings for the record(s) will be returned.                
 
       @return returns NULL
     
       @author Frederick Giasson, Structured Dynamics LLC.
   */
 function __construct($uri, $dataset, $include_linksback, $include_reification, $registered_ip, $requester_ip, $include_attributes_list = "", $interface = 'default', $requestedInterfaceVersion = "", $lang = "en")
 {
     parent::__construct();
     $this->version = "1.0";
     $this->db = new DBVirtuoso($this->db_username, $this->db_password, $this->db_dsn, $this->db_host);
     $this->dataset = $dataset;
     $this->include_attributes_list = explode(";", $include_attributes_list);
     // If no dataset URI is defined for this query, we simply query all datasets accessible by the requester.
     if ($this->dataset == "") {
         $this->globalDataset = TRUE;
     }
     $this->resourceUri = $uri;
     $this->lang = $lang;
     $this->include_linksback = $include_linksback;
     $this->include_reification = $include_reification;
     $this->requester_ip = $requester_ip;
     if (strtolower($interface) == "default") {
         $this->interface = $this->default_interfaces["crud_read"];
     } else {
         $this->interface = $interface;
     }
     $this->requestedInterfaceVersion = $requestedInterfaceVersion;
     if ($registered_ip == "") {
         $this->registered_ip = $requester_ip;
     } else {
         $this->registered_ip = $registered_ip;
     }
     if (strtolower(substr($this->registered_ip, 0, 4)) == "self") {
         $pos = strpos($this->registered_ip, "::");
         if ($pos !== FALSE) {
             $account = substr($this->registered_ip, $pos + 2, strlen($this->registered_ip) - ($pos + 2));
             $this->registered_ip = $requester_ip . "::" . $account;
         } else {
             $this->registered_ip = $requester_ip;
         }
     }
     $this->uri = $this->wsf_base_url . "/wsf/ws/crud/read/";
     $this->title = "Crud Read Web Service";
     $this->crud_usage = new CrudUsage(FALSE, TRUE, FALSE, FALSE);
     $this->endpoint = $this->wsf_base_url . "/ws/crud/read/";
     $this->dtdURL = "crud/read/crudRead.dtd";
     $this->errorMessenger = json_decode($this->errorMessenger);
 }