MetadataBlankCondition
Met when metadata fields are blank or missing.
Notes
Met when no field matches fieldMatcher, or when the values of the matching fields are blank (control characters and spaces ignored). By default, all values must be blank. A field name pattern is required: the document content is never tested.
To test that a field is present and not blank, wrap this condition in a MetadataNoneOf group.
Examples
- YAML
- JSON
- XML
class: MetadataBlankCondition
fieldMatcher:
pattern: Content-Type
{
"class": "MetadataBlankCondition",
"fieldMatcher": {
"pattern": "Content-Type"
}
}
<class>MetadataBlankCondition</class>
<fieldMatcher>
<pattern>Content-Type</pattern>
</fieldMatcher>
Usage
Full configuration skeleton, with every option and its default
- YAML
- JSON
- XML
class: MetadataBlankCondition
fieldMatcher:
ignoreCase: false
ignoreDiacritic: false
matchEmpty: false
method: BASIC
negateMatches: false
partial: false
pattern: string
replaceAll: false
trim: false
matchAnyBlank: false
{
"class": "MetadataBlankCondition",
"fieldMatcher": {
"ignoreCase": false,
"ignoreDiacritic": false,
"matchEmpty": false,
"method": "BASIC",
"negateMatches": false,
"partial": false,
"pattern": "string",
"replaceAll": false,
"trim": false
},
"matchAnyBlank": false
}
<condition>
<class>MetadataBlankCondition</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>
<matchAnyBlank>false</matchAnyBlank>
</condition>
Properties
| Property | Type | Required | Default |
|---|---|---|---|
fieldMatcher | TextMatcher | No | TextMatcher |
matchAnyBlank | boolean | No | false |
Property Details
fieldMatcher
Matches metadata field names. Required.
matchAnyBlank
When true, a single blank value is enough for the condition to be met, instead of all values having to be blank. Defaults to false.