This object connects to the Eagle-I REST api on the specified Eagle-I node and executes ontology queries again the api.

The EIEataConnector implements the Singleton design pattern.

 Methods

Gets the single instance of the EIDataConnector object.

getInstance() : \EIDataConnector | null
Static

Returns

getOntologyClass()

getOntologyClass($URI) 

Parameters

$URI

Retrieves the current ontology model object from the Eagle-I node api.

getOntologyModel() : \EIClass | \EIExchangeInstance | \EIInstanceUpdateRequest | \EIModelVersion | null

Retrieves the EIContainer resource entity from the api for the passed uri

getResource($URI) : \EIClass | \EIExchangeInstance | \EIInstanceUpdateRequest | \EIModelVersion | null

Updates (or Inserts) the passed EIExchangeInstance with the Eagle-I node api

updateResource($EIEI) : \EIClass | \EIExchangeInstance | \EIInstanceUpdateRequest | \EIModelVersion | null

__construct()

__construct() 

Helper function for the public methods - executes a REST request using drupal_http_request.

executeRequest(string $verb, null $request_body, $url, null $request_type) : \the
access private

Parameters

$verb

string

$request_body

null

$url

$request_type

null

Returns

\thedrupal_http_request return object

Helper method for the public methods - transforms an api response into the appropriate EIContainer object.

returnResponseObject($response_body, $request_type) : \EIClass | \EIExchangeInstance | \EIInstanceUpdateRequest | \EIModelVersion | null
access private

Parameters

$response_body

$request_type

Exceptions

\Exception

Returns

 Properties

 

$instance : null
 

$api_rest_url 
 

$api_server_protocol 
 

$api_server_url 
 

$ontology_class_url 
 

$ontology_server_url