Liking cljdoc? Tell your friends :D

com.yetanalytics.pan


get-external-irisclj/s

(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.
sourceraw docstring

json-profile->ednclj/s

(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 `_`).
sourceraw docstring

validate-profileclj/s

(validate-profile profile
                  &
                  {:keys [syntax? ids? relations? concept-rels? template-rels?
                          pattern-rels? contexts? extra-profiles extra-contexts
                          result]
                   :or {pattern-rels? false
                        syntax? true
                        concept-rels? false
                        template-rels? false
                        ids? false
                        extra-contexts {}
                        relations? false
                        result :spec-error-data
                        extra-profiles []
                        contexts? false}})

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.
  • :concept-rels? Validate Concept-specific relations. Default false, and is overridden if :relations? is true.
  • :template-rels? Validate Statement Template-specific relations (incl. Concept-Template relations). Default false, and is overridden if :relations? is true.
  • :pattern-rels? Validate Pattern-specific relations (incl. Pattern and Statement Template relations). Default false, and is overridden if :relations? is true.
  • :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`.
- `:concept-rels?`  Validate Concept-specific relations. Default `false`,
                    and is overridden if `:relations?` is `true`.
- `:template-rels?` Validate Statement Template-specific relations (incl.
                    Concept-Template relations). Default `false`, and is
                    overridden if `:relations?` is `true`.
- `:pattern-rels`?  Validate Pattern-specific relations (incl. Pattern and
                    Statement Template relations). Default `false`, and is
                    overridden if `:relations?` is `true`.
- `: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.
sourceraw docstring

validate-profile-collclj/s

(validate-profile-coll profile-coll
                       &
                       {:keys [syntax? ids? relations? concept-rels?
                               template-rels? pattern-rels? contexts?
                               extra-profiles extra-contexts result]
                        :or {pattern-rels? false
                             syntax? true
                             concept-rels? false
                             template-rels? false
                             ids? false
                             extra-contexts {}
                             relations? false
                             result :spec-error-data
                             extra-profiles []
                             contexts? false}})

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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close