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)
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
Get the instanceEntity property.
getInstanceEntity() : \EIEntity
Get the linkedResources property.
getLinkedResources() : \array<EIExchangeInstance>
Returns
\array<EIExchangeInstance>
Get the rootType property.
getRootType() : \EIURI | null
Get the source property.
getSource() : null | string
Get the specificTypeUri property.
getSpecificTypeUri() : \EIURI | null
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 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)
Set the instanceEntity property.
setInstanceEntity(\EIEntity $entity)
Set the linkedResources property.
setLinkedResources(array $resources)
Parameters
$resources
array
Set the rootType property.
setRootType(\EIURI $eiuri)
Set the source property.
setSource($source)
Set the specificTypeUri property.
setSpecificTypeUri(\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)
Parameters
Exceptions
\Exception |
If the JSON string is incomplete or malformed. |
Properties
=> EIEntity)
$linkedResources : \array(<string>
=> <string>)
$textProperties : \array(<string>