Legacy Issue Number: 12800
Source: Model Driven Solutions ( Ed Willink)
EMOF does not support identification of the opposite role name
for a non-navigable association, however QVT requires such role
names to be used. OCL defines an implicit role name, but UML
graphics supports arbitrary names.
At the EclipseCon OMG symposium in February, it seemed appropriate
to resolve the limitation in the following way.
An opposite role name may be denoted by a Comment Comment with the
inner Comment defining a formal function for the outer Comment.
<ownedAttribute name="forward" ...>
"backward" is defined as the oppositeRoleName of "forward".
This practice makes the missing information available, and avoids
any changes to the MOF meta-model and so avoids introducing any
additional Property instances that might bloat existing usage.
It would be helpful if a future MOF version, or an addendum to existing
versions, endorse this practice.
An equivalent Ecore EAnnotation and cross-conversion was introduced
via https://bugs.eclipse.org/bugs/show_bug.cgi?id=229998 and forms
part of EMF 2.4.0 that accompanies Eclipse 3.4 (Ganymede).
Reported: MOF 2.0 — Sun, 31 Aug 2008 04:00 GMT
Disposition: Resolved — MOF 2.4
The use of ‘non-navigable’ is out-dated: the issue is where Property::opposite is empty and there is nothing to hang the name on.
Further email exchanges on the RTF list discussed using an EMOF Tag instead of a Comment. So the proposed resolution is to introduce an EMOF Tag named “org.omg.emof.oppositeRoleName” that can be applied only to a Property whose “opposite” Property is empty. The “value” of this Tag specifies a role name that expressions (such as OCL expressions and QVT expressions) can use to traverse in the opposite direction of the Property.
Updated: Fri, 6 Mar 2015 20:58 GMT