aamedina/rdf

Use RDFa and JSON-LD vocabulary to describe all Clojure metadata

aamedina opened this issue · 1 comments

Problem:
Right now I use a made up attribute :rdf/ns-prefix-map to annotate a namespace with its prefixes. This is non-standard and can't be represented in RDF automatically.

Solution:
Instead, I think it should be something that I can embed in the :owl/Ontology instance directly with RDFa microdata combined with JSON-LD vocabulary.

{:rdf/type :owl/Ontology
 "@context" {"ex" "http://example.com/"}}

The "@context" key can be processed by JSON-LD processors to expand into a JSON-LD context.

Alternative:
I was also thinking of using a reader macro like #jsonld/Context {...} but to include that in the ontology is too verbose I think.

{:rdf/type :owl/Ontology
 :jsonld/context #jsonld/Context {"ex" "http://example.com/"}}

the reader macro would expand into something like:

{:rdf/type          :jsonld/Context
 :jsonld/definition [{:rdf/type    :jsonld/TermDefinition
                           :jsonld/term "ex"
                           :jsonld/id   {:rdfa/uri "http://example.com/"}}]}

Questions:
Does sh:declare fit into this?

I'm not going to use RDF to describe this metadata