[KFileMetaData] Add helper for XML encoded Dublin Core metadata
ClosedPublic

Authored by bruns on Oct 28 2018, 5:38 PM.

Details

Summary

Dublin Core metadata is used by several file formats, e.g. ODF,
MS Office 2007 (Office XML) and SVG. Add a helper which can be
used by the extractors.

Diff Detail

Repository
R286 KFileMetaData
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bruns created this revision.Oct 28 2018, 5:38 PM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptOct 28 2018, 5:38 PM
Restricted Application added subscribers: Baloo, kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Oct 28 2018, 5:38 PM

I guess you plan to convert the existing extractors to use this?
The only concern I might have that now two iterations over the node are required when this is used in e.g. odfextractor, isn't it?
Btw, I don't think it's necessary to prepend KFileMetaData in the diff title, since the repository is only for KFileMetaData anyway.

bruns added a comment.Oct 31 2018, 9:17 PM

I guess you plan to convert the existing extractors to use this?

Yes, thats the plan

The only concern I might have that now two iterations over the node are required when this is used in e.g. odfextractor, isn't it?

The QDomDocument can be reused, so parsing is only done once. Iteration needs to be done twice, but this is only a minor issue as the metadata documents are really small (~10 nodes, 1kByte). For the office2007extractor it actually is a win, as it currently iterates the tree once per property.

astippich accepted this revision.Oct 31 2018, 10:40 PM
This revision is now accepted and ready to land.Oct 31 2018, 10:40 PM
This revision was automatically updated to reflect the committed changes.