|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.xtools.transform.core.AbstractTransformElement
com.ibm.xtools.transform.core.AbstractTransform
The Abstract Transform class defines the contract between the transformation service and the implementation of a specific transformation.
In the default transformation engine, transforms are containers that traverse the transformation element hierarchy, executing extractors, rules and nested transforms. Extractors effectively walk the source model and rules create or update the target model.
There are two types of transforms within the transformation element hierarchy: a root transform and internal transforms. For any given transformation, there is one root transform for every instance of that transformation. A new instance of a root transform should be returned by the transformation provider when requested. (@see AbstractTransformationProvider.createTransformation(ITransformationDescriptor descriptor))
Internal transforms are used within the transformation implementation to contain rules, content extractors and other transforms. If a transformation author does not want to use the default transformation engine, he only needs to create a root transform.
Root transforms always have an associated transformation descriptor, which enables the rules and extractors at execution time to have access to the formal properties defined by the transformation author (in the descriptor).
Typcially internal transforms do not have an associated descriptor, unless one transformation contains another transformation (i.e. a composite transformation).
Constructor Summary | |
AbstractTransform()
The default constructor should only be used internally by the transformation service. |
|
AbstractTransform(ITransformationDescriptor descriptor)
The constructor to be used when creating a root transform. |
|
AbstractTransform(String id)
This constructor should be used when creating a transform that is internal within a transformation hierarchy. |
Method Summary | |
ITransformContext |
createContext(ITransformContext parentContext)
Create an execution context associated with this transform. |
abstract void |
execute(ITransformContext context)
Execute the transform with the given context. |
ITransformationDescriptor |
getTransformationDescriptor()
Retrieve the associated transformation descriptor. |
Methods inherited from class com.ibm.xtools.transform.core.AbstractTransformElement |
canAccept, getAcceptCondition, getDescription, getId, getName, getProgressMonitor, setAcceptCondition, setDescription, setId, setName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractTransform()
public AbstractTransform(String id)
id
- the unique identifier of this transformpublic AbstractTransform(ITransformationDescriptor descriptor)
descriptor
- the associated transformation descriptorMethod Detail |
public ITransformContext createContext(ITransformContext parentContext)
parentContext
- the current context of the transformation execution
public abstract void execute(ITransformContext context) throws Exception
context
- the current context of the transformation execution
Exception
public final ITransformationDescriptor getTransformationDescriptor()
|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2004. All rights reserved.