(create-graph profile)
(create-graph profile extra-profiles)
Create a graph of Pattern relations from profile
and possibly
extra-profiles
that can then be used in validation. Relations
can include those between Patterns and Statement Templates. If
extra-profiles
is provided, those profiles are traversed in order
to add Patterns and Templates that are connected to the nodes
of the main Profile's Pattern graph.
Create a graph of Pattern relations from `profile` and possibly `extra-profiles` that can then be used in validation. Relations can include those between Patterns and Statement Templates. If `extra-profiles` is provided, those profiles are traversed in order to add Patterns and Templates that are connected to the nodes of the main Profile's Pattern graph.
(get-edges pgraph)
Return a sequence of edges in the form of maps, with the following keys:
Return a sequence of edges in the form of maps, with the following keys: - src: source node ID value - dest: destination node ID value - src-primary: true if the source node is a primary pattern, false otherwise - src-indegree: how many other Patterns reference this node - src-outdegree: how mahy Patterns or Templates this node references - dest-type: 'type' property of destination node (Pattern or StatementTemplate) - dest-property: the regex property of the destination node (sequence, alternates, etc.); nil if the destination is a Template - type: the regex property of this edge (sequence, alternates, etc.)
(get-external-iris profile)
Return the external IRIs from the Patterns of profile
.
Return the external IRIs from the Patterns of `profile`.
(validate-pattern-edges pgraph)
Given the Pattern graph pgraph
, return spec error data if the
graph edges are invalid according to the xAPI Profile spec, or
nil
otherwise.
Given the Pattern graph `pgraph`, return spec error data if the graph edges are invalid according to the xAPI Profile spec, or `nil` otherwise.
(validate-pattern-tree pgraph)
Given the Pattern graph pgraph
, return spec error data if pgraph
has non-singleton strongly connected components (indicating that
a cycle was detected and pgraph
is not a tree), nil
otherwise.
Given the Pattern graph `pgraph`, return spec error data if `pgraph` has non-singleton strongly connected components (indicating that a cycle was detected and `pgraph` is not a tree), `nil` otherwise.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close