public class ListContentExtractor extends AbstractContentExtractor
When a transformation is executed via the UI, the source objects for the transformation are defined by the current selection. Since multiple objects can be selected, the relavant objects for the transformation are kept in a List object and the list is passed to the transformation when it is executed. This extractor simply returns the object in that list so that they can be processed by the associated transform.
Typcially a ListContentExtractor instance will only occur in the root transform of a transformation. If the RootTransform class is used, it automatically creates an instance of this list extractor.
Constructor and Description |
---|
ListContentExtractor()
The default constructor should only be used internally by the
transformation service.
|
ListContentExtractor(java.lang.String id,
AbstractTransform transform)
Extractor constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canAccept(ITransformContext context)
Using the context, determine if this transformation element should be executed.
|
java.util.Collection |
execute(ITransformContext context)
Retrieve the elements related to the source object that will be
processed by the associated transform.
|
getFilterCondition, getTransform, setFilterCondition, setTransform, toString
getAcceptCondition, getDescription, getId, getName, getProgressMonitor, setAcceptCondition, setDescription, setId, setName
public ListContentExtractor()
public ListContentExtractor(java.lang.String id, AbstractTransform transform)
id
- the identifer for this extractortransform
- the transform for processing the list's objectspublic boolean canAccept(ITransformContext context)
AbstractTransformElement
The default implementation will make use of the condition if one is defined. Subclasses may override this method to provide more specialized acceptance criteria.
canAccept
in class AbstractTransformElement
context
- the current context of the transformation executionpublic java.util.Collection execute(ITransformContext context)
AbstractContentExtractor
execute
in class AbstractContentExtractor
context
- the current context of the transformation execution