ListSearcher
Searches a list to find a value and returns the index of the value in the list.
Output Ports
An element in the list matched. The output feature will return the index of the found element in the index attribute specified.
If the element is not found in the input feature, the feature will be output via this port and no index attribute will be applied.
Parameters
The name of the list to search. The list name should contain a pair of braces {}.
在列表中搜索字符串或正则表达式。
If the Index Attribute is specified and the search string is found, an attribute with the specified name will be added to the output feature containing the index of the found element.
This parameter determines how the list will be searched.
Parameter Choice | Description |
---|---|
First Exact Match |
搜索完全匹配。 |
第一个正则表达式匹配 |
Uses a regular expression to search for a first matching entry in the list. Advanced Regular Expressions (AREs) are supported. Search theFME Functions and Factoriesfor a complete description of AREs. In brief, an ARE is one or more branches, separated by `|', matching anything that matches any of the branches. |
First not matching |
返回列表中第一个不匹配条目的索引。 |
First less than, |
在满足条件的列表中搜索第一个元素。如果列表元素和搜索值都可以转换为浮点数,则使用数值比较;否则,使用字符串比较 |
If checked, the contents of the found element will be copied to the main attribute(s) of the output feature. This saves adding alistIndexer.after the searcher to demote the list element.
Note that any list element attributes that start withFME_will not be copied (for example,FME_type) unless you specify a Demoted Attribute Prefix.
The prefix that should be added to any attribute(s) copied onto the output feature.
Example
For example, if this feature enters the transformer:
somelist{0}.length= 7.3
索音{0} .kind= ’paved’
索音{1} .Length= 8.4
somelist{1}.kind= ’smooth’
somelist{1}.lanes= 2
somelist{2}.length= 1.1
索音{2} .kind= ’rough’
and the索莫斯特{}。善良的list attribute is searched for the value光滑的, then the index attribute would be set to 1.
Additional Resources
Test regular expressions withRubular, a Ruby-based regular expression editor.
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, clickth旁边e applicable parameter. For more information, seeTransformer Parameter Menu Options.
Transformer Categories
搜索FME知识中心
搜索有关此变压器的样本和信息FME Knowledge Center.