IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.transform.uml2
Class UMLElementKindExtractor

java.lang.Object
  extended bycom.ibm.xtools.transform.core.AbstractTransformElement
      extended bycom.ibm.xtools.transform.core.AbstractContentExtractor
          extended bycom.ibm.xtools.transform.uml2.UMLElementKindExtractor
All Implemented Interfaces:
ITransformationItem
Direct Known Subclasses:
UMLSubtypeOfKindExtractor

public class UMLElementKindExtractor
extends AbstractContentExtractor

This generic UML extractor class provides a convenient way to navigate the containment hierarchy of a UML source element. It will retrieve contained elements where the element has the same (exact) element kind (eClass) as the specified kind.

If an element kind is not specified (in the constructor), this extractor will extract all UML2 elements owned by the source UML2 object.


Field Summary
protected  EClass elementKind
          Remember the model element kind.
 
Constructor Summary
UMLElementKindExtractor()
          The default constructor should only be used internally by the transformation service.
UMLElementKindExtractor(String id, AbstractTransform transform, EClass elementKind)
          Constructor.
 
Method Summary
 Collection execute(ITransformContext context)
          Retrieve the elements related to the source object that will be processed by the associated transform.
 void setLanguageElementKind(EClass elementKind)
          Define the language element kind to match the extracted elements.
 
Methods inherited from class com.ibm.xtools.transform.core.AbstractContentExtractor
getFilterCondition, getTransform, setFilterCondition, setTransform, toString
 
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, wait, wait, wait
 

Field Detail

elementKind

protected EClass elementKind
Remember the model element kind. If this value is not specified then all contained elements will be iterated over.

Constructor Detail

UMLElementKindExtractor

public UMLElementKindExtractor()
The default constructor should only be used internally by the transformation service.


UMLElementKindExtractor

public UMLElementKindExtractor(String id,
                               AbstractTransform transform,
                               EClass elementKind)
Constructor.

Parameters:
id - A unique id for the extractor.
transform - An associated transform to process the UML elements.
elementKind - An EMF element kind to extract.
Method Detail

execute

public final Collection execute(ITransformContext context)
Description copied from class: AbstractContentExtractor
Retrieve the elements related to the source object that will be processed by the associated transform.

Specified by:
execute in class AbstractContentExtractor
Parameters:
context - the current context of the transformation execution
Returns:
Collection - the collection of related source model objects

setLanguageElementKind

public void setLanguageElementKind(EClass elementKind)
Define the language element kind to match the extracted elements.

Parameters:
elementKind - An EMF element kind to extract.

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.