schema_salad.jsonld_context

Functions

pred(datatype, field, name, context, defaultBase, ...)

process_type(t, g, context, defaultBase, namespaces, ...)

salad_to_jsonld_context(j, schema_ctx)

fix_jsonld_ids(obj, ids)

Add missing identity entries.

makerdf(workflow, wf, ctx[, graph])

Module Contents

schema_salad.jsonld_context.pred(datatype, field, name, context, defaultBase, namespaces)
Parameters:
Return type:

dict[str, str | None] | str

schema_salad.jsonld_context.process_type(t, g, context, defaultBase, namespaces, defaultPrefix)
Parameters:
Return type:

None

schema_salad.jsonld_context.salad_to_jsonld_context(j, schema_ctx)
Parameters:
Return type:

tuple[schema_salad.utils.ContextType, rdflib.Graph]

schema_salad.jsonld_context.fix_jsonld_ids(obj, ids)

Add missing identity entries.

Parameters:
  • obj (ruamel.yaml.comments.CommentedMap | float | str | ruamel.yaml.comments.CommentedSeq)

  • ids (list[str])

Return type:

None

schema_salad.jsonld_context.makerdf(workflow, wf, ctx, graph=None)
Parameters:
  • workflow (str | None)

  • wf (ruamel.yaml.comments.CommentedMap | float | str | ruamel.yaml.comments.CommentedSeq)

  • ctx (schema_salad.utils.ContextType)

  • graph (rdflib.Graph | None)

Return type:

rdflib.Graph