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:

Union[Dict[str, Optional[str]], 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:
  • j (Iterable[MutableMapping[str, Any]])

  • schema_ctx (MutableMapping[str, Any])

Return type:

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

schema_salad.jsonld_context.fix_jsonld_ids(obj, ids)

Add missing identity entries.

Parameters:
  • obj (Union[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 (Optional[str])

  • wf (Union[ruamel.yaml.comments.CommentedMap, float, str, ruamel.yaml.comments.CommentedSeq])

  • ctx (schema_salad.utils.ContextType)

  • graph (Optional[rdflib.Graph])

Return type:

rdflib.Graph