Functions & Protocols for serializing Grafter Statements to (and from) any Linked Data format supported by RDF4j.
Functions & Protocols for serializing Grafter Statements to (and from) any Linked Data format supported by RDF4j.
A multimethod to convert a backend RDF literal into a corresponding Clojure type. This method can be extended to provide custom conversions. You should typically not need to call this directly, instead see backend-quad->grafter-quad.
A multimethod to convert a backend RDF literal into a corresponding Clojure type. This method can be extended to provide custom conversions. You should typically not need to call this directly, instead see backend-quad->grafter-quad.
(backend-quad->grafter-quad st)
Convert an RDF4j backend quad into a grafter Quad.
Convert an RDF4j backend quad into a grafter Quad.
A default set of common prefixes
A default set of common prefixes
(->backend-type this)
Convert an arbitrary statement type into an RDF4j Statement type
Convert an arbitrary statement type into an RDF4j Statement type
(quad->backend-quad is)
Convert a grafter IStatement into a backend (RDF4j) statement type.
Convert a grafter IStatement into a backend (RDF4j) statement type.
(rdf-writer destination
&
{:keys [append format encoding prefixes]
:or {append false encoding "UTF-8" prefixes default-prefixes}})
Coerces destination into an java.io.Writer using clojure.java.io/writer and returns an RDFWriter.
Use this to capture the intention to write to a location in a specific RDF format, e.g.
(grafter.rdf/add (rdf-writer "/tmp/foo.nt" :format :nt) quads)
Accepts also the following optional options:
:append If set to true it will append new values to the end of
the file destination (default: false
).
:format If a String or a File are provided the format parameter can be optional (in which case it will be infered from the file extension). This should be a clojure keyword representing the format extension e.g. :nt.
:encoding The character encoding to be used (default: UTF-8)
:prefixes A map of RDF prefix names to URI prefixes.
Coerces destination into an java.io.Writer using clojure.java.io/writer and returns an RDFWriter. Use this to capture the intention to write to a location in a specific RDF format, e.g. (grafter.rdf/add (rdf-writer "/tmp/foo.nt" :format :nt) quads) Accepts also the following optional options: - :append If set to true it will append new values to the end of the file destination (default: `false`). - :format If a String or a File are provided the format parameter can be optional (in which case it will be infered from the file extension). This should be a clojure keyword representing the format extension e.g. :nt. - :encoding The character encoding to be used (default: UTF-8) - :prefixes A map of RDF prefix names to URI prefixes.
(->rdf4j-uri this)
Coerce an object into a sesame URIImpl
Coerce an object into a sesame URIImpl
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close