Defines GrafterGraph
record, which implements the IGraph
,
IGraphMutable
and IFn
protocols.
Defines `GrafterGraph` record, which implements the `IGraph`, `IGraphMutable` and `IFn` protocols.
(ask-query conn query-string)
Returns true/false for query-string
posed to conn
Returns true/false for `query-string` posed to `conn`
(bnode-kwi bnode)
Returns KWI for bnode
Where
<bnode> is an instance of grafter_2.rdf.protocols.BNode
Returns KWI for `bnode` Where <bnode> is an instance of grafter_2.rdf.protocols.BNode
(collect-kwis-and-literals macc k v)
Returns macc
' substituing v
-> <v'>
Where
<macc> := {<k> <v'>, ...}, translated from a binding map from a query
<k> is a var in a query, :~ ':?.'
<v> is the raw value bound to <k> by the query response
<v'> is the translation of <v> into idiomatic igraph datatypes:
URIs -> KWIs
<data-time string> -> #inst ....
{:lang ... :string ...} #lstr <string>@<lang>
.^^transit:json -> decoded transit
Otherwise, just <v>
Returns `macc`' substituing `v` -> <v'> Where <macc> := {<k> <v'>, ...}, translated from a binding map from a query <k> is a var in a query, :~ ':?.*' <v> is the raw value bound to <k> by the query response <v'> is the translation of <v> into idiomatic igraph datatypes: URIs -> KWIs <data-time string> -> #inst .... {:lang ... :string ...} #lstr <string>@<lang> .*^^transit:json -> decoded transit Otherwise, just <v>
Matches the date-time-str encoded for #inst's, e.g. '2000-01-01T00:00:00Z'
Matches the date-time-str encoded for #inst's, e.g. '2000-01-01T00:00:00Z'
(interpret-query conn query-string)
Returns (<bmap'>, ...) returned from query-string
posed to conn
Where
<query-string> is a SPARQL query
<conn> is a grafter connection implementing the proper interfaces for a query
<bmap'> := <bmap>, with datatypes translated to idiomatic igraph clojure objects
as appropriate, per the collect-kwis-and-literals
function.
<bmap> is a binding map returned by posing <query-string> to <conn>
Returns (<bmap'>, ...) returned from `query-string` posed to `conn` Where <query-string> is a SPARQL query <conn> is a grafter connection implementing the proper interfaces for a query <bmap'> := <bmap>, with datatypes translated to idiomatic igraph clojure objects as appropriate, per the `collect-kwis-and-literals` function. <bmap> is a binding map returned by posing <query-string> to <conn>
(make-graph conn graph-kwi)
Returns an instance of GrafterGraph
for conn
and graph-kwi
Where
<conn> is a SailRepositoryconnection
<graph-kwi> is a keyword mapped to a URI by voc namespace metadata, or nil
to specify the DEFAULT graph.
See also the documentation for ont-app.vocabulary.core for discussion of
KWIs.
Returns an instance of `GrafterGraph` for `conn` and `graph-kwi` Where <conn> is a SailRepositoryconnection <graph-kwi> is a keyword mapped to a URI by voc namespace metadata, or nil to specify the DEFAULT graph. See also the documentation for ont-app.vocabulary.core for discussion of KWIs.
(render-element elt)
Returns either a URI or a literal to be added to a graph
Returns either a URI or a literal to be added to a graph
(special-literal-dispatch x)
Returns :rdf-app/Instant, :rdf-app/DatatypeURI or nil for x
.
Where
<x> is a literal value
:rdf-app/Instant
triggers handling of an #inst
:rdf-app/DatatypeURI
triggers handling as an xsd value or other ^^datatype.
nil
signals handling with standard logic for literals per
rdf-app/render-literal-dispatch
Returns :rdf-app/Instant, :rdf-app/DatatypeURI or nil for `x`. Where <x> is a literal value `:rdf-app/Instant` triggers handling of an #inst `:rdf-app/DatatypeURI` triggers handling as an xsd value or other ^^datatype. `nil` signals handling with standard logic for literals per `rdf-app/render-literal-dispatch`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close