Identifier related functionality. This is mostly a convenience namespace
that delegates to spdx.licenses
or spdx.exceptions
as needed, based on
the 'type' of an identifier. This functionality is bespoke (it does not use
any logic from Spdx-Java-Library
).
Identifier related functionality. This is mostly a convenience namespace that delegates to [[spdx.licenses]] or [[spdx.exceptions]] as needed, based on the 'type' of an identifier. This functionality is bespoke (it does not use any logic from `Spdx-Java-Library`).
(canonicalise-id id)
Canonicalises id
(an SPDX identifier), by returning it in its canonical
case. Returns nil
if id
is nil
or not a listed SPDX identifier.
Notes:
spdx.expressions/canonicalise
can be used for that.Canonicalises `id` (an SPDX identifier), by returning it in its canonical case. Returns `nil` if `id` is `nil` or not a listed SPDX identifier. Notes: * This function does _not_ canonicalise a deprecated identifier to its non-deprecated equivalent(s), since some of those conversions result in an SPDX expression rather than an individual identifier. [[spdx.expressions/canonicalise]] can be used for that.
(deprecated-id? id)
Is id
(a String
) deprecated? Also returns false
if id
is not an SPDX
listed identifier (including for LicenseRefs and AdditionRefs).
See this SPDX FAQ item for details on what this means.
Is `id` (a `String`) deprecated? Also returns `false` if `id` is not an SPDX listed identifier (including for LicenseRefs and AdditionRefs). See [this SPDX FAQ item](https://github.com/spdx/license-list-XML/blob/main/DOCS/faq.md#what-does-it-mean-when-a-license-id-is-deprecated) for details on what this means.
(equivalent? s1 s2)
Are s1
and s2
(String
s) equivalent SPDX identifiers, LicenseRefs or
AdditionRefs (i.e. taking the SPDX case sensitivity rules in
SPDX Annex B
into account)?
Notes:
false
if s1
or s2
are not listed SPDX identifiers or valid
LicenseRefs or AdditionRefsAre `s1` and `s2` (`String`s) equivalent SPDX identifiers, LicenseRefs or AdditionRefs (i.e. taking the SPDX case sensitivity rules in [SPDX Annex B](https://spdx.github.io/spdx-spec/v3.0.1/annexes/spdx-license-expressions/#case-sensitivity) into account)? Notes: * Returns `false` if `s1` or `s2` are not listed SPDX identifiers or valid LicenseRefs or AdditionRefs
(id->info id)
(id->info id
{:keys [include-large-text-values?]
:or {include-large-text-values? false}
:as opts})
Returns SPDX list information for id
as a map, or nil
if id
is not a
valid SPDX identifier. Includes a :type
element that identifies whether the
id is an SPDX license identifier or an SPDX exception identifier, as per
id-type
.
opts
are:
:include-large-text-values?
(default false
) - controls wheter large text
values are included in the result or notReturns SPDX list information for `id` as a map, or `nil` if `id` is not a valid SPDX identifier. Includes a `:type` element that identifies whether the id is an SPDX license identifier or an SPDX exception identifier, as per [[id-type]]. `opts` are: * `:include-large-text-values?` (default `false`) - controls wheter large text values are included in the result or not
(id-type id)
The 'type' of id
; one of these values:
:license-id
- listed SPDX license identifier:exception-id
- listed SPDX exception identifier:license-ref
- LicenseRef:addition-ref
- AdditionRefnil
- id
is not a listed SPDX identifier, LicenseRef or
AdditionRefThe 'type' of `id`; one of these values: * `:license-id` - listed SPDX license identifier * `:exception-id` - listed SPDX exception identifier * `:license-ref` - LicenseRef * `:addition-ref` - AdditionRef * `nil` - `id` is not a listed SPDX identifier, LicenseRef or AdditionRef
(ids)
The set of all listed SPDX identifiers.
The set of all listed SPDX identifiers.
(init!)
Initialises this namespace upon first call (and does nothing on subsequent
calls), returning nil
. Consumers of this namespace are not required to call
this fn, as initialisation will occur implicitly anyway; it is provided to
allow explicit control of the cost of initialisation to callers who need it.
Note: this function may have a substantial performance cost.
Initialises this namespace upon first call (and does nothing on subsequent calls), returning `nil`. Consumers of this namespace are not required to call this fn, as initialisation will occur implicitly anyway; it is provided to allow explicit control of the cost of initialisation to callers who need it. Note: this function may have a substantial performance cost.
(listed-id? id)
Is id
(a String
) one of the listed SPDX identifiers?
Notes:
Is `id` (a `String`) one of the listed SPDX identifiers? Notes: * This fn supports any case of identifier, as per the SPDX case sensitivity rules in [SPDX Annex B](https://spdx.github.io/spdx-spec/v3.0.1/annexes/spdx-license-expressions/#case-sensitivity)
(non-deprecated-ids)
(non-deprecated-ids ids)
Returns the set of SPDX identifiers that identify current (non-deprecated)
licenses within the provided set of SPDX identifiers (or all of them, if ids
is not provided).
Returns the set of SPDX identifiers that identify current (non-deprecated) licenses within the provided set of SPDX identifiers (or all of them, if `ids` is not provided).
(version)
The version of the license list (a String
in major.minor(.patchlevel)
format).
The version of the license list (a `String` in major.minor(.patchlevel) format).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close