(as-query-clause var-fn partial-triple)
Returns a clause of SPARQL with variables to fill out the rest of partial-triple
Where
<partial-triple> := [<s>] or [<s> <p>]
Returns a clause of SPARQL with variables to fill out the rest of `partial-triple` Where <partial-triple> := [<s>] or [<s> <p>]
(as-rdf igraph-vector)
Returns a clause of rdf for igraph-vector
, using render-literal
Where
<igraph-vector> := [<s> <p> <o> & maybe <p> <o>, ...]
<render-literal> := (fn [o] ...) -> parsable rendering of <o> if <o> is
not a KWI (which would be treated as a URI and we'd use voc/qname-for)
This is optional. Default is render-standard-literal
Returns a clause of rdf for `igraph-vector`, using `render-literal` Where <igraph-vector> := [<s> <p> <o> & maybe <p> <o>, ...] <render-literal> := (fn [o] ...) -> parsable rendering of <o> if <o> is not a KWI (which would be treated as a URI and we'd use voc/qname-for) This is optional. Default is `render-standard-literal`
(bnode-kwi? kwi)
True when kwi
matches output of bnode-translator
.
True when `kwi` matches output of `bnode-translator`.
(bnode-translator query-url graph-uri sparql-binding)
Returns <bnode-keyword> for sparql-binding
Where
<bnode-keyword> is a keyword guaranteed to be unique even if merged
with data from other endpoints and graphs
<sparql-binding> := {'type' 'bnode', :value ..., ...}, typically returned
from a query
<query-url> is the URL of the query endpoint
<graph-uri> is the URI of the graph
Returns <bnode-keyword> for `sparql-binding` Where <bnode-keyword> is a keyword guaranteed to be unique even if merged with data from other endpoints and graphs <sparql-binding> := {'type' 'bnode', :value ..., ...}, typically returned from a query <query-url> is the URL of the query endpoint <graph-uri> is the URI of the graph
(check-ns-metadata kwi)
Logs a warning when kwi
is in a namespace with no metadata.
Logs a warning when `kwi` is in a namespace with no metadata.
Issues a warning if no ns metadata is found for the URI
Issues a warning if no ns metadata is found for the URI
Returns <file-uri> for path
Side-effect: loads contents of <file-uri> into (:graph-uri g
)
Where
<file-uri> is a uri for <path>
<path> identifies a file containing RDF
<g> has a update-endpoint method.
Returns <file-uri> for `path` Side-effect: loads contents of <file-uri> into (:graph-uri `g`) Where <file-uri> is a uri for <path> <path> identifies a file containing RDF <g> has a update-endpoint method.
(make-sparql-reader & {:keys [graph-uri query-url binding-translator auth]})
Returns an instance of SparqlReader. Where <graph-uri> is the named graph within the SPARQL endpoint. nil implies DEFAULT <query-url> is the query endpoint <binding-translator> := {:uri <uri-fn> :lang <lang-fn> :datatype <datatype-fn>} default is sparql-endpoint.core/default-translators) <auth> (optional) is the authorization token needed to perform updates <uri-fn> := (fn [binding]...) -> URI representation. Default is just the URI string <lang-fn> := (fn [binding] ...) -> parsed language tag. Default is just the language string with no <datatype-fn> := (fn [binding] -> Parsed datatype <binding> := {:value ... :type ... &maybe :xml:lang ... :datatype ...} This occurs in bindings of the form {<var> <binding>, ...} returned by a SPARQL query. See also sparql-endpoint.core.
Returns an instance of SparqlReader. Where <graph-uri> is the named graph within the SPARQL endpoint. nil implies DEFAULT <query-url> is the query endpoint <binding-translator> := {:uri <uri-fn> :lang <lang-fn> :datatype <datatype-fn>} default is sparql-endpoint.core/default-translators) <auth> (optional) is the authorization token needed to perform updates <uri-fn> := (fn [binding]...) -> URI representation. Default is just the URI string <lang-fn> := (fn [binding] ...) -> parsed language tag. Default is just the language string with no <datatype-fn> := (fn [binding] -> Parsed datatype <binding> := {:value ... :type ... &maybe :xml:lang ... :datatype ...} This occurs in bindings of the form {<var> <binding>, ...} returned by a SPARQL query. See also sparql-endpoint.core.
(make-sparql-updater &
{:keys [graph-uri query-url binding-translator update-url
auth]})
Returns an instance of SparqlUpdater. Where <graph-uri> is the named graph within the SPARQL endpoint. nil implies DEFAULT <query-url> is the query endpoint <binding-translator> := {:uri <uri-fn> :lang <lang-fn> :datatype <datatype-fn>} default is sparql-endpoint.core/default-translators) <update-url> (optional) is update endpoint (or nil if read-only) <auth> (optional) is the authorization token needed to perform updates <uri-fn> := (fn [binding]...) -> URI representation. Default is just the URI string <lang-fn> := fn [binding] -> parsed language tag. Default is just the language string <datatype-fn> := fn [binding] -> Parsed datatype <binding> := {:value ... :type ... &maybe :xml:lang ... :datatype ...} This occurs in bindings of the form {<var> <binding>, ...} returned by a SPARQL query. See also sparql-endpoint.core.
Returns an instance of SparqlUpdater. Where <graph-uri> is the named graph within the SPARQL endpoint. nil implies DEFAULT <query-url> is the query endpoint <binding-translator> := {:uri <uri-fn> :lang <lang-fn> :datatype <datatype-fn>} default is sparql-endpoint.core/default-translators) <update-url> (optional) is update endpoint (or nil if read-only) <auth> (optional) is the authorization token needed to perform updates <uri-fn> := (fn [binding]...) -> URI representation. Default is just the URI string <lang-fn> := fn [binding] -> parsed language tag. Default is just the language string <datatype-fn> := fn [binding] -> Parsed datatype <binding> := {:value ... :type ... &maybe :xml:lang ... :datatype ...} This occurs in bindings of the form {<var> <binding>, ...} returned by a SPARQL query. See also sparql-endpoint.core.
(property-path path)
Returns fn [g c a q] -> c a' q' for path
Where
<g> is an sparql update client
<c> is a tranversal context
<a> is an accumulator (typically a set)
<a'> has been conj'ed with the ?o
bindings <query>
<q> is an input q to the traversal
<q'> is the rest of <q>
<path> is a SPARQL property path, e.g. 'myns:prop1/myns:prop2'
<query> is query-for-o-template
, with (first <q>) as subject and <path>
as the predicate. This binds a single var ?o
.
Returns fn [g c a q] -> c a' q' for `path` Where <g> is an sparql update client <c> is a tranversal context <a> is an accumulator (typically a set) <a'> has been conj'ed with the `?o` bindings <query> <q> is an input q to the traversal <q'> is the rest of <q> <path> is a SPARQL property path, e.g. 'myns:prop1/myns:prop2' <query> is `query-for-o-template`, with (first <q>) as subject and <path> as the predicate. This binds a single var `?o`.
(rdf-bnode kwi)
Returns RDF string for kwi
suitable for use as an element in an
INSERT clause.
Returns RDF string for `kwi` suitable for use as an element in an INSERT clause.
(read-transit-json s)
Returns a value parsed from transit string s
Where
<s> is a "-escaped string encoded as transit
Note: custom datatypes will be informed by @transit-read-handlers
Returns a value parsed from transit string `s` Where <s> is a "-escaped string encoded as transit Note: custom datatypes will be informed by @transit-read-handlers
Returns an RDF (Turtle) rendering of literal
Returns an RDF (Turtle) rendering of `literal`
(render-literal-as-transit-json x)
Returns 'x^^transit:json' NOTE: this will be encoded on write and decoded on read by the cognitect/transit library.
Returns 'x^^transit:json' NOTE: this will be encoded on write and decoded on read by the cognitect/transit library.
(render-literal-dispatch literal)
Returns a key for the render-literal method to dispatch on given literal
Where
<literal> is any non-keyword
NOTE: ::instant and ::xsd-type are special cases, otherwise (type <literal>)
Returns a key for the render-literal method to dispatch on given `literal` Where <literal> is any non-keyword NOTE: ::instant and ::xsd-type are special cases, otherwise (type <literal>)
(render-transit-json value)
Returns a string of transit for value
Where
<value> is any value that be handled by cognitict/transit
Note: custom datatypes will be informed by @transit-write-handlers
Returns a string of transit for `value` Where <value> is any value that be handled by cognitict/transit Note: custom datatypes will be informed by @transit-write-handlers
Atom of the form {<className> <read-handler>
Where
<className> is a fully qualified string naming a class to be encoded
<read-handler> := fn [from-rep] -> <instance>
<from-rep> := an Object s.t. (<field> from-rep), encoded in corresponding
write-handler in @transit-write-handlers
.
Atom of the form {<className> <read-handler> Where <className> is a fully qualified string naming a class to be encoded <read-handler> := fn [from-rep] -> <instance> <from-rep> := an Object s.t. (<field> from-rep), encoded in corresponding write-handler in @`transit-write-handlers`.
Atom of the form {<Class> <write-handler>, ...} Where <Class> is a direct reference to the class instance to be encoded <write-handler> := fn [s] -> {<field> <value>, ...}
Atom of the form {<Class> <write-handler>, ...} Where <Class> is a direct reference to the class instance to be encoded <write-handler> := fn [s] -> {<field> <value>, ...}
(uri-translator sparql-binding)
Returns <qualified-keyword> for sparql-binding
Where
<qualified-keyword> is a keyword in voc-re format
<sparql-binding> := {?value ...}, typically returned from a query
<query-url> is the URL of the query endpoint
<graph-uri> is the URI of the graph
NOTE: <query-url> and <graph-uri> are used to handle blank nodes.
Returns <qualified-keyword> for `sparql-binding` Where <qualified-keyword> is a keyword in voc-re format <sparql-binding> := {?value ...}, typically returned from a query <query-url> is the URL of the query endpoint <graph-uri> is the URI of the graph NOTE: <query-url> and <graph-uri> are used to handle blank nodes.
True when we should warn if there is no ns metadata found for the URI
being translated into a KWI in kwi-for
.
True when we should warn if there is no ns metadata found for the URI being translated into a KWI in `kwi-for`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close