org.eclipse.gmt.weaver.amw4atl
Class ASMAMWModelElement

java.lang.Object
  extended by org.eclipse.m2m.atl.engine.vm.nativelib.ASMNativeObject
      extended by org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny
          extended by org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclType
              extended by org.eclipse.m2m.atl.engine.vm.nativelib.ASMModelElement
                  extended by org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement
                      extended by org.eclipse.gmt.weaver.amw4atl.ASMAMWModelElement

public class ASMAMWModelElement
extends org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement

This class contains implements a model element used for the AmwModelHandler contains helper methods that improve the integration of AMW and ATL

Since:
AMW2006

Field Summary
 
Fields inherited from class org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclType
myType
 
Method Summary
static org.eclipse.m2m.atl.engine.vm.nativelib.ASMString generateModelRef(org.eclipse.m2m.atl.engine.vm.StackFrame frame, org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement self, org.eclipse.m2m.atl.engine.vm.nativelib.ASMString wovenModel)
          Generates the value of the "ref" attribute for a woven model.
static org.eclipse.m2m.atl.engine.vm.nativelib.ASMString getElementID(org.eclipse.m2m.atl.engine.vm.StackFrame frame, org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement self, org.eclipse.m2m.atl.engine.vm.nativelib.ASMString weavingModelName)
          Returns the identifier (ID) of a woven element.
static org.eclipse.m2m.atl.engine.vm.nativelib.ASMString getElementIDbyRefType(org.eclipse.m2m.atl.engine.vm.StackFrame frame, org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement self, org.eclipse.m2m.atl.engine.vm.nativelib.ASMString elementRef)
          Returns the identifier of a woven element.
static org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny getReferredElement(org.eclipse.m2m.atl.engine.vm.StackFrame frame, org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement self)
          This method takes as input a WLinkEnd of a weaving model and it returns the referred element of a woven model
In the transformation, the method is called in the following way: someLinkEnd.getReferredElement()
static void setElementIDbyRefType(org.eclipse.m2m.atl.engine.vm.StackFrame frame, org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement self, org.eclipse.m2m.atl.engine.vm.nativelib.ASMString elementRef, org.eclipse.m2m.atl.engine.vm.nativelib.ASMString ID)
          set ups the identifier of a woven element.
 
Methods inherited from class org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement
allInstances, allInstancesFrom, asm2EMF, conformsTo, emf2ASM, get, getInstanceById, getObject, getProperty, getPropertyType, invoke, invokeSuper, newInstance, refImmediateComposite, set
 
Methods inherited from class org.eclipse.m2m.atl.engine.vm.nativelib.ASMModelElement
getAcquaintance, getMetaobject, getModel, getName, lookupElementExtended, otherEnd, setMetaobject, toString
 
Methods inherited from class org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclType
addSupertype, conformsTo, getName, getSupertypes, getVMOperations, registerHelperAttribute, registerVMOperation
 
Methods inherited from class org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny
asBag, asSequence, asSet, check, debug, findOperation, findOperation, getHelper, getType, invoke, isHelper, oclIsKindOf, oclIsTypeOf, oclIsUndefined, oclType, operatorEQ, operatorNE, output, refGetValue, refImmediateComposite, refInvokeOperation, refSetValue, setType, toString
 
Methods inherited from class org.eclipse.m2m.atl.engine.vm.nativelib.ASMNativeObject
getNativeImpl
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getReferredElement

public static org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny getReferredElement(org.eclipse.m2m.atl.engine.vm.StackFrame frame,
                                                                                   org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement self)
This method takes as input a WLinkEnd of a weaving model and it returns the referred element of a woven model
In the transformation, the method is called in the following way: someLinkEnd.getReferredElement()

Parameters:
frame - parameter set up internally by the ATL engine
self - the model element
Returns:

generateModelRef

public static org.eclipse.m2m.atl.engine.vm.nativelib.ASMString generateModelRef(org.eclipse.m2m.atl.engine.vm.StackFrame frame,
                                                                                 org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement self,
                                                                                 org.eclipse.m2m.atl.engine.vm.nativelib.ASMString wovenModel)
Generates the value of the "ref" attribute for a woven model. In other words, generates an identifier for models. For the moment, models are identified uniquely by their URIs.
In the transformation, the method is called in the following way: MOF!EPackage.generateModelRef('left')

Parameters:
frame - parameter set up internally by the ATL engine
self -
wovenModel -
Returns:

getElementID

public static org.eclipse.m2m.atl.engine.vm.nativelib.ASMString getElementID(org.eclipse.m2m.atl.engine.vm.StackFrame frame,
                                                                             org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement self,
                                                                             org.eclipse.m2m.atl.engine.vm.nativelib.ASMString weavingModelName)
Returns the identifier (ID) of a woven element. For the moment it is necessary to pass as parameter the related weaving model. This is the way we find which WElementRef is used, and which provider class is called.
In the ATL transformation, the method is called in the following way: someElementConformingToMof.getElementID('IN')

Parameters:
frame -
self -
Returns:

getElementIDbyRefType

public static org.eclipse.m2m.atl.engine.vm.nativelib.ASMString getElementIDbyRefType(org.eclipse.m2m.atl.engine.vm.StackFrame frame,
                                                                                      org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement self,
                                                                                      org.eclipse.m2m.atl.engine.vm.nativelib.ASMString elementRef)
Returns the identifier of a woven element. The type of the element ref is passed as parameter, to be able to know which identifier provider will be instantiated.
In the ATL transformation, the method is called in the following way: someElement.getElementIDbyRefType ('ElementRefXMI')

Parameters:
frame -
self -
Returns:

setElementIDbyRefType

public static void setElementIDbyRefType(org.eclipse.m2m.atl.engine.vm.StackFrame frame,
                                         org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement self,
                                         org.eclipse.m2m.atl.engine.vm.nativelib.ASMString elementRef,
                                         org.eclipse.m2m.atl.engine.vm.nativelib.ASMString ID)
set ups the identifier of a woven element. The type of the element ref is passed as parameter, to be able to know which identifier provider will be instantiated.
In the ATL transformation, the method is called in the following way: someElement.setElementIDbyRefType ('ElementRefXMI', 'ID')

Parameters:
frame -
self -