(clear-decoration-rules! element-id)
Clears decoration rules for element element-id
.
Clears decoration rules for element `element-id`.
(clear-dictionary!)
Clear dictionary entries.
Clear dictionary entries.
(clear-undecoration-rules! element-id)
Clears undecoration rules for element element-id
.
Clears undecoration rules for element `element-id`.
(clear-validation-rules! element-id)
Clears validation rules for element element-id
.
Clears validation rules for element `element-id`.
(clone! parent-id id)
(clone! parent-id id ctx)
Clones parent-id
to the new element id id
.
Clones `parent-id` to the new element id `id`.
(custom-element! custom-elem element-info)
(custom-element! custom-elem id element)
(custom-element! custom-elem id element ctx)
(custom-element! custom-elem parent-id id element ctx)
Registers custom element with custom element init 'custom-elem, id
id, element map
elementwith optional element context
ctx and parent element id parent-id
. The
parent element may be used as a base for the element definition.
Registers custom element with custom element init 'custom-elem`, id `id`, element map `element` with optional element context `ctx and parent element id `parent-id`. The parent element may be used as a base for the element definition.
(data-dictionary)
(data-dictionary filter-f)
Generates a data dictionary given current element definitions.
Generates a data dictionary given current element definitions.
(decorate element-id v)
(decorate element-id v ctx)
Decorates element value v
using decoration rules for element element-id
with optional context map ctx
.
Decorates element value `v` using decoration rules for element `element-id` with optional context map `ctx`.
(decoration-rule! {:keys [element-id rule-id rule-f ctx]})
(decoration-rule! element-id rule-id rule-f)
(decoration-rule! element-id rule-id rule-f ctx)
Registers a decoration rule for element element-id
, decoration rule id rule-id
, rule function rule-f
,
and optional context map ctx
.
Registers a decoration rule for element `element-id`, decoration rule id `rule-id`, rule function `rule-f`, and optional context map `ctx`.
(document! id req-un)
(document! id req-un opt-un)
(document! id req-un opt-un element)
(document! id req req-un opt opt-un element ctx)
Register a document/map element given element id id
, required unqualified nested element ids req-un
,
optional nested unqualified element ids opt-un
, required nested element ids req
, optional nested element
ids opt-un
, element map element
and context ctx
.
Register a document/map element given element id `id`, required unqualified nested element ids `req-un`, optional nested unqualified element ids `opt-un`, required nested element ids `req`, optional nested element ids `opt-un`, element map `element` and context `ctx`.
(document-field-element-ids id)
Generates the field elements for document element id
for both
namespaced and unqualified fields.
Generates the field elements for document element `id` for both namespaced and unqualified fields.
(document-or-field m)
Returns either :documents or :fields based on if m
is a document/map.
Returns either :documents or :fields based on if `m` is a document/map.
(document-type? entry)
Determines if diction entry
is document type or not.
Determines if diction `entry` is document type or not.
(document? m)
Determines if m
element is a document/map.
Determines if `m` element is a document/map.
(element! element-info)
(element! id element)
(element! id element ctx)
(element! parent-id id element ctx)
Registers element with id id
, element map element
with optional element context ctx and parent element id
parent-id`. The
parent element may be used as a base for the element definition.
Registers element with id `id`, element map `element` with optional element context `ctx and parent element id `parent-id`. The parent element may be used as a base for the element definition.
(enum! id enums)
(enum! id enums element)
(enum! id enums element ctx)
Register an enum element given element id id
, enum set/list/vector enums
, element
map element
and context ctx
.
Register an enum element given element id `id`, enum set/list/vector `enums`, element map `element` and context `ctx`.
(explain id v)
Explains validation failures for element id
against element value v
as a vector of maps with validation
failure messages and info. If no validation failure occurs, returns nil.
Explains validation failures for element `id` against element value `v` as a vector of maps with validation failure messages and info. If no validation failure occurs, returns nil.
(explain-all id v)
Explains validation failures for element id
against element value v
as a vector of maps with validation
failure messages and info. If no validation failure occurs, returns nil.
Explains validation failures for element `id` against element value `v` as a vector of maps with validation failure messages and info. If no validation failure occurs, returns nil.
(explain-map nested-id
required-element-ids
required-element-ids-un
optional-element-ids
optional-element-ids-un
v
id
entry)
Explains nested required element entries with the nested-id
, listing of required element ids required-element-ids
,
element value v
, element id id
, and element element
.
Explains nested required element entries with the `nested-id`, listing of required element ids `required-element-ids`, element value `v`, element id `id`, and element `element`.
(explain-nested-elements nested-id parent-element-id v element-ids)
(explain-nested-elements nested-id parent-element-id v element-ids unqualified?)
(explain-nested-elements nested-id
parent-element-id
v
element-ids
unqualified?
optional?)
Explain nested elements.
Explain nested elements.
(export-entries)
Generates export vector of element entries.
Generates export vector of element entries.
(export-entries-to-file! fn)
Exports element entries to file fn
.
Exports element entries to file `fn`.
(field-element-id id fld-id)
Returns the namespaced (if available) field id for document element id
given
a field id id
.
Returns the namespaced (if available) field id for document element `id` given a field id `id`.
(filter-out-diction-elements x)
Filters out diction elements given element x
.
Filters out diction elements given element `x`.
(force-generate id)
Generates a valid value of element id id
.
Generates a valid value of element id `id`.
(function! {:keys [id f argument-element-ids result-element-id]})
(function! function-id f argument-element-ids result-element-id)
Registers function id id
for function f
and vector of element ids for the arguments
arugment-element-ids
, and result element id result-element-id
.
Registers function id `id` for function `f` and vector of element ids for the arguments `arugment-element-ids`, and result element id `result-element-id`.
(functions! fs)
Registers list of function fs
.
Registers list of function `fs`.
(generate-export-entry entry)
Generates export entry map from element entry entry
.
Generates export entry map from element entry `entry`.
(generate-nested-elements element-ids)
(generate-nested-elements element-ids unqualified?)
(generate-nested-elements element-ids unqualified? optional?)
Generates nested elements element-ids
with optional flags unqualified?
for
element id keys and optional?
for the nested elements.
Generates nested elements `element-ids` with optional flags `unqualified?` for element id keys and `optional?` for the nested elements.
(generate-random-boolean)
Generates a randome boolean true
or false
.
Generates a randome boolean `true` or `false`.
(generate-random-double)
(generate-random-double max)
(generate-random-double min max)
Generates random double numbers given optional minimum min
and maximum max
.
Default min is Double/MIN_VALUE. Default max is Double/MAX_VALUE.
Generates random double numbers given optional minimum `min` and maximum `max`. Default min is Double/MIN_VALUE. Default max is Double/MAX_VALUE.
(generate-random-float)
(generate-random-float max)
(generate-random-float min max)
Generates random float numbers given optional minimum min
and maximum max
.
Default min is Float/MIN_VALUE. Default max is Float/MAX_VALUE.
Generates random float numbers given optional minimum `min` and maximum `max`. Default min is Float/MIN_VALUE. Default max is Float/MAX_VALUE.
(generate-random-int)
(generate-random-int max)
(generate-random-int min max)
Generates random int numbers given optional minimum min
and maximum max
.
Default min is Integer/MIN_VALUE. Default max is Integer/MAX_VALUE.
Generates random int numbers given optional minimum `min` and maximum `max`. Default min is Integer/MIN_VALUE. Default max is Integer/MAX_VALUE.
(generate-random-joda)
(generate-random-joda max)
(generate-random-joda min max)
Generates random int numbers given optional minimum min
and maximum max
.
Default min is Integer/MIN_VALUE. Default max is Integer/MAX_VALUE.
Generates random int numbers given optional minimum `min` and maximum `max`. Default min is Integer/MIN_VALUE. Default max is Integer/MAX_VALUE.
(generate-random-keyword)
(generate-random-keyword max)
(generate-random-keyword min max)
(generate-random-keyword min max random-str)
Generates a random keyword given optional minimum length min
and maximum lenghts max
.
Default min is 0. Default max is 64.
Generates a random keyword given optional minimum length `min` and maximum lenghts `max`. Default min is 0. Default max is 64.
(generate-random-long)
(generate-random-long max)
(generate-random-long min max)
Generates random long numbers given optional minimum min
and maximum max
.
Default min is Long/MIN_VALUE. Default max is Long/MAX_VALUE.
Generates random long numbers given optional minimum `min` and maximum `max`. Default min is Long/MIN_VALUE. Default max is Long/MAX_VALUE.
(generate-random-map element-id)
Generates a random map.
Generates a random map.
(generate-random-poly-vector element-ids)
(generate-random-poly-vector element-ids max)
(generate-random-poly-vector element-ids min max)
(generate-random-poly-vector element-ids min max meta)
Generates a random poly vector of elements element-ids
given optional minimum size min
and maximum size max
.
Default min is 0. Default max is 16.
Generates a random poly vector of elements `element-ids` given optional minimum size `min` and maximum size `max`. Default min is 0. Default max is 16.
(generate-random-set element-id)
(generate-random-set element-id max)
(generate-random-set element-id min max)
(generate-random-set element-id min max meta)
Generates a random set of element element-id
given optional minimum size min
and maximum size max
.
Default min is 0. Default max is 16.
Generates a random set of element `element-id` given optional minimum size `min` and maximum size `max`. Default min is 0. Default max is 16.
(generate-random-string)
(generate-random-string max)
(generate-random-string min max)
(generate-random-string min max random-str)
Generates a random string given optional minimum length min
and maximum lenghts max
.
Default min is 0. Default max is 64.
Generates a random string given optional minimum length `min` and maximum lenghts `max`. Default min is 0. Default max is 64.
(generate-random-tuple element-ids)
Generates a random tuple of elements element-ids
Generates a random tuple of elements `element-ids`
(generate-random-vector element-id)
(generate-random-vector element-id max)
(generate-random-vector element-id min max)
(generate-random-vector element-id min max meta)
Generates a random vector of element element-id
given optional minimum size min
and maximum size max
.
Default min is 0. Default max is 16.
Generates a random vector of element `element-id` given optional minimum size `min` and maximum size `max`. Default min is 0. Default max is 16.
(generate-regex-keyword regex)
Generates a keyword using the regular expression regex
. Basic regex is supported only.
Generates a keyword using the regular expression `regex`. Basic regex is supported only.
(generate-regex-string regex)
Generates a string using the regular expression regex
. Basic regex is supported only.
Generates a string using the regular expression `regex`. Basic regex is supported only.
(generate-sensibly id)
(generate-sensibly id generate-as-fallback?)
Generates a sensible value for element with id
and optional generate-as-fallback?
flag to use the generative function for the element if no sensible values
exist in the meta of the element (:element :meta :sensible-values).
Generates a sensible value for element with `id` and optional `generate-as-fallback?` flag to use the generative function for the element if no sensible values exist in the meta of the element (:element :meta :sensible-values).
(generate-test-arguments arguments)
Generates test
Generates test
(groom id v)
(groom id v ctx)
(groom parent-id id v ctx)
Grooms the value
of element id
to align with only the registered diction elements.
If the value
is a map, then groom acts recursively like select-keys
to groom unregistered
keys and only passthru registered diction element keys (required and optional).
Grooms the `value` of element `id` to align with only the registered diction elements. If the `value` is a map, then groom acts recursively like `select-keys` to groom unregistered keys and only passthru registered diction element keys (required and optional).
(groom-vector parent-id id v)
(groom-vector parent-id id v ctx)
Grooms a vector of elements for parent-id
, id
, value v
and optional
context ctx
.
Grooms a vector of elements for `parent-id`, `id`, value `v` and optional context `ctx`.
(import! elem)
Import element elem
to diction data dictionary.
Import element `elem` to diction data dictionary.
(import-clone! elem)
Import a clone element elem
.
Import a clone element `elem`.
(import-document! elem)
Import the document element elem
.
Import the document element `elem`.
(import-element! elem)
(import-element! diction-f elem)
Import element elem
with optional diction function diction-f
.
Import element `elem` with optional diction function `diction-f`.
(import-entries! entries)
Imports element entries entries
.
Imports element entries `entries`.
(import-entries-from-file! fn)
Imports element entries from file fn
.
Imports element entries from file `fn`.
(import-from-file! source)
Import elements from source
file.
Import elements from `source` file.
(import-ofs! register-f of-key elem)
Import collection of of-key
elements for element elem
with the diction
register-f
function.
Import collection of `of-key` elements for element `elem` with the diction `register-f` function.
(imports! elements)
Imports elements elements
to diction data dictionary.
Imports elements `elements` to diction data dictionary.
(inherit! parent-id id)
(inherit! parent-id id element)
(inherit! parent-id id element ctx)
Register a child element given element id id
, parent element id parent-id
, element
map element
and context ctx
.
Register a child element given element id `id`, parent element id `parent-id`, element map `element` and context `ctx`.
(lookup id)
Lookup of element by element id id
.
Lookup of element by element id `id`.
(merge! {:keys [parent-id id element ctx]})
(merge! parent-id id)
(merge! parent-id id element)
(merge! parent-id id element ctx)
Merges and registers parent id parent-id
for element id
with optional
element map element
and context map ctx
.
Merges and registers parent id `parent-id` for element `id` with optional element map `element` and context map `ctx`.
(merge-entities! {:keys [parent-ids id element ctx]})
(merge-entities! parent-ids id)
(merge-entities! parent-ids id element)
(merge-entities! parent-ids id element ctx)
Merges and registers parent id parent-id
for element id
with optional
element map element
and context map ctx
.
Merges and registers parent id `parent-id` for element `id` with optional element map `element` and context map `ctx`.
(meta-query {:keys [element-ids query query-f mask] :as meta-query-map})
Query diction element metadata with map meta-query-map
and keys
element-ids
(optional) : subset of element ids to search;
query
(required) : query map that will simple try to match the element meta data map
Query diction element metadata with map `meta-query-map` and keys `element-ids` (optional) : subset of element ids to search; `query` (required) : query map that will simple try to match the element meta data map
(normalize-any m)
Normalizes the any entry type elements (if necessary) given element map m
. If not a string type, passhtru
the element map m
.
Normalizes the any entry type elements (if necessary) given element map `m`. If not a string type, passhtru the element map `m`.
(normalize-boolean m)
Normalizes the boolean type elements (if necessary) given element map m
. If not a boolean type, passhtru
the element map m
.
Normalizes the boolean type elements (if necessary) given element map `m`. If not a boolean type, passhtru the element map `m`.
(normalize-class m)
Normalizes the class entry type elements (if necessary) given element map m
. If not a class type, passhtru
the element map m
.
Normalizes the class entry type elements (if necessary) given element map `m`. If not a class type, passhtru the element map `m`.
(normalize-double m)
Normalizes the double number entry type elements (if necessary) given element map m
. If not a double number type, passhtru
the element map m
.
Normalizes the double number entry type elements (if necessary) given element map `m`. If not a double number type, passhtru the element map `m`.
(normalize-element parent-id id original-element ctx merged-element)
Generates entry settings for element id id
given the original element map original-element
(from the call argument),
merged element from parent and original element merged-element``, and optional
parent-idand context map
ctx`.
Generates entry settings for element id `id` given the original element map `original-element` (from the call argument), merged element from parent and original element `merged-element``, and optional `parent-id` and context map `ctx`.
(normalize-enum m)
Normalizes the enumeration entry type elements (if necessary) given element map m
. If not an enum type, passhtru
the element map m
.
Normalizes the enumeration entry type elements (if necessary) given element map `m`. If not an enum type, passhtru the element map `m`.
(normalize-float m)
Normalizes the float number entry type elements (if necessary) given element map m
. If not a float number type, passhtru
the element map m
.
Normalizes the float number entry type elements (if necessary) given element map `m`. If not a float number type, passhtru the element map `m`.
(normalize-int m)
Normalizes the int number entry type elements (if necessary) given element map m
. If not a int number type, passhtru
the element map m
.
Normalizes the int number entry type elements (if necessary) given element map `m`. If not a int number type, passhtru the element map `m`.
(normalize-joda m)
Normalizes the joda entry type elements (if necessary) given element map m
. If not a string type, passhtru
the element map m
.
Normalizes the joda entry type elements (if necessary) given element map `m`. If not a string type, passhtru the element map `m`.
(normalize-keyword m)
Normalizes the keyword entry type elements (if necessary) given element map m
. If not a string type, passhtru
the element map m
.
Normalizes the keyword entry type elements (if necessary) given element map `m`. If not a string type, passhtru the element map `m`.
(normalize-long m)
Normalizes the long number entry type elements (if necessary) given element map m
. If not a long number type, passhtru
the element map m
.
Normalizes the long number entry type elements (if necessary) given element map `m`. If not a long number type, passhtru the element map `m`.
(normalize-map m)
Normalizes the required-optional/map entry type elements (if necessary) given entry map m
. If not a required-optiona/map type,
passhtru the entry map m
.
Normalizes the required-optional/map entry type elements (if necessary) given entry map `m`. If not a required-optiona/map type, passhtru the entry map `m`.
(normalize-poly-vector m)
Normalizes the poly-vector-of entry type elements (if necessary) given element map m
.
If not a poly-vector-of type, passhtru the element map m
.
Normalizes the poly-vector-of entry type elements (if necessary) given element map `m`. If not a poly-vector-of type, passhtru the element map `m`.
(normalize-set m)
Normalizes the set entry type elements (if necessary) given element map m
. If not a set type,
passhtru the element map m
.
Normalizes the set entry type elements (if necessary) given element map `m`. If not a set type, passhtru the element map `m`.
(normalize-string m)
Normalizes the string entry type elements (if necessary) given element map m
. If not a string type, passhtru
the element map m
.
Normalizes the string entry type elements (if necessary) given element map `m`. If not a string type, passhtru the element map `m`.
(normalize-tuple m)
Normalizes the poly-tuple-of entry type elements (if necessary) given element map m
.
If not a tuple type, passhtru the element map m
.
Normalizes the poly-tuple-of entry type elements (if necessary) given element map `m`. If not a tuple type, passhtru the element map `m`.
(normalize-vector m)
Normalizes the vector-of entry type elements (if necessary) given element map m
. If not a vector-of type,
passhtru the element map m
.
Normalizes the vector-of entry type elements (if necessary) given element map `m`. If not a vector-of type, passhtru the element map `m`.
(poly-vector! id vector-of-element-ids)
(poly-vector! id vector-of-element-ids element)
(poly-vector! id vector-of-element-ids element ctx)
Register a poly vector (polyglot of element ids) element given element id id
,
vector element ids vector-of-element-ids
, element map element
and context ctx
.
Register a poly vector (polyglot of element ids) element given element id `id`, vector element ids `vector-of-element-ids`, element map `element` and context `ctx`.
(random-sensible-value id)
(random-sensible-value id generate-as-fallback?)
Returns random sensible value (:element :meta :sensible-values) for
element id
and optional generate-as-fallback?
flag.
Returns nil
if no sensible values are found and optional genereate-as-fallback?
flag is false
or nil
.
If no sensible values are found and optional generate-as-fallback?
flag
is truthy
, then attempt to generate value for element id
.
Returns random sensible value (:element :meta :sensible-values) for element `id` and optional `generate-as-fallback?` flag. Returns `nil` if no sensible values are found and optional `genereate-as-fallback?` flag is `false` or `nil`. If no sensible values are found and optional `generate-as-fallback?` flag is `truthy`, then attempt to generate value for element `id`.
(references element-id)
Determine the documents that reference the element element-id
.
Determine the documents that reference the element `element-id`.
(register-element! elem)
Register element elem
using declarative data.
Register element `elem` using declarative data.
(remove-decoration-rule! element-id rule-id)
Removes decoration rule rule-id
from element element-id
.
Removes decoration rule `rule-id` from element `element-id`.
(remove-undecoration-rule! element-id rule-id)
Removes undecoration rule rule-id
from element element-id
.
Removes undecoration rule `rule-id` from element `element-id`.
(remove-validation-rule! element-id rule-id)
Removes validation rule rule-id
from element element-id
.
Removes validation rule `rule-id` from element `element-id`.
(reset-decoration-rules!)
(reset-decoration-rules! x)
Resets the decoration rules. Clears all decoration rules if no arguments or x
is nil
. Otherwise,
reset the decoration rules to x
.
Resets the decoration rules. Clears all decoration rules if no arguments or `x` is `nil`. Otherwise, reset the decoration rules to `x`.
(reset-undecoration-rules!)
(reset-undecoration-rules! x)
Resets the undecoration rules. Clears all undecoration rules if no arguments or x
is nil
. Otherwise,
reset the undecoration rules to x
.
Resets the undecoration rules. Clears all undecoration rules if no arguments or `x` is `nil`. Otherwise, reset the undecoration rules to `x`.
(reset-validation-rules!)
(reset-validation-rules! x)
Resets the validation rules. Clears all validation rules if no arguments or x
is nil
. Otherwise,
reset the validation rules to x
.
Resets the validation rules. Clears all validation rules if no arguments or `x` is `nil`. Otherwise, reset the validation rules to `x`.
(resolve-merged-entities e & es)
Resolve merged entites e
and variadic entites es
.
Resolve merged entites `e` and variadic entites `es`.
(resolve-req-opt-un req-un opt-un)
Resolves optional unqualified given the existing required unqualified req-un
and the initial opertional unqualified opt-un
so that there are no unqualified
element keys in opertional that are also in the required unqualified.
Resolves optional unqualified given the existing required unqualified `req-un` and the initial opertional unqualified `opt-un` so that there are no unqualified element keys in opertional that are also in the required unqualified.
(resolve-unqualified key es)
Resolve unqualified element keys given entitiy maps es
and the
key
of either required-un
or optional-un
.
Resolve unqualified element keys given entitiy maps `es` and the `key` of either `required-un` or `optional-un`.
(set-of! id set-of-element-id)
(set-of! id set-of-element-id element)
(set-of! id set-of-element-id element ctx)
Register a set element given element id id
, set element id set-of-element-id
, element
map element
and context ctx
.
Register a set element given element id `id`, set element id `set-of-element-id`, element map `element` and context `ctx`.
(split-meta-query q)
Splits query map q
into functions and non-functions based on
values. Function kvs are in {true : {}} and non-function kvs are in {false : {}}.
Splits query map `q` into functions and non-functions based on values. Function kvs are in {true : {}} and non-function kvs are in {false : {}}.
(summary-entry entry)
Generates an index entry for element entry entry
.
Generates an index entry for element entry `entry`.
(test-all-functions)
(test-all-functions test-function-count)
Generatively test all registered functions with optional test function count test-function-count
.
Generatively test all registered functions with optional test function count `test-function-count`.
(test-function function-id)
(test-function function-id test-function-count)
Generatively tests registered function function-id
with optional test count test-function-count
.
Returns nil
is all generative test function calls pass. Otherwise, return failures.
Generatively tests registered function `function-id` with optional test count `test-function-count`. Returns `nil` is all generative test function calls pass. Otherwise, return failures.
(tuple! id vector-of-element-ids)
(tuple! id vector-of-element-ids element)
(tuple! id vector-of-element-ids element ctx)
Register a tuple (polyglot of element ids) element given element id id
,
vector element ids vector-of-element-ids
, element map element
and context ctx
.
Register a tuple (polyglot of element ids) element given element id `id`, vector element ids `vector-of-element-ids`, element map `element` and context `ctx`.
(type-normalizer! normalizer-f)
Register register normalizer function normalizer-f
.
Register register normalizer function `normalizer-f`.
(type-normalizers! normalizer-fs)
Registers register normalizer fuction normalizer-fs
.
Registers register normalizer fuction `normalizer-fs`.
(undecorate element-id v)
(undecorate element-id v ctx)
Undecorates element value v
using undecoration rules for element element-id
with optional context map ctx
.
Undecorates element value `v` using undecoration rules for element `element-id` with optional context map `ctx`.
(undecoration-rule! {:keys [element-id rule-id rule-f ctx]})
(undecoration-rule! element-id rule-id rule-f)
(undecoration-rule! element-id rule-id rule-f ctx)
Registers an undecoration rule for element element-id
, undecoration rule id rule-id
, rule function rule-f
,
and optional context map ctx
.
Registers an undecoration rule for element `element-id`, undecoration rule id `rule-id`, rule function `rule-f`, and optional context map `ctx`.
(valid-all? id v)
Determines if the element value v
of element id
is valid.
Determines if the element value `v` of element `id` is valid.
(valid? id v)
Determines if the element value v
of element id
is valid.
Determines if the element value `v` of element `id` is valid.
(validate-boolean v id entry)
Validates if value v
is boolean.
Validates if value `v` is boolean.
(validate-class c v id entry)
Validates that the class c
is the same as the class of v
given optional element id id
and entry entry
.
Validates that the class `c` is the same as the class of `v` given optional element id `id` and entry `entry`.
(validate-double min max v id entry)
Validates that a double number value v
is valid given the optional minimum min
, maximum max
, element id
id
, and element entry
.
Validates that a double number value `v` is valid given the optional minimum `min`, maximum `max`, element id `id`, and element `entry`.
(validate-enum enum-s v id entry)
Validates an enum type set enum-s
against element value v
given element id id
and entry entry
for better
validation failure messages.
Validates an enum type set `enum-s` against element value `v` given element id `id` and entry `entry` for better validation failure messages.
(validate-float min max v id entry)
Validates that a float number value v
is valid given the optional minimum min
, maximum max
, element id
id
, and element entry
.
Validates that a float number value `v` is valid given the optional minimum `min`, maximum `max`, element id `id`, and element `entry`.
(validate-int min max v id entry)
Validates that an int number value v
is valid given the optional minimum min
, maximum max
, element id
id
, and element entry
.
Validates that an int number value `v` is valid given the optional minimum `min`, maximum `max`, element id `id`, and element `entry`.
(validate-joda min max v id entry)
Validates that a Joda datetime value v
is valid given the optional minimum min
, maximum max
, element id
id
, and entry entry
.
Validates that a Joda datetime value `v` is valid given the optional minimum `min`, maximum `max`, element id `id`, and entry `entry`.
(validate-keyword min max regex v id entry)
Validates a string value v
given minimum length min
(if non-nil), maximum length max
(if non-nil),
and regular expression regex
(if non-nil). The element id id
of the string element as well as the element entry entry
of the string element is also provided for better validation failure messages.
Validates a string value `v` given minimum length `min` (if non-nil), maximum length `max` (if non-nil), and regular expression `regex` (if non-nil). The element id `id` of the string element as well as the element entry `entry` of the string element is also provided for better validation failure messages.
(validate-long min max v id entry)
Validates that a long number value v
is valid given the optional minimum min
, maximum max
, element id
id
, and element entry
.
Validates that a long number value `v` is valid given the optional minimum `min`, maximum `max`, element id `id`, and element `entry`.
(validate-poly-vector-of vector-of-element-ids min max v id entry)
Validates the poly vector of element ids vector-of-element-ids
given a mininum length min
, maximum length max
,
element poly vector value v
, parent element id id
, and entry entry
.
Validates the poly vector of element ids `vector-of-element-ids` given a mininum length `min`, maximum length `max`, element poly vector value `v`, parent element id `id`, and entry `entry`.
(validate-set-of set-of-element-id min max v id entry)
Validates the set of element id set-of-element-id
given a mininum length min
, maximum length max
,
element value v
, parent element id id
, and entry entry
.
Validates the set of element id `set-of-element-id` given a mininum length `min`, maximum length `max`, element value `v`, parent element id `id`, and entry `entry`.
(validate-string min max regex v id entry)
Validates a string value v
given minimum length min
(if non-nil), maximum length max
(if non-nil),
and regular expression regex
(if non-nil). The element id id
of the string element as well as the element entry entry
of the string element is also provided for better validation failure messages.
Validates a string value `v` given minimum length `min` (if non-nil), maximum length `max` (if non-nil), and regular expression `regex` (if non-nil). The element id `id` of the string element as well as the element entry `entry` of the string element is also provided for better validation failure messages.
(validate-tuple-of vector-of-element-ids v id entry)
Validates the tuple of element ids vector-of-element-ids
given
element tuple value v
, parent element id id
, and entry entry
.
Validates the tuple of element ids `vector-of-element-ids` given element tuple value `v`, parent element id `id`, and entry `entry`.
(validate-vector-of vector-of-element-id min max v id entry)
Validates the vector of element id vector-of-element-id
given a mininum length min
, maximum length max
,
element value v
, parent element id id
, and entry entry
.
Validates the vector of element id `vector-of-element-id` given a mininum length `min`, maximum length `max`, element value `v`, parent element id `id`, and entry `entry`.
(validation-rule! {:keys [element-id rule-id rule-f ctx]})
(validation-rule! element-id rule-id rule-f)
(validation-rule! element-id rule-id rule-f ctx)
Registers a validation rule for element id element-id
, rule id id
, rule function rule-f
, and optional
conext map ctx
.
Registers a validation rule for element id `element-id`, rule id `id`, rule function `rule-f`, and optional conext map `ctx`.
(vector! id vector-of-element-id)
(vector! id vector-of-element-id element)
(vector! id vector-of-element-id element ctx)
Register a vector element given element id id
, vector element id vector-of-element-id
, element
map element
and context ctx
.
Register a vector element given element id `id`, vector element id `vector-of-element-id`, element map `element` and context `ctx`.
(wrap-gen-f gen-f)
Wraps generatior function gen-f
with a function that ignores the element id id
and element entry entry
trailing
paramsters when called by the framework to generate a element value. This may be used when the element value
generator function does not need the id
or entry
to generate the value.
Wraps generatior function `gen-f` with a function that ignores the element id `id` and element entry `entry` trailing paramsters when called by the framework to generate a element value. This may be used when the element value generator function does not need the `id` or `entry` to generate the value.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close