Liking cljdoc? Tell your friends :D

org.soulspace.overarch.domain.model

Functions for the definition and handling of the overarch model.

Functions for the definition and handling of the overarch model.
raw docstring

->relational-modelclj

(->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.
sourceraw docstring

aggregable-relation?clj

(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.
sourceraw docstring

all-elementsclj

(all-elements model)

Returns a set of all elements.

Returns a set of all elements.
sourceraw docstring

ancestor-nodesclj

(ancestor-nodes model e)
source

build-modelclj

(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)
sourceraw docstring

childrenclj

(children model e)

Returns the children of the element e.

Returns the children of the element `e`.
sourceraw docstring

from-nameclj

(from-name model rel)

Returns the name of the from reference of the relation.

Returns the name of the from reference of the relation.
sourceraw docstring

id-setclj

(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`.
sourceraw docstring

model-elementclj

(model-element model id)

Returns the model element with the given id.

Returns the model element with the given `id`.
sourceraw docstring

model-elementsclj

(model-elements model)

Returns the collection of model elements.

Returns the collection of model elements.
sourceraw docstring

parentclj

(parent model e)

Returns the parent of the element e.

Returns the parent of the element `e`.
sourceraw docstring

parent-of-relationclj

(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`.
sourceraw docstring

(related model coll)

Returns the related elements for the given collection of relations

Returns the related elements for the given collection of relations
sourceraw docstring

(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`.
sourceraw docstring

relations-of-nodesclj

(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.
sourceraw docstring

resolve-elementclj

(resolve-element model e)

Resolves the model element for the ref e.

Resolves the model element for the ref `e`.
sourceraw docstring

resolve-idclj

(resolve-id model id)

Resolves the model element for the id

Resolves the model element for the `id`
sourceraw docstring

resolve-refclj

(resolve-ref model r)

Resolves the model element for the ref r.

Resolves the model element for the ref `r`.
sourceraw docstring

to-nameclj

(to-name model rel)

Returns the name of the from reference of the relation.

Returns the name of the from reference of the relation.
sourceraw docstring

update-accclj

(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).
sourceraw docstring

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

× close