Functions for the definition and handling of the overarch model.
Functions for the definition and handling of the overarch model.
(->relational-model)(->relational-model [res ctx])(->relational-model [res ctx] e)Step function for the conversion of the hierachical input model into a relational model of nodes, relations and views.
Step function for the conversion of the hierachical input model into a relational model of nodes, relations and views.
(aggregable-relation? model r1 r2)Returns true, if the relations r1 and r2 are aggregable.
Returns true, if the relations `r1` and `r2` are aggregable.
(all-elements model)Returns a set of all elements.
Returns a set of all elements.
(build-model coll)Builds the working model from the input coll of elements.
The map contains the following keys:
:elements -> the given data :nodes -> the set of nodes (incl. child nodes) :relations -> the set of relations (incl. contains relations) :views -> the set of views :id->element -> a map from id to element (nodes, relations and views) :id->parent -> a map from id to parent element :referrer-id->relations -> a map from id to set of relations where the id is the referrer (:from) :referred-id->relations -> a map from id to set of relations where the id is referred (:to)
Builds the working model from the input `coll` of elements. The map contains the following keys: :elements -> the given data :nodes -> the set of nodes (incl. child nodes) :relations -> the set of relations (incl. contains relations) :views -> the set of views :id->element -> a map from id to element (nodes, relations and views) :id->parent -> a map from id to parent element :referrer-id->relations -> a map from id to set of relations where the id is the referrer (:from) :referred-id->relations -> a map from id to set of relations where the id is referred (:to)
(children model e)Returns the children of the element e.
Returns the children of the element `e`.
(from-name model rel)Returns the name of the from reference of the relation.
Returns the name of the from reference of the relation.
(id-set coll)Returns a set of id's for the elements in coll.
Returns a set of id's for the elements in `coll`.
(model-element model id)Returns the model element with the given id.
Returns the model element with the given `id`.
(model-elements model)Returns the collection of model elements.
Returns the collection of model elements.
(parent model e)Returns the parent of the element e.
Returns the parent of the element `e`.
(parent-of-relation p-id e-id)Returns a parent-of relation for parent p and element e.
Returns a parent-of relation for parent `p` and element `e`.
(related model coll)Returns the related elements for the given collection of relations
Returns the related elements for the given collection of relations
(related-nodes model coll)Returns the set of nodes of the model m that are part of at least one relation in the coll.
Returns the set of nodes of the model `m` that are part of at least one relation in the `coll`.
(relations-of-nodes model coll)Returns the relations of the model m connecting nodes from the given collection of model nodes.
Returns the relations of the model `m` connecting nodes from the given collection of model nodes.
(resolve-element model e)Resolves the model element for the ref e.
Resolves the model element for the ref `e`.
(resolve-id model id)Resolves the model element for the id
Resolves the model element for the `id`
(resolve-ref model r)Resolves the model element for the ref r.
Resolves the model element for the ref `r`.
(to-name model rel)Returns the name of the from reference of the relation.
Returns the name of the from reference of the relation.
(update-acc acc p e)Update the accumulator acc of the model with the element e
in the context of the parent p (if given).
Update the accumulator `acc` of the model with the element `e` in the context of the parent `p` (if given).
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs | 
| ← | Move to previous article | 
| → | Move to next article | 
| Ctrl+/ | Jump to the search field |