DEPRECATED. Use grafter.rdf4j.formats instead, this namespace contains the old sesame implementation.
Functions & Protocols for serializing Grafter Statements to (and from) any Linked Data format supported by Sesame.
DEPRECATED. Use grafter.rdf4j.formats instead, this namespace contains the old sesame implementation. Functions & Protocols for serializing Grafter Statements to (and from) any Linked Data format supported by Sesame.
(filename->rdf-format fname)
DEPRECATED: Use grafter.rdf.formats/filename->rdf-format instead.
Given a filename we attempt to return an appropriate RDFFormat object based on the files extension.
DEPRECATED: Use grafter.rdf.formats/filename->rdf-format instead. Given a filename we attempt to return an appropriate RDFFormat object based on the files extension.
(->sesame-rdf-type this)
Convert a native type into a Sesame RDF Type
Convert a native type into a Sesame RDF Type
(sesame-rdf-type->type this)
Convert a Sesame RDF Type into a Native Type
Convert a Sesame RDF Type into a Native Type
(IStatement->sesame-statement is)
Convert a grafter IStatement into a Sesame statement.
Convert a grafter IStatement into a Sesame statement.
(language s lang)
Create an RDF langauge string out of a value string and a given language tag. Language tags should be keywords representing the country code, e.g.
(language "Bonsoir" :fr)
Create an RDF langauge string out of a value string and a given language tag. Language tags should be keywords representing the country code, e.g. (language "Bonsoir" :fr)
(literal val datatype-uri)
You can use this to declare an RDF typed literal value along with its URI. Note that there are implicit coercions already defined for many core clojure/java datatypes, so for common datatypes you shounld't need this.
You can use this to declare an RDF typed literal value along with its URI. Note that there are implicit coercions already defined for many core clojure/java datatypes, so for common datatypes you shounld't need this.
A multimethod to convert an RDF literal into a corresponding Clojure type. This method can be extended to provide custom conversions.
A multimethod to convert an RDF literal into a corresponding Clojure type. This method can be extended to provide custom conversions.
(mimetype->rdf-format mime-type)
DEPRECATED: Use grafter.rdf.formats/mimetype->rdf-format instead.
Given a mimetype string we attempt to return an appropriate RDFFormat object based on the files extension.
DEPRECATED: Use grafter.rdf.formats/mimetype->rdf-format instead. Given a mimetype string we attempt to return an appropriate RDFFormat object based on the files extension.
(rdf-serializer 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 RDFSerializer.
Use this to capture the intention to write to a location in a specific RDF format, e.g.
(grafter.rdf/add (rdf-serializer "/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 sesame RDFFormat object.
: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 RDFSerializer. Use this to capture the intention to write to a location in a specific RDF format, e.g. (grafter.rdf/add (rdf-serializer "/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 sesame RDFFormat object. - :encoding The character encoding to be used (default: UTF-8) - :prefixes A map of RDF prefix names to URI prefixes.
(sesame-statement->IStatement st)
Convert a sesame Statement into a grafter Quad.
Convert a sesame Statement into a grafter Quad.
(->sesame-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