Renders character schemas and data to semantic web formats.
Supports exporting:
- OWL/RDF-XML - Schema (TBox) as OWL ontology
- RDF Triples - Data (ABox) as N-Triples or Turtle
- JSON-LD - Combined schema context + data for APIs
Namespace
The default namespace is http://jido.ai/character#. Override with the :namespace option.
Examples
# Export schema as OWL
Jido.Character.Ontology.Renderer.to_owl()
# Export character as RDF triples
{:ok, char} = Jido.Character.new(%{name: "Alex"})
Jido.Character.Ontology.Renderer.to_rdf(char)
# Export as JSON-LD
Jido.Character.Ontology.Renderer.to_jsonld(char)
Summary
Functions
Returns the list of ontology classes.
Returns the list of datatype properties.
Returns the list of object properties.
Exports a character as JSON-LD with embedded context.
Exports the character ontology schema as OWL/RDF-XML.
Exports a character as RDF triples.
Functions
Returns the list of ontology classes.
Returns the list of datatype properties.
Returns the list of object properties.
Exports a character as JSON-LD with embedded context.
Options
:namespace- Base namespace URI (default:http://jido.ai/character#)
Examples
iex> {:ok, char} = Jido.Character.new(%{name: "Alex"})
iex> jsonld = Jido.Character.Ontology.Renderer.to_jsonld(char)
iex> is_map(jsonld)
true
Exports the character ontology schema as OWL/RDF-XML.
Options
:namespace- Base namespace URI (default:http://jido.ai/character#)
Examples
iex> owl = Jido.Character.Ontology.Renderer.to_owl()
iex> String.contains?(owl, "owl:Class")
true
Exports a character as RDF triples.
Options
:namespace- Base namespace URI (default:http://jido.ai/character#):format- Output format::ntriples(default) or:turtle
Examples
iex> {:ok, char} = Jido.Character.new(%{name: "Alex"})
iex> triples = Jido.Character.Ontology.Renderer.to_rdf(char)
iex> String.contains?(triples, "rdf:type")
true