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

aggregable-relation?clj

(aggregable-relation? m 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 m)

Returns a set of all elements.

Returns a set of all elements.
sourceraw docstring

build-id->parentclj

(build-id->parent coll)
(build-id->parent m p coll)

Returns a map of child id to parent element for the elements in coll.

Returns a map of child id to parent element for the elements in `coll`.
sourceraw docstring

build-registryclj

(build-registry elements)

Returns a map with the original elements and a registry by id for lookups.

The map has the following shape:

:elements -> the given data :registry -> a map from id to element :parents -> a map from id to parent element :referrer -> a map from id to set of relations where the id is the referrer (:from) :referred -> a map from id to set of relations where the id is referred (:to)

Returns a map with the original `elements` and a registry by id for lookups.

The map has the following shape:

:elements -> the given data
:registry -> a map from id to element
:parents  -> a map from id to parent element
:referrer -> a map from id to set of relations where the id is the referrer (:from)
:referred -> a map from id to set of relations where the id is referred (:to)
sourceraw docstring

childrenclj

(children m e)

Returns the children of the element e.

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

get-model-elementclj

(get-model-element m id)

Returns the model element with the given id.

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

get-model-elementsclj

(get-model-elements m)

Returns the collection of model elements.

Returns the collection of model elements.
sourceraw docstring

get-parent-elementclj

(get-parent-element m e)

Returns the parent of the element e.

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

id->elementclj

(id->element)
(id->element acc)
(id->element acc e)

Adds the association of the id of the element e to the map acc.

Adds the association of the id of the element `e` to the map `acc`.
sourceraw docstring

id->parentclj

(id->parent)
(id->parent acc)
(id->parent [res p] e)

Adds the association from the id of element e to the parent p to the map acc.

Adds the association from the id of element `e` to the parent `p` to the map `acc`.
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-elementsclj

(model-elements coll)

Filters the given collection of elements coll for model elements.

Filters the given collection of elements `coll` for model elements.
sourceraw docstring

parentclj

(parent m e)

Returns the parent of the element e.

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

referred-id->relclj

(referred-id->rel)
(referred-id->rel acc)
(referred-id->rel acc r)

Adds the relation r to the set associated with the id of the :to reference in the map acc.

Adds the relation `r` to the set associated with the id of the :to reference in the map `acc`.
sourceraw docstring

referrer-id->relclj

(referrer-id->rel)
(referrer-id->rel acc)
(referrer-id->rel acc e)

Adds the relation r to the set associated with the id of the :from reference in the map acc.

Adds the relation `r` to the set associated with the id of the :from reference in the map `acc`.
sourceraw docstring

(related m 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 m 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 m 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 m e)

Resolves the model element for the ref e.

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

resolve-refclj

(resolve-ref m r)

Resolves the model element for the ref r.

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

traverseclj

(traverse select-fn step-fn coll)

Traverses the coll of elements and returns the elements selected by the select-fn and transformed by the step-fn.

select-fn - a predicate on the current element step-fn - a function with three signatures [], [acc] and [acc e]

The no args signature of the step-fn should return an empty accumulator, the one args signature extracts the result from the accumulator on return and the 2 args signature receives the accumulator and the current element and should add the transformed element to the accumulator.

Traverses the `coll` of elements and returns the elements selected by the `select-fn`
and transformed by the `step-fn`.

select-fn - a predicate on the current element
step-fn - a function with three signatures [], [acc] and [acc e]

The no args signature of the step-fn should return an empty accumulator,
the one args signature extracts the result from the accumulator on return
and the 2 args signature receives the accumulator and the current element and
should add the transformed element to the accumulator.
sourceraw docstring

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

× close