Liking cljdoc? Tell your friends :D

spdx.identifiers

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`).
raw docstring

canonicalise-idclj

(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:

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

deprecated-id?clj

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

equivalent?clj

(equivalent? s1 s2)

Are s1 and s2 (Strings) equivalent SPDX identifiers, LicenseRefs or AdditionRefs (i.e. taking the SPDX case sensitivity rules in SPDX Annex B into account)?

Notes:

  • Returns false if s1 or s2 are not listed SPDX identifiers or valid LicenseRefs or AdditionRefs
Are `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
sourceraw docstring

id->infoclj

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

id-typeclj

(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 - AdditionRef
  • nil - id is not a listed SPDX identifier, LicenseRef or AdditionRef
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` - AdditionRef
* `nil` - `id` is not a listed SPDX identifier, LicenseRef or
  AdditionRef
sourceraw docstring

idsclj

(ids)

The set of all listed SPDX identifiers.

The set of all listed SPDX identifiers.
sourceraw docstring

init!clj

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

listed-id?clj

(listed-id? id)

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

non-deprecated-idsclj

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

versionclj

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

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

× close