TOP

search

Description

Starting from the selected objects, execute the nested tasks for them and collect the produced results for iteration upon. The iteration ends when all objects are processed and no new objects are put for collected.
Note:
 <search property="name"> 
 
 is a shortcut of
 
   <search>
     <propertSelector property="name"/>
 
If no selectors specified, it iterates on the value of "this" property

Implementation class

net.mdatools.modelant.util.task.SearchTask

Parameters

Attribute Description Type
collect The name of the property that is set by the nested tasks. Its values are collected as a result of this task. If the result is a single value, it is added to the result list. If the result is a collection, its elements are added to the result. Nulls are not collected. Default: this String
iterator The name of the property to bind the current list element to check. Default: this String
name the name of the property where to store the list of filtered objects Default: this String
property This is the name of the property, whose value is expected to be a collection of objects to iterate upon Default: "this" String

Nested elements

Element Description
A single ModelANT selector, that produces a collection to iterate upon. No more than one selector or resource collection set expected. Choose among:
Element Description
allOfMetaclassSelector Selector of all model elements, that are instances of a metaclass
propertySelector Select the collection held as a value of a property. The not defined properties are treated as empty lists, the collection-valued attributes are used to iterate upon, the attributes that have any other than a collection value a returned as a collection of a single element.
ref.get Retrieve an object by its MOF ID or as an associated object or an attribute's value.
search Starting from the selected objects, execute the nested tasks for them and collect the produced results for iteration upon. The iteration ends when all objects are processed and no new objects are put for collected.
Note:
 <search property="name"> 
 
 is a shortcut of
 
   <search>
     <propertSelector property="name"/>
 
If no selectors specified, it iterates on the value of "this" property
select Iterate among the selected objects and collect all those objects that satisfy the nested condition. In an advanced usage form, state the name of the property to collect in the "collect" property and provide nested tasks to set up the value of the "collect" property for each object that satisfies the nested condition.
Note: 
 <select property="name"> 
 
 is a shortcut of
 
   <select>
     <propertSelector property="name"/>
 
If no selectors specified, it iterates on the value of "this" property
uml13.get This get task allows navigation through the UML 1.3 specific associations that are unidirectional in the UML 1.3 meta-model, but are useful in the opposite direction. Supported paths
  • tag = the tag values associated to the model element
  • stereotype = the stereotype assigned to the model element
  • associationEnd = the collection of association ends associated to the model element. Valid only for Classifier instances.
This task and its subclasses could be used also as a selector in iterator, select, search, etc, tasks as it inherits from the general GetTask
A single ANT standard resource collection to iterate upon. See the ANT types for more details. Choose among:
tasks The nested tasks to execute for the value of the iterator property and set the property whose values are to be collected. This class collects nested tasks for execution

Nested elements

Element Description
Any task The tasks to execute is a non-null task to collect

Use <typedef resource="net/mdatools/modelant/util/antlib.xml"/>
Documentation generated by ant.doc Ant macro from ModelAnt by MDA Tools