From ca9c9d257f110e15cafaa75e214e6387934cda10 Mon Sep 17 00:00:00 2001 From: "i.nueske" <i.nueske@indiscale.com> Date: Sun, 26 Jan 2025 11:26:33 +0100 Subject: [PATCH] DOC: Extend ROCrateEntityConverter explanation --- src/doc/converters/further_converters.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/doc/converters/further_converters.rst b/src/doc/converters/further_converters.rst index a3c306a..0fffc2e 100644 --- a/src/doc/converters/further_converters.rst +++ b/src/doc/converters/further_converters.rst @@ -132,8 +132,16 @@ File object, which can be matched with SimpleFile. And each subpart of the ROCrateEntity is also converted to a ROCrateEntity, which can then again be treated using this converter. -To match a ROCrateEntity using its entity_type, the match_entity_types keyword -can be used. +The ``match_entity_type`` keyword can be used to match a ROCrateEntity using its +entity_type. With the ``match_properties`` keyword, properties of a ROCrateEntity +can be either matched or extracted, as seen in the cfood example below: +* with ``match_properties: "@id": ro-crate-metadata.json`` the ROCrateEntities +can be filtered to only match the metadata json files. +* with ``match_properties: dateCreated: (?P<dateCreated>.*)`` the ``dateCreated`` +entry of that metadata json file is extracted and accessible through the +``dateCreated`` variable. +* the example could then be extended to use any other entry present in the metadata +json to filter the results, or insert the extracted information into generated records. Example cfood ------------- -- GitLab