Liking cljdoc? Tell your friends :D

ont-app.sparql-client.core


add-triples-queryclj

(add-triples-query client triples)
source

add-update-templateclj

source

as-query-clauseclj

(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>]
sourceraw docstring

as-rdfclj

(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`
sourceraw docstring

ask-endpointclj

(ask-endpoint client query)
source

ask-if-graph-exists-templateclj

source

ask-s-p-oclj

(ask-s-p-o client s p o)
source

ask-s-p-o-templateclj

source

bnode-kwi?clj

(bnode-kwi? kwi)

True when kwi matches output of bnode-translator.

True when `kwi` matches output of `bnode-translator`.
sourceraw docstring

bnode-translatorclj

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

check-authclj

(check-auth m)
source

check-auth-valueclj

(check-auth-value k v)
source

check-ns-metadataclj

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

check-qnameclj

(check-qname uri-spec)
source

count-subjectsclj

(count-subjects client)
source

count-subjects-query-templateclj

source

create-graph-templateclj

source

datatype-translatorclj

(datatype-translator sparql-binding)
source

default-binding-translatorsclj

source

form-translatorclj

(form-translator sparql-binding)
source

kwi-forclj

Issues a warning if no ns metadata is found for the URI

Issues a warning if no ns metadata is found for the URI
sourceraw docstring

load-rdf-filecljmultimethod

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

make-sparql-readerclj

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

make-sparql-updaterclj

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

normal-form-query-templateclj

source

ontologyclj

source

prefixedclj

source

property-pathclj

(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`.
sourceraw docstring

query-endpointclj

(query-endpoint client query)
source

query-for-normal-formclj

(query-for-normal-form client)
source

query-for-oclj

(query-for-o client s p)
source

query-for-o-templateclj

source

query-for-p-oclj

(query-for-p-o client s)
source

query-for-p-o-templateclj

source

query-for-subjectsclj

(query-for-subjects client)
source

quote-strclj

(quote-str s)
source

rdf-bnodeclj

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

read-transit-jsonclj

(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 &quot;-escaped string encoded as transit
Note: custom datatypes will be informed by @transit-read-handlers
sourceraw docstring

remove-triples-queryclj

(remove-triples-query client triples)
source

remove-update-templateclj

source

render-literalcljmultimethod

Returns an RDF (Turtle) rendering of literal

Returns an RDF (Turtle) rendering of `literal`
sourceraw docstring

render-literal-as-transit-jsonclj

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

render-literal-dispatchclj

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

render-transit-jsonclj

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

SparqlReaderclj

source

SparqlUpdaterclj

source

subjects-query-templateclj

source

theclj

source

transit-read-handlersclj

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`.
sourceraw docstring

transit-write-handlersclj

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>, ...}
sourceraw docstring

update-endpointclj

(update-endpoint client update)
source

uri-translatorclj

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

warn-on-no-ns-metadata-for-kwi?clj

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`.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close