Rule Details Page
Rule Details Page
If you are adding or editing a specific rule, you will work on the Rule Details page to define the parameters of the rule. See the Operators Used in Rule Parameters section for details on how to use operators in parameters.
Operators Used in Rule Parameters
The following operators are used for specific types of parameter data.
String Values
String values are words that are not separated by a comma (,), for example, one Producer name (John Smith), one MIME type (audio/mp3), one error code, one Format ID). String values use the following operators:
- Equal – The string and the input value must match exactly.
- Contains – The string and the input value must match partially with the ‘*’ character.
List of Strings
A list of strings is a list of string values separated by a comma (,) sometimes populated by a widget. Lists of strings use the following operators:
- List Contains – used when each error returned should match exactly a single given error in the rule.
- List Equals - Used when the order of the items in the list and the list itself should match exactly. For example, a rule defined as “Invalid page dictionary object, Invalid object number in cross-reference stream” will match to the actual output from JHOVE – “Invalid page dictionary object, Invalid object number in cross-reference stream.”
Numeric Fields
Numeric fields (for example, file size) use numbers as matching and comparison values.
- Greater Than (>) – The input value should be greater than the parameter value.
- Less Than (<) - The input value should be less than the parameter value.
- Equal (=) - The input value should be equal to the parameter value.
- Not Equal (! =) - The input value should be not equal to the parameter value.
Date Fields
Date fields (such as Creation Date) compare date values with time operators.
- After – The input date should be later than the parameter date value.
- Before - The input date should be earlier than the parameter date value.
- Equal (=) - The input date should be the same as the parameter date value.
- Not Equal (! =) - The input date should not be the same as the date parameter value.
Any
All fields can use this operator for indicating that any input value will be accepted by the rule. For example, if the ‘Any’ operator is used in the Producer Name field, the rule can match all Producers.
The following table summarizes the possibilities for matching between the rule parameter values and the run-time values:
Run-time Value | Operator | Possible Rule Values | Result |
---|---|---|---|
Demo Producer | Equal | Demo Producer | Match |
Demo Producer | Contains | Demo* | Match |
image/tiff or image/bmp | In List | Image/tiff, image/bmp | Match |
image/tiff, image/bmp | List Equals | Image/tiff, image/bmp | Match |
grey or gray | In List with Regular Expression | gr[ea]y | Match |
12345 | <, >, =, != | 10000 | < - No match > - Match = - No match != - Match |
23/11/2011 | Before, After, =, != | 23/11/2011 | Before - No match After - No match = - Match != - No match |
To define Boolean logic when using multiple conditions, select one of the following options between conditions:
- OR
- AND (default)
The Boolean connector between different types of attributes (for example, IE Attributes and File Attributes) is always AND.