Liking cljdoc? Tell your friends :D

ont-app.rdf.core

clj

This is a backstop for shared logic between various RDF-based implementations of IGraph. It includes:

  • support for LangStr using the #lstr custom reader
  • support for ^^transit:json datatype tags
  • templating utilities for the standard IGraph member access methods.
This is a backstop for shared logic between various RDF-based
  implementations of IGraph. 
It includes:
- support for LangStr using the #lstr custom reader
- support for ^^transit:json datatype tags
- templating utilities for the standard IGraph member access methods.
 
raw docstring

ask-s-p-oclj/s

(ask-s-p-o ask-fn rdf-store s p o)
(ask-s-p-o graph-uri ask-fn rdf-store s p o)

Returns true if s p o is a triple at endpoint of rdf-store Where: s p o are subject, predicate and object rdf-store is an RDF store graph-uri is a URI or KWI naming the graph (or nil if DEFAULT graph) ask-fn := fn [repo] -> bindings

Returns true if `s` `p` `o` is a triple at endpoint of `rdf-store`
Where:
  `s` `p` `o` are subject, predicate and object
  `rdf-store` is an RDF store
  `graph-uri` is a URI or KWI naming the graph (or nil if DEFAULT graph)
  `ask-fn` := fn [repo] -> bindings
sourceraw docstring

bnode-kwi?clj/s

(bnode-kwi? kwi)

True when kwi matches output of bnode-translator.

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

check-ns-metadataclj/s

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

(check-qname uri-spec)

Traps the keyword assertion error in voc and throws a more meaningful error about blank nodes not being supported as first-class identifiers.

Traps the keyword assertion error in voc and throws a more meaningful error 
about blank nodes not being supported as first-class identifiers.
sourceraw docstring

on-js-reloadcljs

(on-js-reload)
source

ontologyclj/s

The supporting vocabulary for the RDF module

The supporting vocabulary for the RDF module
sourceraw docstring

prefixedclj/s

Returns query, with prefixe declarations prepended Where

  • query is a SPARQL query
Returns `query`, with prefixe declarations prepended
Where
- `query` is a SPARQL query
sourceraw docstring

query-for-normal-formclj/s

(query-for-normal-form query-fn rdf-store)
(query-for-normal-form graph-uri query-fn rdf-store)

Returns IGraph normal form for graph named by graph-uri in rdf-store Where graph is a named graph in rdf-store graph-uri is a URI or KWI naming the graph (default nil -> DEFAULT graph) rdf-store is an RDF store query-fn := fn [rdf-store sparql-query] -> #{bmap, ...} bmap := {:?s :?p :?o} sparql-query :- normal-form-query-template

Returns IGraph normal form for `graph` named by `graph-uri` in `rdf-store`
Where
`graph` is a named graph in `rdf-store`
`graph-uri` is a URI or KWI naming the graph (default nil -> DEFAULT graph)
`rdf-store` is an RDF store 
`query-fn` := fn [rdf-store sparql-query] -> #{`bmap`, ...}
`bmap` := {:?s :?p :?o}
`sparql-query` :- `normal-form-query-template`
sourceraw docstring

query-for-oclj/s

(query-for-o query-fn rdf-store s p)
(query-for-o graph-uri query-fn rdf-store s p)

Returns #{o...} for s and p at endpoint of rdf-store Where: o is an object rendered per binding translator of rdf-store s is a subject URI rendered per binding translator of rdf-store p is a predicate URI rendered per binding translator of rdf-store rdf-store is an RDF store query-fn := fn [repo] -> bindings graph-uri is a URI or KWI naming the graph (or nil if DEFAULT graph)

Returns #{`o`...} for `s` and `p` at endpoint of `rdf-store`
Where:
  `o` is an object rendered per binding translator of `rdf-store`
  `s` is a subject URI rendered per binding translator of `rdf-store`
  `p` is a predicate URI rendered per binding translator of `rdf-store`
  `rdf-store` is an RDF store
  `query-fn` := fn [repo] -> bindings
  `graph-uri` is a URI or KWI naming the graph (or nil if DEFAULT graph)
  
sourceraw docstring

query-for-p-oclj/s

(query-for-p-o query-fn rdf-store s)
(query-for-p-o graph-uri query-fn rdf-store s)

Returns {p #{o...}...} for s at endpoint of rdf-store Where p is a predicate URI rendered per binding translator of rdf-store o is an object value, rendered per the binding translator of rdf-store s is a subject uri keyword. ~ voc/voc-re rdf-store is and RDF store. query-fn := fn [repo] -> bindings graph-uri is a URI or KWI naming the graph (or nil if DEFAULT graph)

Returns {`p` #{`o`...}...} for `s` at endpoint of `rdf-store`
Where
  `p` is a predicate URI rendered per binding translator of `rdf-store`
  `o` is an object value, rendered per the binding translator of `rdf-store`
  `s` is a subject uri keyword. ~ voc/voc-re
  `rdf-store` is and RDF store.
  `query-fn` := fn [repo] -> bindings
  `graph-uri` is a URI or KWI naming the graph (or nil if DEFAULT graph)
sourceraw docstring

query-for-subjectsclj/s

(query-for-subjects query-fn rdf-store)
(query-for-subjects graph-uri query-fn rdf-store)

Returns [subject ...] at endpoint of rdf-store Where subject is the uri of a subject from rdf-store, rendered per the binding translator of rdf-store rdf-store conforms to ::sparql-client spec query-fn := fn [repo] -> bindings graph-uri is a URI or KWI naming the graph (or nil if DEFAULT graph)

Returns [`subject` ...] at endpoint of `rdf-store`
Where
  `subject` is the uri of a subject from `rdf-store`, 
  rendered per the binding translator of `rdf-store`
  `rdf-store` conforms to ::sparql-client spec
  `query-fn` := fn [repo] -> bindings
  `graph-uri` is a URI  or KWI naming the graph  (or nil if DEFAULT graph)
sourceraw docstring

quote-strclj/s

(quote-str s)

Returns s, in escaped quotation marks. Where s is a string, typically to be rendered in a query or RDF source.

Returns `s`, in escaped quotation marks.
Where
`s` is a string, typically to be rendered in a query or RDF source.
sourceraw docstring

read-transit-jsonclj/s

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

render-literalclj/smultimethod

Returns an RDF (Turtle) rendering of literal

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

render-literal-as-transit-jsonclj/s

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

(render-literal-dispatch literal)

Returns a key for the render-literal method to dispatch on given literal Where literal is any non-keyword NOTE: LangStr and non-nil special-dispatch 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: LangStr and non-nil `special-dispatch` are special cases; otherwise
  (type `literal`)
sourceraw docstring

render-transit-jsonclj/s

(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

special-literal-dispatchclj/s

A function [x] -> dispatch-value Where x is any value, probabaly an RDF literal dispatch-value is a value to be matched to a render-literal-dispatch method. Default is to return nil, signalling no special dispatch.

A function [x] -> `dispatch-value`
Where
`x` is any value, probabaly an RDF literal
`dispatch-value` is a value to be matched to a render-literal-dispatch method.
Default is to return nil, signalling no special dispatch.
sourceraw docstring

transit-reclj/s

Matches data tagged as transit:json

Matches data tagged as transit:json
sourceraw docstring

transit-read-handlersclj/s

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/s

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

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

× close