The @id property is an important element for datasets as it enables unique identification, referencing, and linking with other datasets. The current implementation lacks support for this functionality.
Proposed Solution
Incorporate support for the @id property within the Dataset type by implementing the following changes:
src/soso/interface.py: Introduce a new get_id method to the existing strategy interface, which all metadata conversion strategies will implement.
src/soso/strategies.py: Within existing conversion strategies, implement the newly added get_id method to fetch the @id value from a metadata record, if possible.
src/soso/main.py: Include a new @id key within the graph dictionary of the main.convert function, to which the value returned by strategy.get_id will be assigned. Additionally, ensure the option to override this value through keyword arguments (kwargs).
tests/test_strategies.py: Implement a test case to verify @id values are of schema:URL type.
Description
The
@id
property is an important element for datasets as it enables unique identification, referencing, and linking with other datasets. The current implementation lacks support for this functionality.Proposed Solution
Incorporate support for the
@id
property within the Dataset type by implementing the following changes:get_id
method to the existing strategy interface, which all metadata conversion strategies will implement.get_id
method to fetch the@id
value from a metadata record, if possible.@id
key within the graph dictionary of themain.convert
function, to which the value returned bystrategy.get_id
will be assigned. Additionally, ensure the option to override this value through keyword arguments (kwargs
).@id
values are ofschema:URL
type.Additional Information