Manual
parent
Scope: all
It returns the parent element of a model element.
Please note that
data.parent
of a metamodel or a model isundefined
data.parent
of a metaclass (DClass) that is not specified within a package returnsdefault
, the name of thedefault
package that is normally not visibledata.parent
of a root element in a model, returns the modeldata.parent
of a model element that is the target of an association or contained in an aggregation or containment return the reference in the source class.
Example 1
If the following fragment is part of a metamodel
then applying data.parent
returns the following
default
if applied toOperation
Operation
if applied toownedParameters
inOperation
default
if applied toParameter
Example 2:
If we consider the following model conforming to the metamodel in the previous Example
then data.parent
returns
- the model if applied on
Sum
ownedParameters
if applied onOperand_1
orOperand_2
Sum
if applied to ownedParameters inSum