hermes.model.types.pyld_util

Attributes

Classes

BundledLoader

Loader that retrieves schemas that come bundled with the software.

JsonLdProcessor

Custom JsonLdProcessor to get access to the inner functionality.

Module Contents

class hermes.model.types.pyld_util.BundledLoader(schema_path: pathlib.Path | None = None, base_loader: Any = None, preload: bool | List[str] | None = None)

Loader that retrieves schemas that come bundled with the software.

_load_json(source, base_url)
_load_rdflib(source, base_url)
load_schema(url)
__call__(url, options=None)
hermes.model.types.pyld_util.bundled_loader
class hermes.model.types.pyld_util.JsonLdProcessor(on_property_dropped: OnPropertyDropped = noop)

Bases: pyld.jsonld.JsonLdProcessor

Custom JsonLdProcessor to get access to the inner functionality.

expand_iri(active_ctx: Any, short_iri: str, vocab: bool = True) → str
compact_iri(active_ctx: Any, long_iri: str, vocab: bool = True, value: dict = None) → str
initial_ctx(local_ctx, options=None)
classmethod register_typemap(typecheck, **conversions)
classmethod apply_typemap(value, *option, **kwargs)