|
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
The Abstract Transform Element class is the base class for all transformation objects (elements). There are three types of transformation elements: a transform, an extractor and a rule.
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.
All transformation elements have a unique id, a localized name and a localized description of the object's purpose. Depending upon the type of transformation element, some of these properties may be optional.
As part of the default transformation engine, all transformation elements have the ability to accept or reject the execution context before the element is executed. This acceptance is defined by an acceptance condition, If the condition class is derieved from the query framework's Condition class, then the acceptance decision is based upon the source object (from the context). If the condition is derived from TransformCondition, then the acceptance decision can be based upon all of the data stored in the context.
Condition
,
TransformCondition
Method Summary | |
boolean |
canAccept(ITransformContext context)
Using the context, determine if this transformation element should be executed. |
Condition |
getAcceptCondition()
Retrieve the condition that will be used by the canAccept method to determine if the context is acceptable. |
String |
getDescription()
Retrieve the localized description of the transformation item. |
String |
getId()
Retrieve the unique id of the transformation item. |
String |
getName()
Retrieve the localized name of the transformation item. |
protected IProgressMonitor |
getProgressMonitor(ITransformContext context)
Return the progress monitor for this transformation execution. |
void |
setAcceptCondition(Condition condition)
Set a condition that will be used by the canAccept method to determine if the context is acceptable. |
void |
setDescription(String theDescription)
Set the description for this transformation element. |
void |
setId(String elementId)
Set the unique id of this transformation element. |
void |
setName(String string)
Set the name of this transformation element. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public boolean canAccept(ITransformContext context)
The default implementation will make use of the condition if one is defined. Subclasses may override this method to provide more specialized acceptance criteria.
context
- the current context of the transformation execution
public final Condition getAcceptCondition()
public final String getDescription()
ITransformationItem
getDescription
in interface ITransformationItem
ITransformationItem.getDescription()
public final String getId()
ITransformationItem
getId
in interface ITransformationItem
ITransformationItem.getId()
public final String getName()
ITransformationItem
getName
in interface ITransformationItem
ITransformationItem.getName()
public final void setAcceptCondition(Condition condition)
condition
- The acceptance condition.public final void setDescription(String theDescription)
theDescription
- A string describing this transformation element.public final void setId(String elementId)
elementId
- A string representing a unique id for this transformation element.public final void setName(String string)
string
- A string representing a name for this transformation element.protected IProgressMonitor getProgressMonitor(ITransformContext context)
context
- the current context of the transformation execution
|
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.