Abstract Class

class oaklib.converters.data_model_converter.DataModelConverter(curie_converter: Converter | None = None, labeler: Callable[[str], str | None] | None = None, enforce_canonical_ordering: bool | None = None)[source]

Base class for all inter-data model converters.

Do not use this directly: use one of the subclasses.

curie_converter: Converter = None

Converts between CURIEs and URIs

labeler: Callable[[str], str | None] = None

A function that returns a label for a given CURIE

enforce_canonical_ordering: bool | None = None

If True, will enforce canonical ordering of keys in the output

abstract convert(source: Any, target: Any | None = None, **kwargs) Any[source]

Converts from a source object to a target object.

Individual subclasses will map this to a specific subtype.

  • source

  • target – Optional. If passed, modified in place

  • kwargs – Additional arguments


abstract dump(source: Any, target: str | None = None, **kwargs) None[source]

Dumps a source object to a target file.

  • source

  • target