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
No related branches found
No related tags found
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
``ROCrateEntity`` structure element for each contained object. Currently only
zipped ro-crate files are supported. The created ROCrateEntities wrap a
``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
optional ``rocrate`` dependency.
......@@ -121,13 +123,17 @@ to the ROCrateConverter and also creates ROCrateEntities for contained objects.
ROCrateEntityConverter
----------------------
The ROCrateEntityConverter unpacks the properties, files and parts of the
``rocrate.model.entity.Entity`` wrapped within a ROCrateEntity. Properties
are converted to a basic element matching their value
(``BooleanElement``, ``IntegerElement``, etc.), each ``rocrate.model.file.File``
is converted to a crawler File object, and each subpart of the ROCrateEntity is
again converted to a ROCrateEntity. These elements can then again be treated
using this or their respective inbuilt converters.
The ROCrateEntityConverter unpacks the ``rocrate.model.entity.Entity`` wrapped
within a ROCrateEntity, and appends all properties, contained files, and parts
as children. Properties are converted to a basic element matching their value
(``BooleanElement``, ``IntegerElement``, etc.) and can be matched using
match_properties. Each ``rocrate.model.file.File`` is converted to a crawler
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.
Example cfood
-------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment