BlankCondition
Evaluates to true when matching document fields are blank or empty.
Notes
Evaluates to true when one or more matching document fields are blank (null, empty, or whitespace-only). Useful in importer flow control to route documents that are missing or have empty values for specific fields.
Examples
Matches documents where both title and dc:title are blank or missing.
- YAML
- JSON
- XML
condition:
class: BlankCondition
fieldMatcher:
method: regex
pattern: (title|dc:title)
{
"condition": {
"class": "BlankCondition",
"fieldMatcher": {
"method": "regex",
"pattern": "(title|dc:title)"
}
}
}
<condition class="BlankCondition">
<fieldMatcher method="regex" pattern="(title|dc:title)"/>
</condition>
Usage
Full configuration skeleton, with every option and its default
- YAML
- JSON
- XML
class: BlankCondition
fieldMatcher:
ignoreCase: false
ignoreDiacritic: false
matchEmpty: false
method: BASIC
negateMatches: false
partial: false
pattern: string
replaceAll: false
trim: false
label: string
matchAnyBlank: false
{
"class": "BlankCondition",
"fieldMatcher": {
"ignoreCase": false,
"ignoreDiacritic": false,
"matchEmpty": false,
"method": "BASIC",
"negateMatches": false,
"partial": false,
"pattern": "string",
"replaceAll": false,
"trim": false
},
"label": "string",
"matchAnyBlank": false
}
<condition>
<class>BlankCondition</class>
<fieldMatcher>
<ignoreCase>false</ignoreCase>
<ignoreDiacritic>false</ignoreDiacritic>
<matchEmpty>false</matchEmpty>
<method>BASIC</method>
<negateMatches>false</negateMatches>
<partial>false</partial>
<pattern>string</pattern>
<replaceAll>false</replaceAll>
<trim>false</trim>
</fieldMatcher>
<label>string</label>
<matchAnyBlank>false</matchAnyBlank>
</condition>
Properties
| Property | Type | Required | Default |
|---|---|---|---|
fieldMatcher | TextMatcher | No | TextMatcher |
label | string | No | - |
matchAnyBlank | boolean | No | false |
Property Details
fieldMatcher
Matches document fields based on specified patterns and methods. Use this to restrict the handler to operate only on fields whose names satisfy the matcher criteria.
label
An optional, user-supplied label for this step in the importer pipeline. It has no effect on processing — it exists purely to help identify this step, for example in large configurations or in the visual configurator.
matchAnyBlank
Whether one blank value is enough. By default (false) every value of every
matched field must be blank for the condition to hold; set it to true and any
single blank value satisfies it.
Note that a field matcher matching nothing at all also counts as blank.