Project

General

Profile

feature request #9146

filter image metadata by include and exclude lists of key words

Added by Andreas Kohlbecker 23 days ago. Updated 21 days ago.

Status:
Feedback
Priority:
Highest
Category:
cdmlib
Target version:
Start date:
07/13/2020
Due date:
% Done:

50%

Severity:
normal

Description

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.

TODO:

  • 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

Related issues

Related to Edit - feature request #9152: PreferencesService caches CdmPreferences Resolved 07/15/2020
Related to Edit - feature request #9153: Handle additional information in image metadata New 07/15/2020

Associated revisions

Revision 036b973d (diff)
Added by Andreas Kohlbecker 23 days ago

ref #9146 media metadata service method with cdm property based include and exclude filter definitions

Revision 2eb4c6b4 (diff)
Added by Andreas Kohlbecker 23 days ago

ref #9146 media metadata service method with cdm property based include and exclude filter definitions - test

History

#1 Updated by Andreas Kohlbecker 23 days ago

  • Target version changed from Release 5.15 to Release 5.17

#2 Updated by Andreas Kohlbecker 23 days ago

  • Subject changed from filter image metadata by include and exclude lists to filter image metadata by include and exclude lists of key words

#3 Updated by Andreas Kohlbecker 23 days ago

  • Status changed from New to Resolved
  • Assignee changed from Andreas Kohlbecker to Andreas Müller
  • % Done changed from 0 to 50

implemented with test

#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.

  1. 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.

  1. 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.

#6 Updated by Andreas Kohlbecker 21 days ago

#7 Updated by Andreas Müller 21 days ago

#8 Updated by Andreas Müller 21 days ago

Please also have a look at #9153 when defining the default includes list

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)