Liking cljdoc? Tell your friends :D

zuko.entity.writer

Converts external data into a graph format (triples).

Converts external data into a graph format (triples).
raw docstring

*current-graph*clj/s

source

*id-map*clj/s

source

containership-triplesclj/s

(containership-triples node triples)

Inputs: [node :- s/Any triples :- [Triple]]

Finds the list of entity nodes referred to in a list and builds triples describing a flat 'contains' property

Inputs: [node :- s/Any triples :- [Triple]]

Finds the list of entity nodes referred to in a list and builds
 triples describing a flat 'contains' property
sourceraw docstring

entities->triplesclj/s≠

clj
(entities->triples graph entities)
(entities->triples graph entities id-map)
cljs
(entities->triples G__17084 G__17085)
(entities->triples G__17089 G__17090 G__17091)

Inputs: ([graph :- GraphType entities :- [EntityMap]] [graph :- GraphType entities :- [EntityMap] id-map :- #:s{Any s/Any}]) Returns: [Triple]

Converts objects into a sequence of triples.

Inputs: ([graph :- GraphType entities :- [EntityMap]] [graph :- GraphType entities :- [EntityMap] id-map :- #:s{Any s/Any}])
Returns: [Triple]

Converts objects into a sequence of triples.
sourceraw docstring

entity-update->triplesclj/s

(entity-update->triples graph node-ref entity)

Inputs: [graph :- GraphType node-ref entity] Returns: [(s/one [Triple] "assertions") (s/one [Triple] "retractions")]

Takes a single structure and converts it into triples to be added and triples to be retracted to create a change

Inputs: [graph :- GraphType node-ref entity]
Returns: [(s/one [Triple] "assertions") (s/one [Triple] "retractions")]

Takes a single structure and converts it into triples to be added and triples to be retracted to create a change
sourceraw docstring

EntityTriplesPairclj/s

source

existing-triplesclj/s

(existing-triples graph node-ref [k v])

Inputs: [graph :- GraphType node-ref [k v]]

Inputs: [graph :- GraphType node-ref [k v]]
sourceraw docstring

get-refclj/s

(get-ref {id :db/id ident :db/ident :as data})

Inputs: [{id :db/id, ident :db/ident, :as data} :- #:s{Keyword s/Any}]

Returns the reference for an object, and a flag to indicate if a new reference was generated

Inputs: [{id :db/id, ident :db/ident, :as data} :- #:s{Keyword s/Any}]

Returns the reference for an object, and a flag to indicate if a new reference was generated
sourceraw docstring

ident-map->triplesclj/s≠

clj
(ident-map->triples j)
(ident-map->triples graph j)
(ident-map->triples graph j id-map)
cljs
(ident-map->triples G__17070)
(ident-map->triples G__17059 G__17060)
(ident-map->triples G__17064 G__17065 G__17066)

Inputs: ([graph :- GraphType j :- EntityMap] [graph :- GraphType j :- EntityMap id-map :- #:s{Any s/Any}] [j :- EntityMap]) Returns: [(s/one [Triple] "The triples representing the ident-map") (s/one #:s{Any s/Any} "The map of IDs in ident-maps to the actual IDs in the triples")]

Converts a single map to triples for an ID'ed map

Inputs: ([graph :- GraphType j :- EntityMap] [graph :- GraphType j :- EntityMap id-map :- #:s{Any s/Any}] [j :- EntityMap])
Returns: [(s/one [Triple] "The triples representing the ident-map") (s/one #:s{Any s/Any} "The map of IDs in ident-maps to the actual IDs in the triples")]

Converts a single map to triples for an ID'ed map
sourceraw docstring

json-generate-stringclj/s

(json-generate-string data)
(json-generate-string data indent)
source (clj)source (cljs)

list-triplesclj/s

(list-triples [v & vs :as vlist])

Inputs: [[v & vs :as vlist]]

Creates the triples for a list

Inputs: [[v & vs :as vlist]]

Creates the triples for a list
sourceraw docstring

map->triplesclj/s

(map->triples data)

Inputs: [data :- #:s{Keyword s/Any}] Returns: EntityTriplesPair

Converts a single map to triples. Returns a pair of the map's ID and the triples for the map.

Inputs: [data :- #:s{Keyword s/Any}]
Returns: EntityTriplesPair

Converts a single map to triples. Returns a pair of the map's ID and the triples for the map.
sourceraw docstring

name-forclj/s

(name-for id)

Inputs: [id :- s/Any]

Convert an id (probably a number) to a keyword for identification

Inputs: [id :- s/Any]

Convert an id (probably a number) to a keyword for identification
sourceraw docstring

new-nodeclj/s

(new-node id)

Inputs: [id]

Inputs: [id]
sourceraw docstring

parse-json-stringclj/s

source (clj)source (cljs)

property-valsclj/s

(property-vals entity-ref [property value])

Inputs: [entity-ref :- s/Any [property value] :- KeyValue] Returns: [Triple]

Takes a property-value pair associated with an entity, and builds triples around it

Inputs: [entity-ref :- s/Any [property value] :- KeyValue]
Returns: [Triple]

Takes a property-value pair associated with an entity,
 and builds triples around it
sourceraw docstring

stream->triplesclj/s≠

(stream->triples graph io)
clj

Inputs: [graph :- GraphType io] Returns: [Triple]

Converts a stream to triples

Inputs: [graph :- GraphType io]
Returns: [Triple]

Converts a stream to triples
cljs

Inputs: [graph io] Returns: [Triple]

Inputs: [graph io]
Returns: [Triple]
source (clj)source (cljs)raw docstring

string->triplesclj/s

(string->triples graph s)

Inputs: [graph :- GraphType s :- s/Str] Returns: [Triple]

Converts a string to triples

Inputs: [graph :- GraphType s :- s/Str]
Returns: [Triple]

Converts a string to triples
sourceraw docstring

Tripleclj/s

source

value-triplesclj/s

(value-triples v)

Inputs: [v]

Converts a value into a list of triples. Return the entity ID of the data coupled with the sequence of triples.

Inputs: [v]

Converts a value into a list of triples.
 Return the entity ID of the data coupled with the sequence of triples.
sourceraw docstring

value-triples-listclj/s

(value-triples-list vlist)

Inputs: [vlist :- [s/Any]] Returns: EntityTriplesPair

Inputs: [vlist :- [s/Any]]
Returns: EntityTriplesPair
sourceraw docstring

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

× close