listsearcher.
Searches a list to find a value and returns the index of the value in the list.
输出端口
列表中的一个元素匹配。输出功能将在指定的索引属性中返回找到的元素的索引。
如果是element is not found in the input feature, the feature will be output via this port and no index attribute will be applied.
参数
要搜索的列表的名称。列表名称应包含一对括号{}。
在列表中搜索字符串或正则表达式。
如果是索引属性指定并找到搜索字符串,将添加指定名称的属性,将添加到包含找到元素索引的输出功能中。
此参数确定如何搜索列表。
参数选择 | 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功能和工厂for a complete description of AREs. In brief, an ARE is one or more branches, separated by `|', matching anything that matches any of the branches. |
首先不匹配 |
返回列表中第一个不匹配条目的索引。 |
首先不到, |
在满足条件的列表中搜索第一个元素。如果列表元素和搜索值都可以转换为浮点数,则使用数值比较;否则,使用字符串比较 |
如果选中,则找到的元素的内容将被复制到输出功能的主属性。这节省了添加listIndexer.after the searcher to demote the list element.
请注意,从中启动的任何列表元素属性FME_将不会被复制(例如,fme_type.) unless you specify aCopied Attribute Prefix。
应该添加到复制到输出功能上的任何属性的前缀。
例子
例如,如果此功能进入变压器:
索音{0} .Length= 7.3
索音{0} .kind= ’paved’
索音{1} .Length= 8.4
somelist{1}.kind= ’smooth’
索莫斯{1} .lanes= 2
somelist{2}.length= 1.1
索音{2} .kind='粗糙'
and thesomelist{}.kind搜索列表属性的值光滑的,则索引属性将设置为1。
Additional Resources
Test regular expressions withrub, 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, clickbeside the applicable parameter. For more information, seeTransformer Parameter Menu Options。
Transformer Categories
搜索FME知识中心
搜索有关此变压器的样本和信息FME知识中心。