(get-external-iris profile)
Return a map of keys to sets of IRIs, where the IRIs reference
objects that do not exist in profile
. Values include IRIs
from Concepts, Statement Templates, and Patterns as well as
"@context" IRI values.
Return a map of keys to sets of IRIs, where the IRIs reference objects that do not exist in `profile`. Values include IRIs from Concepts, Statement Templates, and Patterns as well as "@context" IRI values.
(json-profile->edn json-profile)
Convert an JSON string xAPI Profile into an EDN data structure,
where all keys are keywordized (and @
s, e.g. in @context
, are
converted into _
).
Convert an JSON string xAPI Profile into an EDN data structure, where all keys are keywordized (and `@`s, e.g. in `@context`, are converted into `_`).
(validate-profile profile
&
{:keys [syntax? ids? relations? contexts? extra-profiles
extra-contexts result]
:or {syntax? true
ids? false
relations? false
contexts? false
extra-profiles []
extra-contexts {}
result :spec-error-data}})
Validate profile
from the top down, printing or returning errors
on completion. Supports multiple levels of validation based on the
following keyword arguments:
:syntax?
Basic syntax validation only. Default true
.:ids?
Validate object and versioning IDs. Default false
.:relations?
Validate IRI-given relations between Concepts,
Statement Templates and Patterns. Default
false
.:contexts?
Validate "@context" values and that Profile keys
expand to absolute IRIs using RDF contexts. Default
false.
Also supports multiple resources with the following:
:extra-profiles
Extra profiles from which Concepts, Templates, and
Patterns can be referenced from. Default []
.:extra-contexts
Extra "@context" values (other than the xAPI Profile
and Activity contexts) that "@context" IRIs in
profile
can reference during context validation.
Default {}
.The :result
keyword argument affects the return data, and can take one
of the following values:
:spec-error-data
Return a {:error-type spec-error-data}
map.:type-path-string
Return a {:err-type {:err-path err-string}}
map.:type-string
Return a {:err-type err-string}
map.:string
Return the Expound-generated error string.:print
Print the error string to standard output.Validate `profile` from the top down, printing or returning errors on completion. Supports multiple levels of validation based on the following keyword arguments: - `:syntax?` Basic syntax validation only. Default `true`. - `:ids?` Validate object and versioning IDs. Default `false`. - `:relations?` Validate IRI-given relations between Concepts, Statement Templates and Patterns. Default `false`. - `:contexts?` Validate "@context" values and that Profile keys expand to absolute IRIs using RDF contexts. Default `false.` Also supports multiple resources with the following: - `:extra-profiles` Extra profiles from which Concepts, Templates, and Patterns can be referenced from. Default `[]`. - `:extra-contexts` Extra "@context" values (other than the xAPI Profile and Activity contexts) that "@context" IRIs in `profile` can reference during context validation. Default `{}`. The `:result` keyword argument affects the return data, and can take one of the following values: - `:spec-error-data` Return a `{:error-type spec-error-data}` map. - `:type-path-string` Return a `{:err-type {:err-path err-string}}` map. - `:type-string` Return a `{:err-type err-string}` map. - `:string` Return the Expound-generated error string. - `:print` Print the error string to standard output.
(validate-profile-coll profile-coll
&
{:keys [syntax? ids? relations? contexts? extra-profiles
extra-contexts result]
:or {syntax? true
ids? false
relations? false
contexts? false
extra-profiles []
extra-contexts {}
result :spec-error-data}})
Like validate-profile
, but takes a profile-coll
instead of a
single Profile. Each Profile can reference objects in other Profiles
(as well as those in :extra-profiles
) and must not share object
IDs with those in other Profiles. During context validation, all
Profiles reference the global :extra-contexts
map. Keyword
arguments are the same as in validate-profile
, though the error
result (except for :print
) are now all vectors.
Like `validate-profile`, but takes a `profile-coll` instead of a single Profile. Each Profile can reference objects in other Profiles (as well as those in `:extra-profiles`) and must not share object IDs with those in other Profiles. During context validation, all Profiles reference the global `:extra-contexts` map. Keyword arguments are the same as in `validate-profile`, though the error result (except for `:print`) are now all vectors.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close