new CurrentGraph()
Methods
-
<static> exists(tag)
-
Determines if the instance exists in the local DB.
Parameters:
Name Type Description tagolympe.dc.InstanceTag Instance
- Deprecated:
-
- use
olympe.dc.DBView#existinstead
- use
Returns:
- Type
- boolean
-
<static> findAllRelated(startTag, relations, predicate)
-
Find all the instances matching the provided predicate when following all the given relations.
Parameters:
Name Type Description startTagolympe.dc.InstanceTag Tag of the starting instance
relationsArray.<olympe.dc.registry.Relation> The relations to follow
predicatefunction Anonymous predicate function
- Deprecated:
-
- use
olympe.dc.DBView#findAllRelatedinstead
- use
Returns:
- Type
- Array.<string>
-
<static> findRecursive(startTag, relationTag, relationDirection, predicate)
-
Find the first instance matching the provided predicate when following the given relation recursively. Return null if not found.
Parameters:
Name Type Description startTagolympe.dc.InstanceTag Tag of the starting instance
relationTagstring Tag of the followed relation
relationDirectionolympe.dc.RelationDirection Direction in which to follow the recursive relation.
predicatefunction Anonymous predicate function
- Deprecated:
-
- use
olympe.dc.DBView#findRecursiveinstead
- use
Returns:
- Type
- string
-
<static> findRelated(startTag, relations, predicate)
-
Find the first instance matching the provided predicate when following all the given relations.
Parameters:
Name Type Description startTagolympe.dc.InstanceTag Tag of the starting instance
relationsArray.<olympe.dc.registry.Relation> The relations to follow
predicatefunction Anonymous predicate function
- Deprecated:
-
- use
olympe.dc.DBView#findRelatedinstead
- use
Returns:
- Type
- string
-
<static> getExtendedModel(instance)
-
Returns the tag of the parent model of the instance given as parameter, if the instance exists and it it has a model. Returns null instead.
Parameters:
Name Type Description instanceolympe.dc.InstanceTag The instance, represented by any of the option offered by InstanceTag
- Deprecated:
-
- use
olympe.dc.DBView#extensioninstead
- use
Returns:
- Type
- string
-
<static> getExtendedModels(modelTag [, endTag])
-
Get all the models extended by this model (including self). Optionally define an end tag to get a subset of extended models. Will throw an error if the expected end model is not found.
Parameters:
Name Type Argument Default Description modelTagolympe.dc.InstanceTag Tag of the starting model instance
endTagolympe.dc.InstanceTag <optional>
olympe.dc.Sync.entry Optional end instance tag after which to stop following the extend relations.
- Deprecated:
-
- use
olympe.dc.DBView#getExtendedModelsinstead
- use
Returns:
- Type
- Array.<string>
-
<static> getInstanceName(tag)
-
Get the current name of an instance, or null if the instance is unnamed.
Parameters:
Name Type Description tagolympe.dc.InstanceTag Instance
- Deprecated:
-
- use
olympe.dc.DBView#nameinstead
- use
Returns:
- Type
- string
-
<static> getInstances(modelTag)
-
Get the current instances of a model.
Parameters:
Name Type Description modelTagolympe.dc.InstanceTag Tag of the model instance
- Deprecated:
-
- use
olympe.dc.DBView#getInstancesinstead
- use
Returns:
- Type
- Array.<string>
-
<static> getModel(tag)
-
Return the model of an instance, or null if the instance is not known.
Parameters:
Name Type Description tagolympe.dc.InstanceTag Instance
- Deprecated:
-
- use
olympe.dc.DBView#modelinstead
- use
Returns:
- Type
- string
-
<static> getMultiRelated(startTag, relations)
-
Gets the currently related instances following all the specified relations.
Parameters:
Name Type Description startTagolympe.dc.InstanceTag the instance to start with
relationsArray.<olympe.dc.registry.Relation> Relations to follow
- Deprecated:
-
- use
olympe.dc.DBView#getMultiRelatedinstead
- use
Returns:
The resulting array
- Type
- Array.<string>
-
<static> getProperty(tag, property)
-
Get the value of an instance's property, or null if the property is not set.
Parameters:
Name Type Description tagolympe.dc.InstanceTag Instance
propertyolympe.dc.registry.Property Property to retrieve
- Deprecated:
-
- use
olympe.dc.DBView#getPropertyinstead
- use
Returns:
the current value or null
- Type
- *
-
<static> getRecursiveRelated(startTag, relationTag, relationDirection [, endTag])
-
Get all the instance following the given relation recursively.
Parameters:
Name Type Argument Description startTagolympe.dc.InstanceTag Tag of the starting instance
relationTagstring Tag of the followed relation
relationDirectionolympe.dc.RelationDirection Direction in which to follow the recursive relation.
endTagolympe.dc.InstanceTag <optional>
Optional end instance tag after which to stop following the relation. If provided, only a single instance should be present at each successive depth.
- Deprecated:
-
- use
olympe.dc.DBView#getRecursiveRelatedinstead
- use
Returns:
- Type
- Array.<string>
-
<static> getRelated(tag, relation)
-
Gets the currently related instances.
Parameters:
Name Type Description tagolympe.dc.InstanceTag Instance
relationolympe.dc.registry.Relation Relation to follow
- Deprecated:
-
- use
olympe.dc.DBView#getRelatedinstead
- use
Returns:
The resulting array of tags.
- Type
- Array.<string>
-
<static> getUniqueRelated(tag, relation)
-
Gets the currently unique related instance.
Parameters:
Name Type Description tagolympe.dc.InstanceTag Instance
relationolympe.dc.registry.Relation Relation to follow
- Deprecated:
-
- use
olympe.dc.DBView#getUniqueRelatedinstead
- use
Returns:
The tag or
nullif there is no match.- Type
- string
-
<static> isAssignableTo(value, property)
-
Checks whether a particular value is assignable to a specific property.
Parameters:
Name Type Description value* The value to test.
propertyolympe.dc.InstanceTag The tag of the property.
Returns:
trueif its assignable.- Type
- boolean
-
<static> isExtending(modelTag, extendedTag)
-
Assess whether the model
modelTagis extending the modelextendedTagParameters:
Name Type Description modelTagolympe.dc.InstanceTag Tag of the starting model instance
extendedTagolympe.dc.InstanceTag Tag of the extended model instance
- Deprecated:
-
- use
olympe.dc.DBView#isExtendinginstead
- use
Returns:
- Type
- boolean
-
<static> isInstanceof(instanceTag, modelTag)
-
Assess whether the instance
instanceTagis instanceof the modelmodelTag. Note: if A is instance of B, and B extends C, A is an instance of both B and C.Parameters:
Name Type Description instanceTagolympe.dc.InstanceTag Tag of the starting model instance
modelTagolympe.dc.InstanceTag Tag of the extended model instance
- Deprecated:
-
- use
olympe.dc.DBView#instanceOfinstead
- use
Returns:
- Type
- boolean
-
<static> isModel(tag)
-
Determines if the instance is a model.
Parameters:
Name Type Description tagolympe.dc.InstanceTag Instance
- Deprecated:
-
- use
olympe.dc.DBView#isModelinstead
- use
Returns:
- Type
- boolean
Olympe SDK