Skip to content
Snippets Groups Projects
Commit ca9c9d25 authored by I. Nüske's avatar I. Nüske
Browse files

DOC: Extend ROCrateEntityConverter explanation

parent 02b58258
No related branches found
No related tags found
2 merge requests!217TST: Make NamedTemporaryFiles Windows-compatible,!209Documentation for ROCrateConverter
Pipeline #60289 passed
...@@ -132,8 +132,16 @@ File object, which can be matched with SimpleFile. And each subpart of the ...@@ -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 ROCrateEntity is also converted to a ROCrateEntity, which can then again be
treated using this converter. treated using this converter.
To match a ROCrateEntity using its entity_type, the match_entity_types keyword The ``match_entity_type`` keyword can be used to match a ROCrateEntity using its
can be used. 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 Example cfood
------------- -------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment