Functions for the definition and handling of the overarch model.
The loaded overarch working model is a map with these keys:
:input-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 :themes -> the set of themes :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)
Functions for the definition and handling of the overarch model. The loaded overarch working model is a map with these keys: :input-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 :themes -> the set of themes :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)
(->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.
(ancestor-node? model e c)
Returns true, if c
is an ancestor of e
in the model
.
Returns true, if `c` is an ancestor of `e` in the `model`.
(ancestor-nodes model e)
Returns the ancestor nodes of the node
.
Returns the ancestor nodes of the `node`.
(build-model coll)
Builds the working model from the input coll
of elements.
Builds the working model from the input `coll` of elements.
(criteria-predicate model criteria)
Returns a filter predicate for the given criteria
.
The resulting predicate is a logical conjunction (and) of the predicates for
each criterium.
Returns a filter predicate for the given `criteria`. The resulting predicate is a logical conjunction (and) of the predicates for each criterium.
(criteria-predicates model criteria)
Returns a filter predicate for the given criteria
.
If a vector of criteria maps is given, the resulting predicate is a logical
disjunction (or) of the predicates.
Returns a filter predicate for the given `criteria`. If a vector of criteria maps is given, the resulting predicate is a logical disjunction (or) of the predicates.
(criterium-predicate model [k v])
Returns a predicate for the given criterium
.
Returns a predicate for the given `criterium`.
(filter-xf model criteria)
Returns a filter transducer for the given criteria
.
Returns a filter transducer for the given `criteria`.
(from-name model rel)
Returns the name of the from reference of the relation.
Returns the name of the from reference of the relation.
(input-elements model)
Returns the collection of elements.
Returns the collection of elements.
(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.
(nodes model)
Returns the collection of model nodes.
Returns the collection of model nodes.
(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 model)
Returns the collection of model relations.
Returns the collection of model relations.
(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`.
(themes model)
Returns the set of themes from the model
.
Returns the set of themes from the `model`.
(to-name model rel)
Returns the name of the from reference of the relation.
Returns the name of the from reference of the relation.
(unresolved-refs-xf model)
Returns a transducer to extract unresolved refs
Returns a transducer to extract unresolved refs
(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).
(views model)
Returns the set of views from the model
.
Returns the set of views from the `model`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close