Utilities to connect Raphael and Donatello.
Utilities to connect Raphael and Donatello.
A flag to indicate that nil bases or namespaces should result in no base or namespace to be written. The default is to maintain the existing base and namespace if none are specified.
A flag to indicate that nil bases or namespaces should result in no base or namespace to be written. The default is to maintain the existing base and namespace if none are specified.
(add-all idx st)
Inserts all triples in a sequence into a nested map
Inserts all triples in a sequence into a nested map
(index-add idx [a b c])
Merges a single triple into a nested map
Merges a single triple into a nested map
(parsed-graph {:keys [base namespaces triples] :as parsed})
Converts a graph parsed by Raphel into a nested map, with metadata for the prefixes and base.
Converts a graph parsed by Raphel into a nested map, with metadata for the prefixes and base.
(round-trip-generator)
Creates a new RoundTripGenerator
Creates a new RoundTripGenerator
(simple-graph triples)
Creates a nested-map version of a graph from a sequence of triples
Creates a nested-map version of a graph from a sequence of triples
(transform-file infile tx-fn outfile)
Transforms a TTL file. Accepts an input filename, a transforming function, and an output filename. The transforming function receives:
:namespaces
and :base
Both the base and namespaces are optional to return. If they are not returned, then the
previous base and namespaces will be used, unless no-default has been set.Transforms a TTL file. Accepts an input filename, a transforming function, and an output filename. The transforming function receives: - graph: the graph to transform. - namespaces: The prefix namespaces of of the graph. - base: The base of the graph. The result may be one of: - a vector of: [new-graph namespaces base] - a graph with a meta map of `:namespaces` and `:base` Both the base and namespaces are optional to return. If they are not returned, then the previous base and namespaces will be used, unless *no-default* has been set.
(transform-string in tx-fn)
Transforms a string containing TTL. Accepts an input string, and a transforming function. Returns a string containing the transformed TTL. The transforming function receives:
:namespaces
and :base
Both the base and namespaces are optional to return. If they are not returned, then the
previous base and namespaces will be used, unless no-default has been set.Transforms a string containing TTL. Accepts an input string, and a transforming function. Returns a string containing the transformed TTL. The transforming function receives: - graph: the graph to transform. - namespaces: The prefix namespaces of of the graph. - base: The base of the graph. The result may be one of: - a vector of: [new-graph namespaces base] - a graph with a meta map of `:namespaces` and `:base` Both the base and namespaces are optional to return. If they are not returned, then the previous base and namespaces will be used, unless *no-default* has been set.
(uri s)
(write-graph out g)
(write-graph out g {:keys [namespaces base]})
(write-graph out g namespaces base)
Writes a parsed graph to a stream as Turtle. out - An OutputStream to write to. g - The graph to write. Tha base and namespace prefixes for the graph may included as:
:namespaces
and :base
).Writes a parsed graph to a stream as Turtle. out - An OutputStream to write to. g - The graph to write. Tha base and namespace prefixes for the graph may included as: - metadata (as a map with keys of `:namespaces` and `:base`). - a map (as per the metadata map). - as individual arguments.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close