Class: ModelInfo

olympe.dc. ModelInfo

A ModelInfo contains all the information specific to instances that are models. Also provides many helper functions to access various model information like the property definitions.


new ModelInfo(instance)

Creates an instance of ModelInfo for a given model.

Parameters:
Name Type Description
instance olympe.dc.CloudObject

The model.

Implements:

Methods


<static> from(instance)

Returns the ModelInfo from a specific model.

Parameters:
Name Type Description
instance olympe.dc.CloudObject | olympe.df.Proxy.<olympe.dc.CloudObject>

The model.

Returns:

The model information.

Type
olympe.dc.ModelInfo | olympe.df.Proxy.<olympe.dc.ModelInfo>

<static> getExtendedModelFrom(instance)

Get the first parent model of the given model.

Parameters:
Name Type Description
instance olympe.dc.CloudObject | olympe.df.Proxy.<olympe.dc.CloudObject>

The model.

Returns:

The parent model.

Type
olympe.dc.CloudObject | olympe.df.Proxy

<static> getExtendedModelsFrom(instance)

Get all the parent models of the given model.

Parameters:
Name Type Description
instance olympe.dc.CloudObject | olympe.df.Proxy.<olympe.dc.CloudObject>

The model.

Returns:

A list containing all the parent models.

Type
olympe.dc.ListDef | olympe.df.Proxy

<static> getOwnPropertiesFrom(instance)

Get all the own properties definitions of the given model (excluding the properties from inherited models).

Parameters:
Name Type Description
instance olympe.dc.CloudObject | olympe.df.Proxy.<olympe.dc.CloudObject>

The model.

Returns:

A list containing only the properties of this model.

Type
olympe.dc.ListDef.<olympe.dm.Property> | olympe.df.Proxy

<static> getOwnRelationsFrom(instance)

Get all the own relations definitions of the given model (excluding the relations from inherited models).

Parameters:
Name Type Description
instance olympe.dc.CloudObject | olympe.df.Proxy.<olympe.dc.CloudObject>

The model.

Returns:

A list containing only the relations of this model.

Type
olympe.dc.ListDef.<olympe.dm.Relation> | olympe.df.Proxy

<static> getPropertiesFrom(instance)

Get all the properties definitions of the given model.

Parameters:
Name Type Description
instance olympe.dc.CloudObject | olympe.df.Proxy.<olympe.dc.CloudObject>

The model.

Returns:

A list containing the properties of this model.

Type
olympe.dc.ListDef.<olympe.dm.Property> | olympe.df.Proxy

<static> getRelationsFrom(instance)

Get all the relations definitions of the given model.

Parameters:
Name Type Description
instance olympe.dc.CloudObject | olympe.df.Proxy.<olympe.dc.CloudObject>

The model.

Returns:

A list containing all the relations.

Type
olympe.dc.ListDef.<olympe.dm.Relation> | olympe.df.Proxy

<static> getSelfAndExtendedModelsFrom(instance)

Get all the extended models + the provided model.

Parameters:
Name Type Description
instance olympe.dc.CloudObject | olympe.df.Proxy.<olympe.dc.CloudObject>

The model.

Returns:

A list containing this model and all the parent models.

Type
olympe.dc.ListDef.<olympe.dc.CloudObject>

getExtendedModel()

Get the first extended model.

Returns:

The immediate parent model.

Type
olympe.dc.CloudObject | olympe.df.Proxy

getExtendedModels()

Get all the extended models.

Returns:

A list containing all the parent models.

Type
olympe.dc.ListDef.<olympe.dc.CloudObject>

getOwnProperties()

Get all the own properties definitions of a model (excluding the properties from inherited models).

Returns:

The list of properties.

Type
olympe.dc.ListDef.<olympe.dm.Property>

getOwnRelations()

Get all the own relations definitions of a model (excluding the relations from inherited models).

Returns:

The list of relations.

Type
olympe.dc.ListDef.<olympe.dm.Relation>

getProperties()

Get all the properties definitions of a model.

Returns:

The list of properties.

Type
olympe.dc.ListDef.<olympe.dm.Property>

getRelations()

Get all the relations definitions of a model.

Returns:

The list of relations.

Type
olympe.dc.ListDef.<olympe.dm.Relation>

getTag()

Gets the instance tag.

Implements:
Returns:

Instance tag.

Type
string