Paths of the form ["property" '* ...]
, which are used to navigate
xAPI Statements.
Functions include getting the appropriate spec for the path at the location, as well as determining the valid objectTypes allowed at the location.
Note that this namespace is used both during Profile compilation and Statement generation.
Paths of the form `["property" '* ...]`, which are used to navigate xAPI Statements. Functions include getting the appropriate spec for the path at the location, as well as determining the valid objectTypes allowed at the location. Note that this namespace is used both during Profile compilation and Statement generation.
Map from paths to their default objectTypes, if there were no constraints.
Map from paths to their default objectTypes, if there were no constraints.
(object-type-paths path)
Does path
point to anywhere that can have multiple object types?
Includes actor, object, context instructors, authority, and their
SubStatement equivalents. Returns a coll of possible path prefixes.
Returns nil
if path
does not potentially point to multiple object
types (so, for example, context activities don't count since they
can only be activities).
Does `path` point to anywhere that can have multiple object types? Includes actor, object, context instructors, authority, and their SubStatement equivalents. Returns a coll of possible path prefixes. Returns `nil` if `path` does not potentially point to multiple object types (so, for example, context activities don't count since they can only be activities).
(path->spec spec path object-types)
Given a root spec
and a path
into it, return the spec for
that path, or throw an exception if not possible.
Accepts object-types
for polymorphic objectTypes.
Given a root `spec` and a `path` into it, return the spec for that path, or throw an exception if not possible. Accepts `object-types` for polymorphic objectTypes.
(path-object-type-set prefix paths)
(path-object-type-set initial-type-set prefix paths)
Derive the set of possible object types based off of all the paths
,
starting with an optional initial-type-set
.
Derive the set of possible object types based off of all the `paths`, starting with an optional `initial-type-set`.
Return a [path spec]
pair, where path
is the new path that
points to the value in the statement validated by spec
.
Return a `[path spec]` pair, where `path` is the new path that points to the value in the statement validated by `spec`.
Map from property to the object types that the containing object can be.
For example, id
can be found in both activities and statement-refs.
Map from property to the object types that the containing object can be. For example, `id` can be found in both activities and statement-refs.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close