feature request #9146
filter image metadata by include and exclude lists of key words
Not all image metadata read from image files (stored in EXIF and ICPT data fields) it to be exposed to the public via web services and the dataporal.
Therefore filtering at the service level has to be applied.
- CdmProperties for include and exclude lists of key names (EXIF and IPCT data are stored as key-value-pairs)
- order of application: 1. include, 2. exlcude
- provide a default for the include keywords
ref #9146 media metadata service method with cdm property based include and exclude filter definitions
#4 Updated by Andreas Müller 22 days ago
- Status changed from Resolved to Feedback
- Assignee changed from Andreas Müller to Andreas Kohlbecker
Code looks fine and tests run so I guess it works, though no tests exist for "excludes".
I only have 2 architectoral remark.
- Wouldnt it be better to have the includes and excludes list within the signature of the service? So it would be
public Map<String, String> readResourceMetadataFiltered(MediaRepresentation representation, List<String> includes, List<String> excludes)
If includes or excludes is null the preferences values are taken. That makes the usage of the service method more flexibel.
- For performance reasons it might be a good idea to move the main code into MediaRepresentation class and only link to there from the service class. The reason for this is: This method can also be called from outside cdmlib. E.g. from TaxEditor or Vaadin. These applications often cache Preference data. So if they have the Preference data already and if they also have the MediaRepresentation they may not need to send an expensive webservice call and/or start an expensive transaction. Instead they can directly call the method on MediaRepresentation.
#5 Updated by Andreas Müller 22 days ago
I don't know if this is handled in this ticket or in another one. But the current implementation does not yet handle metadata stored in the CDM. So if metadata like photographer, copyright, date, title, etc. is (only) stored in CDM data this is not handled by the code.
And ofcourse, as CDM data is still completely missing, also no preference rules are handled here. Rules like preferCdmOverIPTC_EXIF or something like this.
Such data is usually stored in the Media belonging to the MediaRrepresentation.
If there is another ticket for this please link.