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

DOC: ROCrateEntityConverter explanation

parent 6563280f
Branches
Tags
2 merge requests!217TST: Make NamedTemporaryFiles Windows-compatible,!209Documentation for ROCrateConverter
Pipeline #59784 passed
...@@ -108,7 +108,9 @@ The ROCrateConverter unpacks ro-crate files, and creates one instance of the ...@@ -108,7 +108,9 @@ The ROCrateConverter unpacks ro-crate files, and creates one instance of the
``ROCrateEntity`` structure element for each contained object. Currently only ``ROCrateEntity`` structure element for each contained object. Currently only
zipped ro-crate files are supported. The created ROCrateEntities wrap a zipped ro-crate files are supported. The created ROCrateEntities wrap a
``rocrate.model.entity.Entity`` with a path to the folder the ROCrate data ``rocrate.model.entity.Entity`` with a path to the folder the ROCrate data
is saved in, and can then be treated by the :ref:`ROCrateEntityConverter`. is saved in. They are appended as children and can then be accessed via the
subtree and treated using the :ref:`ROCrateEntityConverter`.
To use the ROCrateConverter, you need to install the LinkAhead crawler with its To use the ROCrateConverter, you need to install the LinkAhead crawler with its
optional ``rocrate`` dependency. optional ``rocrate`` dependency.
...@@ -121,13 +123,17 @@ to the ROCrateConverter and also creates ROCrateEntities for contained objects. ...@@ -121,13 +123,17 @@ to the ROCrateConverter and also creates ROCrateEntities for contained objects.
ROCrateEntityConverter ROCrateEntityConverter
---------------------- ----------------------
The ROCrateEntityConverter unpacks the properties, files and parts of the The ROCrateEntityConverter unpacks the ``rocrate.model.entity.Entity`` wrapped
``rocrate.model.entity.Entity`` wrapped within a ROCrateEntity. Properties within a ROCrateEntity, and appends all properties, contained files, and parts
are converted to a basic element matching their value as children. Properties are converted to a basic element matching their value
(``BooleanElement``, ``IntegerElement``, etc.), each ``rocrate.model.file.File`` (``BooleanElement``, ``IntegerElement``, etc.) and can be matched using
is converted to a crawler File object, and each subpart of the ROCrateEntity is match_properties. Each ``rocrate.model.file.File`` is converted to a crawler
again converted to a ROCrateEntity. These elements can then again be treated File object, which can be matched with SimpleFile. And each subpart of the
using this or their respective inbuilt converters. 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.
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