Liking cljdoc? Tell your friends :D

grafter.rdf.io

Functions & Protocols for serializing Grafter Statements to (and from) any Linked Data format supported by Sesame.

Functions & Protocols for serializing Grafter Statements to (and from)
any Linked Data format supported by Sesame.
raw docstring

default-prefixesclj


filename->rdf-formatcljdeprecated

(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.
raw docstring

ISesameRDFConvertercljprotocol

->sesame-rdf-typeclj

(->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->typeclj

(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-statementclj

(IStatement->sesame-statement is)

Convert a grafter IStatement into a Sesame statement.

Convert a grafter IStatement into a Sesame statement.
raw docstring

languageclj

(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)
raw docstring

literalclj

(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.
raw docstring

literal-datatype->typecljmultimethod

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.
raw docstring

mimetype->rdf-formatcljdeprecated

(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.
raw docstring

rdf-serializerclj

(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.
raw docstring

sesame-statement->IStatementclj

(sesame-statement->IStatement st)

Convert a sesame Statement into a grafter Quad.

Convert a sesame Statement into a grafter Quad.
raw docstring

ToSesameURIcljprotocol

->sesame-uriclj

(->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