The Filter Operator compares each value of a multi-valued property of string type with one or more string values. Each time that the result of a comparison is true, the value of the multi-valued property is stored in a specified multi-valued property associated with the comparison. Each time that the result of a comparison is false, the value of the multi-valued property is rejected and stored in a specified multi-valued property.
|
Note: If a value of the multi-valued property matches several string values, the value is stored in the specified multi-valued properties associated with the comparisons for which the result is true. |
You want to filter a multi-valued property that contains the following values:
image/jpeg:2500
image/jpeg:4000
image/jpeg:5000
image/gif:4000
image/gif:10000
text/plain:100
audio/mp3:20000
Message:20
Each value of this multi-valued property is compared with the comparison values that are shown in the next table. When the result of a comparison is true, the value is stored in the property associated to the comparison (ImageFolder, TextFolder, and so on). If a value of the multi-valued property does not match any string values, the value is stored in the property "RejectedValues".
|
Property Name |
Comparator |
Comparison Value |
|
ImageFolder |
starts with |
image |
|
TextFolder |
starts with |
text |
|
AudioFolder |
starts with |
audio |
|
JpegImageFolder |
contains |
jpeg |
|
GifImageFolder |
contains |
gif |
Once the Filter Operator have completed the comparisons, each property contains the following list:
|
ImageFolder |
TextFolder |
AudioFolder |
JpegImageFolder |
GifImageFolder |
|
image/jpeg:2500 image/jpeg:4000 image/jpeg:5000 image/gif:4000 image/gif:10000 |
text/plain:100 |
audio/mp3:20000 |
image/jpeg:2500 image/jpeg:4000 image/jpeg:5000 |
image/gif:4000 image/gif:10000 |
The value "Message:20" does not match any string values. This value is thus stored in the multi-valued property "RejectedValues".
Name: Type the name of the component (mandatory).
Description: Allows you to type the description of the component (optional).
Source: Allows you to select a multi-valued property that you want to filter.
Property Name: Provides the list of multi-valued properties. Select a multi-valued property.
Target: Allows you to create the table of comparisons that filters the selected multi-valued property.
Unmatched Values Property: Allows you to name the property that retrieves all the values of the multi-valued source property that do not match the table of comparisons.
: Adds a row to the table. Click this button to add a comparison.
: Deletes a row from the table. To remove a comparison, select the corresponding comparison row, and then click this button.
Property Name: Allows you to type the multi-valued source property name that retrieves all the values of the multi-valued source property that match the comparison.
Operator: Provides the list of comparators. Select an operator. The comparators are the following:
is equal to: All the values that are equal to the value of Comparison Value are saved in the Property Name column entry
starts with: All the values that start with the value of Comparison Value are saved in the Property Name column entry
ends with: All the values that end with the value of Comparison Value are saved in the Property Name column entry
contains: All the values that contain at least the value of Comparison Value are saved in the Property Name column entry
matches (*): All the values that match the regular expression of Comparison Value are saved in the Property Name column entry
matches (capturing group)(*): All the values that match the regular expression containing parenthesis in Comparison Value are saved in the Property Name column entry. For example, in the following multi-valued source property containing the string "text/html;12000;text/html;06000;text/html;03000", you can retrieve the values "text/html;12000", "text/html;06000" and "text/html;03000" with a regular expression such as "text/.+;([0-9]+)".
Comparison Value: Allows you to type a value or select a property that is compared with each value of the source property. You cannot type a regex or a capturing group.
|
(*) Note: The last two comparisons use regular expressions that you should know. These regular expressions are compliant with the POSIX standard. For more information about regular expressions, consult the relevant J2SE websites:
The following table shows the regular expressions (Regex) that are equivalent to the most used wildcards:
|