Liking cljdoc? Tell your friends :D

spdx.licenses

License list functionality, primarily provided by org.spdx.library.ListedLicenses.

Notes:

  • The functions in this namespace support any case of identifier or LicenseRef, as per the SPDX case sensitivity rules in SPDX Specification Annex B
License list functionality, primarily provided by `org.spdx.library.ListedLicenses`.

Notes:

* The functions in this namespace support any case of identifier or
  LicenseRef, as per the SPDX case sensitivity rules in [SPDX Specification Annex B](https://spdx.github.io/spdx-spec/v3.0.2/annexes/spdx-license-expressions/#case-sensitivity)
raw docstring

canonicaliseclj

(canonicalise s)

Canonicalises s (an SPDX license identifier or LicenseRef), by returning it in its canonical case. Returns nil if s is nil or not a listed SPDX license identifier or LicenseRef.

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 `s` (an SPDX license identifier or LicenseRef), by returning it
in its canonical case.  Returns `nil` if `s` is `nil` or not a listed SPDX
license identifier or LicenseRef.

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 a listed SPDX license identifier.

See this SPDX FAQ item for details on what this means.

Is `id` (a `String`) deprecated?  Also returns `false` if `id` is not a
listed SPDX license identifier.

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 license identifiers or LicenseRefs (i.e. taking the SPDX case sensitivity rules in SPDX Annex B into account)?

Are `s1` and `s2` (`String`s) equivalent SPDX license identifiers or
LicenseRefs (i.e. taking the SPDX case sensitivity rules in [SPDX
Annex B](https://spdx.github.io/spdx-spec/v3.0.2/annexes/spdx-license-expressions/#case-sensitivity)
into account)?
sourceraw docstring

fsf-libre-id?clj

(fsf-libre-id? id)

Is id (a String) FSF Libre? Also returns false if id is not in the SPDX license list.

See this reference for details about what 'FSF Libre' means.

Is `id` (a `String`) FSF Libre?  Also returns `false` if `id` is not in the
SPDX license list.

See [this reference](https://github.com/spdx/license-list-XML/blob/main/DOCS/license-fields.md)
for details about what 'FSF Libre' means.
sourceraw docstring

fsf-libre-idsclj

(fsf-libre-ids)
(fsf-libre-ids ids)

Returns the set of SPDX license identifiers that identify FSF Libre licenses within the provided set of SPDX license identifiers (or all of them, if ids is not provided).

See this reference for details about what 'FSF Libre' means.

Returns the set of SPDX license identifiers that identify FSF Libre licenses
within the provided set of SPDX license identifiers (or all of them, if `ids`
is not provided).

See [this reference](https://github.com/spdx/license-list-XML/blob/main/DOCS/license-fields.md)
for details about what 'FSF Libre' means.
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 license list information for id as a map, or nil if id is not a listed SPDX license identifier.

opts are:

  • :include-large-text-values? (default false) - controls whether large text values are included in the result or not
Returns SPDX license list information for `id` as a map, or `nil` if `id` is
not a listed SPDX license identifier.

`opts` are:

* `:include-large-text-values?` (default `false`) - controls whether large
  text values are included in the result or not
sourceraw docstring

idsclj

(ids)

The set of all SPDX license identifiers.

The set of all SPDX license 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

license-refclj

(license-ref license-ref-var-section)
(license-ref document-ref-var-section license-ref-var-section)

Constructs a LicenseRef (as a String) from individual 'variable section' Strings. Returns nil if license-ref-var-section is blank, or the resulting value is not a valid LicenseRef.

Constructs a LicenseRef (as a `String`) from individual 'variable
section' `String`s. Returns `nil` if `license-ref-var-section` is blank, or
the resulting value is not a valid LicenseRef.
sourceraw docstring

license-ref-map->stringclj

(license-ref-map->string m)

Turns map m representing a LicenseRef into a String, returning nil if m is nil or the resulting value is not a valid LicenseRef.

Notes:

Turns map `m` representing a LicenseRef into a `String`, returning `nil` if
`m` is `nil` or the resulting value is not a valid LicenseRef.

Notes:

* This fn is the inverse of [[string->license-ref-map]].
sourceraw docstring

license-ref?clj

(license-ref? s)

Is s (a String) a valid LicenseRef? See SPDX Specification Annex B for specifics.

Is `s` (a `String`) a valid LicenseRef? See
[SPDX Specification Annex B](https://spdx.github.io/spdx-spec/v3.0.2/annexes/spdx-license-expressions/)
for specifics.
sourceraw docstring

listed-id?clj

(listed-id? s)

Is s (a String) one of the listed SPDX license identifiers?

Is `s` (a `String`) one of the listed SPDX license identifiers?
sourceraw docstring

non-deprecated-idsclj

(non-deprecated-ids)
(non-deprecated-ids ids)

Returns the set of SPDX license identifiers that identify current (non-deprecated) licenses, within the provided set of listed SPDX license identifiers or all listed identifiers when ids not provided.

Returns the set of SPDX license identifiers that identify current
(non-deprecated) licenses, within the provided set of listed SPDX license
identifiers or all listed identifiers when `ids` not provided.
sourceraw docstring

osi-approved-id?clj

(osi-approved-id? id)

Is id (a String) OSI Approved? Also returns false if id is not a listed SPDX license identifier.

See this reference for details about what 'OSI Approved' means.

Is `id` (a `String`) OSI Approved?  Also returns `false` if `id` is not a
listed SPDX license identifier.

See [this reference](https://github.com/spdx/license-list-XML/blob/main/DOCS/license-fields.md)
for details about what 'OSI Approved' means.
sourceraw docstring

osi-approved-idsclj

(osi-approved-ids)
(osi-approved-ids ids)

Returns the set of SPDX license identifiers that identify OSI Approved licenses within the provided set of SPDX license identifiers (or all of them, if ids is not provided).

See this reference for details about what 'OSI Approved' means.

Returns the set of SPDX license identifiers that identify OSI Approved
licenses within the provided set of SPDX license identifiers (or all of them,
if `ids` is not provided).

See [this reference](https://github.com/spdx/license-list-XML/blob/main/DOCS/license-fields.md)
for details about what 'OSI Approved' means.
sourceraw docstring

string->license-ref-mapclj

(string->license-ref-map s)

Turns s (a String containing a LicenseRef) into a map representing that same LicenseRef. Returns nil if s is nil or not a valid LicenseRef.

Notes:

Turns `s` (a `String` containing a LicenseRef) into a `map` representing that
same LicenseRef.  Returns `nil` if `s` is `nil` or not a valid LicenseRef.

Notes:

* This fn is the inverse of [[license-ref-map->string]].
* This is equivalent to calling [[spdx.expressions/parse]] with `s`.
sourceraw docstring

versionclj

(version)

The version of the license list (a String in major.minor(.patchlevel) format).

Note: identical to spdx.identifiers/version.

The version of the license list (a `String` in major.minor(.patchlevel)
format).

Note: identical to [[spdx.identifiers/version]].
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close