MetadataCondition ​
Inherits: EntityCondition < Condition < Resource
Check entity metadata with flexible operations and type handling
Properties ​
String | metadata_key | "" |
ComparisonType | comparison | ComparisonType.EQUALS |
String | target_value | "" |
String | max_value | "" |
bool | missing_as_empty | true |
Methods ​
bool | evaluate_entity( entity: Entity ) |
String | get_entity_description() |
String | get_entity_function_description() |
Enumerations ​
enum ComparisonType ​
The options of comparison type: equals, not equals, greater than, less than, contains, starts with, ends with, exists, not exists, is empty ....
- EQUALS =
0 - NOT_EQUALS =
1 - GREATER_THAN =
2 - LESS_THAN =
3 - CONTAINS =
4 - STARTS_WITH =
5 - ENDS_WITH =
6 - EXISTS =
7 - NOT_EXISTS =
8 - IS_EMPTY =
9 - NOT_EMPTY =
10 - ARRAY_CONTAINS =
11 - ARRAY_SIZE =
12
Property descriptions ​
Target
String metadata_key = "" ​
Metadata key to check
Comparison
ComparisonType comparison = ComparisonType.EQUALS ​
Type of comparison to perform
String target_value = "" ​
Target value for comparison
String max_value = "" ​
Secondary value (for IN_RANGE)
Behavior
bool missing_as_empty = true ​
Whether missing keys should be treated as empty/false
Method descriptions ​
bool evaluate_entity( entity: Entity ) ​
Is the condition met for this entity?
String get_entity_description() ​
A short text about what the condition checks on the entity.
String get_entity_function_description() ​
The sentence the editor shows for the condition, with {placeholders} for its values.