(count-ids ids-coll)
Count the number of ID instances by creating a map between IDs and their respective counts. (Ideally theys should all be one, as IDs MUST be unique by definition.)
Count the number of ID instances by creating a map between IDs and their respective counts. (Ideally theys should all be one, as IDs MUST be unique by definition.)
(dissoc-properties object)
Dissoc properties that may change between version increments.
Dissoc properties that may change between version increments.
(filter-by-ids id-set obj-coll)
Given obj-coll
of maps with the :id
key, filter such that only those
with IDs present in id-set
remain.
Given `obj-coll` of maps with the `:id` key, filter such that only those with IDs present in `id-set` remain.
(filter-by-ids-kv id-set id-val-m)
Similar to filter-by-ids
, except that id-val-m
is a map from IDs
to values.
Similar to `filter-by-ids`, except that `id-val-m` is a map from IDs to values.
(objs->ids obj-coll)
Return a lazy seq of IDs from a collection of objects.
Return a lazy seq of IDs from a collection of objects.
(objs->out-ids obj-coll selected-keys)
Given obj-coll
of maps with IRI/IRI-array valued keys (defined by
selected-keys
), return a set of all such IRI values. Does not check
whether or not the IDs already exist in obj-coll
.
Given `obj-coll` of maps with IRI/IRI-array valued keys (defined by `selected-keys`), return a set of all such IRI values. Does not check whether or not the IDs already exist in `obj-coll`.
(objs->out-ids-map obj-coll selected-keys)
(objs->out-ids-map obj-coll selected-keys filter-id-set)
Like obj->out-ids
, but returns a map from keys to sets of IRI values.
Passing in the optional filter-id-set
arg removes IRI values form
the result that are in that set.
Like `obj->out-ids`, but returns a map from keys to sets of IRI values. Passing in the optional `filter-id-set` arg removes IRI values form the result that are in that set.
(validate-ids profile)
(validate-ids profile extra-profiles)
Validate that every ID in profile
within each inScheme/version
is distinct. If extra-profiles
is provided, ensure that
IDs in profile
are not duplicated in there either.
Validate that every ID in `profile` within each inScheme/version is distinct. If `extra-profiles` is provided, ensure that IDs in `profile` are not duplicated in there either.
(validate-inschemes profile)
Takes a Profile and validates all object inSchemes, which MUST be valid version IDs. Returns nil on success, or spec error data on failure.
Takes a Profile and validates all object inSchemes, which MUST be valid version IDs. Returns nil on success, or spec error data on failure.
(validate-version-change profile)
Validate that every object in profile
that is shared between
versions follows versioning requirements, i.e. they don't differ
in certain properties.
Validate that every object in `profile` that is shared between versions follows versioning requirements, i.e. they don't differ in certain properties.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close