The EIExchangeInstace encapsultes an Eagle-I Exchange Instance object.

This is the main object passed between the API when querying and updating ontology class instances in the Eagle-I ontology.

 Methods

__construct()

__construct($json_data) 

Parameters

$json_data

Sets all URIs in the object to null.

clearURIs() 

This is only used for testing, when returning a EIExchangeInstance back to the Eagle-I node after just retrieving it in order to create a new instance.

Exceptions

\Exception if the instanceEntity property is null (if the object was instantiated as a null object).

Get the foreignKey property.

getForeignKey() : null | string

Returns

nullstring

Get the instanceEntity property.

getInstanceEntity() : \EIEntity

Returns

Get the linkedResources property.

getLinkedResources() : \array<EIExchangeInstance>

Returns

\array<EIExchangeInstance>

Get the rootType property.

getRootType() : \EIURI | null

Returns

\EIURInull

Get the source property.

getSource() : null | string

Returns

nullstring

Get the specificTypeUri property.

getSpecificTypeUri() : \EIURI | null

Returns

\EIURInull

Get the textProperties property.

getTextProperties() : \array(<string:uri>

Returns

\array(<string:uri>=> )

Returns true if the object is null, otherwise returns false.

is_null() : bool

Returns

bool

Returns a serialized JSON representation of the object.

json_encode(bool $pretty) : string

Parameters

$pretty

bool

True if output with indentation is desired.

Returns

string

Pop the top linkedResource from the linkedResources property.

popLinkedResource() : \EIExchangeEntity

Note: This will remove the resource from the object

Returns

\EIExchangeEntity

Pop the top textProperty from the textProperties property.

popTextProperties() : \array(<string:uri>

Note: This will remove the property from the object

Returns

\array(<string:uri>=> )

Push a resources to the linkedResources property.

pushLinkedResource(array $resource) 

Parameters

$resource

\array(<string:uri>

=> ) $resource

Push a textProperty to the textProperties property.

pushTextProperties(array $resource) 

Parameters

$resource

\array(<string:uri>

=> ) $resource

Set the foreignKey property.

setForeignKey($key) 

Parameters

$key

Set the instanceEntity property.

setInstanceEntity(\EIEntity $entity) 

Parameters

$entity

\EIEntity

Set the linkedResources property.

setLinkedResources(array $resources) 

Parameters

$resources

array

Set the rootType property.

setRootType(\EIURI $eiuri) 

Parameters

$eiuri

\EIURI

Set the source property.

setSource($source) 

Parameters

$source

Set the specificTypeUri property.

setSpecificTypeUri(\EIURI $eiuri) 

Parameters

$eiuri

\EIURI

Set the textProperties property.

setTextProperties(array $properties) 

Parameters

$properties

\array(<string:uri>

=> ) $properties

Used by json_encode to properly escape the JSON string.

json_escape($string) : string
Inherited
access protected
inherited_from \EIContainer::json_escape()

Parameters

$string

Returns

string

Used by json_encode($pretty = TRUE) to properly indent the JSON output.

json_indent($cols) : string
Inherited

Returns a serialized JSON representation of the object.

access protected
inherited_from \EIContainer::json_indent()

Parameters

$cols

Returns

string

Populates the object properties from a passed JSON string.

set($data) 
access private

Parameters

$data

The JSON string.

Exceptions

\Exception If the JSON string is incomplete or malformed.

 Properties

 

$foreignKey : string
access private
 

$instanceEntity : \EIEntity
access private
 

=> EIEntity)

$linkedResources : \array(<string>
access private
 

$rootType : \EIURI
access private
 

$source : null
access private
 

$specificTypeUri : \EIURI
access private
 

=> <string>)

$textProperties : \array(<string>
access private