Implement metadata filtering
We need a new method to skip elements that do not have the right metadata value.
We need to add a new field in the FilterArgs class:
-
accepted_metadatas
, a key-value dictionary where each entry is a mandatory Arkindex metadata name/value
This field will be parsed and stored as attribute of HTRDataGenerator
. We will need a method that will, given an element_id
:
- list its metadata
- check that the needed metadata are correctly set
It will be used here:
if self.accepted_metadatas and not self.has_required_metadatas(element_id):
continue