Liking cljdoc? Tell your friends :D

org.soulspace.overarch.adapter.reader.input-model-reader

Functions to read and build the working model from overarch input models.

The built model is a map with the following keys

KeyDescription
Relation keys
:nodesthe set of all nodes
:relationsthe set of all relations
:viewsthe set of views
:themesthe set of themes
Index keys
:id->elementa map from id to element (nodes, relations and views)
:id->parent-ida map from id to parent node id
:id->childrena map from id to a vector of contained nodes (deprecated)
:referrer-id->relationsa map from id to set of relations where the id is the referrer (:from)
:referred-id->relationsa map from id to set of relations where the id is referred (:to)
Problem keys
:problemsthe set of problems found during model building

The input model is transformed by

  • computing missing ids, if possible
  • converting the node hierarchies to :contained-in relations
Functions to read and build the working model from overarch input models.
   
The built model is a map with the following keys

| Key                     | Description 
|-------------------------|-------------
| **Relation keys**       | 
| :nodes                  | the set of all nodes
| :relations              | the set of all relations
| :views                  | the set of views
| :themes                 | the set of themes
| **Index keys**          | 
| :id->element            | a map from id to element (nodes, relations and views)
| :id->parent-id          | a map from id to parent node id
| :id->children           | a map from id to a vector of contained nodes (deprecated)
| :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)
| **Problem keys**        | 
| :problems               | the set of problems found during model building

The input model is transformed by
* computing missing ids, if possible
* converting the node hierarchies to :contained-in relations
   
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. res accumulates the result and the context ctx acts as the stack of the recusive calls.

Step function for the conversion of the hierachical input model into a relational model of nodes, relations and views.
`res` accumulates the result and the context `ctx` acts as the stack of the recusive calls.
sourceraw docstring

add-nodeclj

(add-node acc p e)

Update the accumulator acc of the model with the node e in the context of the parent p (if given).

Update the accumulator `acc` of the model with the node `e`
in the context of the parent `p` (if given).
sourceraw docstring

add-referenceclj

(add-reference acc p e)

Update the accumulator acc of the model with the reference e in the context of the parent p (if given).

Update the accumulator `acc` of the model with the reference `e`
in the context of the parent `p` (if given).
sourceraw docstring

add-relationclj

(add-relation acc p e)

Update the accumulator acc of the model with the relation e in the context of the parent p (if given).

Update the accumulator `acc` of the model with the relation `e`
in the context of the parent `p` (if given).
sourceraw docstring

add-themeclj

(add-theme acc p e)

Update the accumulator acc of the model with the view e in the context of the parent p (if given).

Update the accumulator `acc` of the model with the view `e`
in the context of the parent `p` (if given).
sourceraw docstring

add-viewclj

(add-view acc p e)

Update the accumulator acc of the model with the view e in the context of the parent p (if given).

Update the accumulator `acc` of the model with the view `e`
in the context of the parent `p` (if given).
sourceraw docstring

check-duplicate-idclj

(check-duplicate-id acc e)
(check-duplicate-id acc p e)
source

check-elementclj

source

check-missing-idclj

(check-missing-id acc e)
(check-missing-id acc p e)
source

check-parent-overrideclj

(check-parent-override acc e)
(check-parent-override acc p e)
source

contained-in-relationclj

(contained-in-relation p-id e-id)

Returns a contained-in relation for parent p and element e.

Returns a contained-in relation for parent `p` and element `e`.
sourceraw docstring

input-child?clj

(input-child? e p)

Returns true, if element e is a child of model element p in the input model.

Returns true, if element `e` is a child of model element `p` in the input model.
sourceraw docstring

main-node?clj

(main-node? node)

Returns true if the node is the main node.

Returns true if the `node` is the main node.
sourceraw docstring

merge-nodesclj

(merge-nodes)
(merge-nodes node)
(merge-nodes node new-node)

Returns a node that is the merge of node and new-node.

Returns a node that is the merge of `node` and `new-node`.
sourceraw docstring

merge-relationsclj

(merge-relations)
(merge-relations relation)
(merge-relations relation new-relation)

Returns a relation that is the merge of relation and new-relation.

Returns a relation that is the merge of `relation` and `new-relation`.
sourceraw docstring

merge-viewsclj

(merge-views)
(merge-views view)
(merge-views view new-view)

Returns a view that is the merge of view and new-view.

Returns a view that is the merge of `view` and `new-view`.
sourceraw docstring

prepare-nodeclj

(prepare-node e p)

Returns the node e with the id set. Generates the id from es name and the parent ps id.

Returns the node `e` with the id set. Generates the id from `e`s name and the parent `p`s id.
sourceraw docstring

prepare-relationclj

(prepare-relation e)

Returns the relation e with the id set. Generates the id from es name and the parent ps id.

Returns the relation `e` with the id set. Generates the id from `e`s name and the parent `p`s id.
sourceraw docstring

prepare-viewclj

(prepare-view e)

Returns the prepered view e with the id set. Generates the id from es name.

Returns the prepered view `e` with the id set. Generates the id from `e`s name.
sourceraw docstring

problem->severityclj

Map of problem to severity.

Map of problem to severity.
sourceraw docstring

scope-fnclj

(scope-fn scope)
source

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