Functions for the definition and handling of the overarch model.
Functions for the definition and handling of the overarch model.
(all-descendant-nodes model elements)
Returns the set of descendants of the nodes in the collection of elements
in the model
.
Returns the set of descendants of the nodes in the collection of `elements` in the `model`.
(all-elements model)
Returns a set of all elements in the model
.
Returns a set of all elements in the `model`.
(all-nodes model elements)
Returns the set of all nodes, including descendants, of the elements
in the model
.
Returns the set of all nodes, including descendants, of the `elements` in the `model`.
(ancestor-node? model e c)
Returns true, if c
is an ancestor of node e
in the model
.
Returns true, if `c` is an ancestor of node `e` in the `model`.
(ancestor-nodes model e)
Returns the ancestor nodes of the model node e
in the model
.
Returns the ancestor nodes of the model node `e` in the `model`.
(ancestor-of-pred model v)
Returns a predicate that returns true, if e
is an ancestor of the node with id v
in the model
.
Returns a predicate that returns true, if `e` is an ancestor of the node with id `v` in the `model`.
(check-nodes model)
Validates the content references in the model.
Validates the content references in the model.
(check-relations model)
Validates the relations in the model.
Validates the relations in the model.
(check-views model)
Validates the references in the views.
Validates the references in the views.
(child-check-pred model v)
Returns a predicate that returns true, if the check for e
is a child in the model
equals the boolean value v
.
Returns a predicate that returns true, if the check for `e` is a child in the `model` equals the boolean value `v`.
(child-pred model v)
Returns a predicate that returns true, if e
is a child of the node with id v
in the model
.
Returns a predicate that returns true, if `e` is a child of the node with id `v` in the `model`.
(children model e)
Returns the children of the model node e
.
Returns the children of the model node `e`.
(children-resolver model)
Returns a children resolver function for the given model
.
Returns a children resolver function for the given `model`.
(collect-in-ordered-set)
(collect-in-ordered-set acc)
(collect-in-ordered-set acc e)
Step function to collect elements e
in the accumulator acc
.
No transformation on the element is applied.
Step function to collect elements `e` in the accumulator `acc`. No transformation on the element is applied.
(collect-in-set)
(collect-in-set acc)
(collect-in-set acc e)
Step function to collect elements e
in the accumulator acc
.
No transformation on the element is applied.
Step function to collect elements `e` in the accumulator `acc`. No transformation on the element is applied.
(collect-in-vector)
(collect-in-vector acc)
(collect-in-vector acc e)
Step function to collect elements e
in the accumulator acc
.
No transformation on the element is applied.
Step function to collect elements `e` in the accumulator `acc`. No transformation on the element is applied.
(criteria-map-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-predicate 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`.
(descendant-node? model e c)
Returns true, if c
is a descendant of e
in the model
.
Returns true, if `c` is a descendant of `e` in the `model`.
(descendant-nodes model e)
Returns the set of descendants of the node e
in the model
.
Returns the set of descendants of the node `e` in the `model`.
(descendant-of-pred model v)
Returns a predicate that returns true, if e
is a descendant of the node with id v
in the model
.
Returns a predicate that returns true, if `e` is a descendant of the node with id `v` in the `model`.
(element-resolver model)
Returns an element resolver function for the given model
.
Returns an element resolver function for the given `model`.
(external-check-pred model v)
Returns a predicate that returns true, if the check for external on e
equals the boolean value v
in the model
.
Returns a predicate that returns true, if the check for external on `e` equals the boolean value `v` in the `model`.
(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 rel
in the context of the model
.
Returns the name of the from reference of the relation `rel` in the context of the `model`.
(from-pred model v)
Returns a predicate that returns true, if referring node of relation e
is matched by v
in the model
.
Returns a predicate that returns true, if referring node of relation `e` is matched by `v` in the `model`.
(id->element)
(id->element acc)
(id->element acc e)
Step function to create an id to element map.
Adds the association of the id of the element e
to the map acc
.
Step function to create an id to element map. Adds the association of the id of the element `e` to the map `acc`.
(key->element k)
Returns a step function to create an key k
to element map.
Adds the association of the id of the element e
to the map acc
.
Returns a step function to create an key `k` to element map. Adds the association of the id of the element `e` to the map `acc`.
(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.
(model-elements-by-criteria model criteria)
Returns a set of relations that match the criteria
Returns a set of relations that match the `criteria`
(node-by-id model id)
Returns the node with the given id
.
Returns the node with the given `id`.
(nodes model)
Returns the collection of model nodes.
Returns the collection of model nodes.
(nodes-by-criteria model criteria)
Returns a set of nodes that match the criteria
Returns a set of nodes that match the `criteria`
(parent model e)
Returns the parent of the model node e
.
Returns the parent of the model node `e`.
(parent-check-pred model v)
Returns a predicate that returns true if the check for children of e
equals the boolean value v
Returns a predicate that returns true if the check for children of `e` equals the boolean value `v`
(parent-new model e)
Returns the parent of the model node e
.
Returns the parent of the model node `e`.
(parent-pred model v)
Returns a predicate that returns true if v
is the parent of e
Returns a predicate that returns true if `v` is the parent of `e`
(parent-resolver model)
Returns a parent resolver function for the given model
.
Returns a parent resolver function for the given `model`.
(referred-by-pred model v)
Returns a predicate that returns true, if e
is referred by the node with id v
in the model
.
Returns a predicate that returns true, if `e` is referred by the node with id `v` in the `model`.
(referred-check-pred model v)
Returns a predicate that returns true if the check for e
as referred to equals the boolean value v
in the model
.
Returns a predicate that returns true if the check for `e` as referred to equals the boolean value `v` in the `model`.
(referred-nodes model e)
(referred-nodes model e criteria)
Returns the nodes referred by e
in the model
.
Optionally takes criteria
to filter for.
Returns the nodes referred by `e` in the `model`. Optionally takes `criteria` to filter for.
(referred-pred model v)
Returns a predicate that returns true, if a referrer relation of the node e
matches v
in the model
.
Returns a predicate that returns true, if a referrer relation of the node `e` matches `v` in the `model`.
(referred-relations model e)
(referred-relations model e criteria)
Returns the relations referred by e
in the model
.
Optionally takes criteria
to filter for.
Returns the relations referred by `e` in the `model`. Optionally takes `criteria` to filter for.
(referred-xf model)
(referred-xf model filter-fn)
Transducer to resolve referred elements in the model
.
Optionally takes a filter-fn
to filter the relations to take into account.
Transducer to resolve referred elements in the `model`. Optionally takes a `filter-fn` to filter the relations to take into account.
(referrer-xf model)
(referrer-xf model filter-fn)
Transducer to resolve referrer elements of in the model
.
Optionally takes a filter-fn
to filter the relations to take into account.
Transducer to resolve referrer elements of in the `model`. Optionally takes a `filter-fn` to filter the relations to take into account.
(referring-nodes model e)
(referring-nodes model e criteria)
Returns the nodes referring to e
in the model
.
Optionally takes criteria
to filter for.
Returns the nodes referring to `e` in the `model`. Optionally takes `criteria` to filter for.
(referring-relations model e)
(referring-relations model e criteria)
Returns the relations referring to e
in the model
.
Optionally takes criteria
to filter for.
Returns the relations referring to `e` in the `model`. Optionally takes `criteria` to filter for.
(refers-check-pred model v)
Returns a predicate that returns true, if the check for e
as a referrer equals the boolean value v
in the model
.
Returns a predicate that returns true, if the check for `e` as a referrer equals the boolean value `v` in the `model`.
(refers-pred model v)
Returns a predicate that returns true, if a referrer relation of the node e
matches v
in the model
.
Returns a predicate that returns true, if a referrer relation of the node `e` matches `v` in the `model`.
(refers-to-pred model v)
Returns a predicate that returns true, if the node with id v
refers to e
in the model
.
Returns a predicate that returns true, if the node with id `v` refers to `e` in the `model`.
(related model coll)
Returns the set of nodes of the model
that are part of at least one relation in the coll
.
Returns the set of nodes of the `model` that are part of at least one relation in the `coll`.
(related-nodes model coll)
Returns the set of nodes of the model
that are part of at least one relation in the coll
.
Returns the set of nodes of the `model` that are part of at least one relation in the `coll`.
(related-xf model)
Transducer to resolve the elements in the model
referenced by relations.
Transducer to resolve the elements in the `model` referenced by relations.
(relation-by-id model id)
Returns the node with the given id
.
Returns the node with the given `id`.
(relations model)
Returns the collection of model relations.
Returns the collection of model relations.
(relations-by-criteria model criteria)
Returns a set of relations that match the criteria
Returns a set of relations that match the `criteria`
(relations-of-nodes model coll)
Returns the relations of the model
connecting nodes from the given coll
of model nodes.
Returns the relations of the `model` connecting nodes from the given `coll` 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
and associates any additional keys of r
to the model element.
Resolves the model element for the ref `r` and associates any additional keys of `r` to the model element.
(resolveable-element? model e)
Returns true if the element is resolveable in the model.
Returns true if the element is resolveable in the model.
(resolveable-relation? model e)
Returns true if relation e
and the referrer and referred nodes of e
are resolveable in the model
.
Returns true if relation `e` and the referrer and referred nodes of `e` are resolveable in the `model`.
(root-nodes model elements)
Returns the set of root nodes of the elements
in the model
.
The root nodes are not contained as descendants in any of the element nodes.
Returns the set of root nodes of the `elements` in the `model`. The root nodes are not contained as descendants in any of the element nodes.
(sprite-collector)
(sprite-collector acc)
(sprite-collector acc e)
Adds the sprite of e
to the accumulator acc
.
Adds the sprite of `e` to the accumulator `acc`.
(t-ancestors model e)
Returns the ancestors of the element
in the model
.
Returns the ancestors of the `element` in the `model`.
(t-descendants model e)
Returns the descendants of the element
in the model
.
Returns the descendants of the `element` in the `model`.
(tech-collector)
(tech-collector acc)
(tech-collector acc e)
Step function to collect the technologies.
Adds the tech of e
to the accumulator acc
.
Step function to collect the technologies. Adds the tech of `e` to the accumulator `acc`.
(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 rel
in the context of the model
.
Returns the name of the from reference of the relation `rel` in the context of the `model`.
(to-pred model v)
Returns a predicate that returns true, if referred node of relation e
is matched by v
in the model
.
Returns a predicate that returns true, if referred node of relation `e` is matched by `v` in the `model`.
(transitive-search model search-criteria)
(transitive-search model search-criteria e)
(transitive-search model collect-fn search-criteria e)
Returns the result of a transitive search for the model
based on the search-criteria
.
Returns the result of a transitive search for the `model` based on the `search-criteria`.
(traverse step-fn coll)
(traverse pred-fn step-fn coll)
(traverse pred-fn children-fn step-fn coll)
(traverse element-fn pred-fn children-fn step-fn coll)
Recursively traverses the coll
of elements filtered by an optional pred-fn
and returns the elements transformed by the step-fn
.
element-fn
- a resolver function for an element, defaults to identity
pred-fn
- a predicate on the current element, defaults to identity
children-fn
- a function to resolve the children of 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.
Recursively traverses the `coll` of elements filtered by an optional `pred-fn` and returns the elements transformed by the `step-fn`. `element-fn` - a resolver function for an element, defaults to `identity` `pred-fn` - a predicate on the current element, defaults to `identity` `children-fn` - a function to resolve the children of 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.
(tree->set)
(tree->set acc)
(tree->set acc e)
Step function to convert a hierarchical tree of elements to a flat set of elements.
Step function to convert a hierarchical tree of elements to a flat set of elements.
(unrelated-nodes model)
Returns the set of ids of identifiable model nodes not taking part in any relation.
Returns the set of ids of identifiable model nodes not taking part in any relation.
(unresolved-refs model element)
Checks references in an element.
Checks references in an element.
(unresolved-refs-in-view model view)
Checks references in a view.
Checks references in a view.
(unresolved-refs-xf model)
Returns a transducer to extract unresolved refs
Returns a transducer to extract unresolved refs
(unresolved-related model rel)
Checks references in a relation.
Checks references in a relation.
(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