devonfw/solicitor

Automatically map RawLicenses obtained from Scancode data into NormalizedLicenses

Closed this issue · 0 comments

As a user I want Solicitor to map RawLicense data directly to NormalizedLicense objects if the RawLicense data is obtained from Scancode data. Data from scancode classifies licenses either

  • by the corresponding SPDX license id OR
  • by a LicenseRef-scancode-XXXXX identifier.

Mapping this to NormalizedLicenses currently requires explicit LicenseNameMapping or LicenseAssignment rules for the SPDX identifiers and LicenseRef-scancode-XXXXX identifiers.

With the new feature an automatic mapping should be done (in case that the origin of license data (RawLicense.origin) is scancode and the ApplicationComponent.dataStatus is any of the DA: (data available) values.

The mapping should be done as follows:

  • valid SPDX-IDs shall be mapped to type OSS-SPDX and the given SPDX ID
  • Licenses of form LicenseRef-scancode-XXXXshall be mapped to type SCANCODE and the LicenseRef-scancode-XXXX
  • Licenses matching an "ignorelist" (optional, configurable) shall be mapped to type IGNORE and Ignore.
  • LicenseRef-scancode-XXXX which contain the strings "unknown" or "proprietary" shall not be mapped automatically (configurable "blacklist" mechanism)

Any unmapped RawLicenses might then afterwards be mapped by the ususal approach of defining rules.