Object DeclaredLicenseProcessor

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • process

         final SpdxExpression process(String declaredLicense, Map<String, SpdxExpression> customLicenseMapping)

        Try to map the declaredLicense to an SpdxExpression by taking both built-in mappings and customLicenseMapping into account. As a special case, a license may be mapped to SpdxConstants.NONE to mark it as something that is not a license, like a copyright that was accidentally entered as a license. Return the successfully mapped license expression, or null if the declared license could not be mapped.

      • process

         final ProcessedDeclaredLicense process(Set<String> declaredLicenses, Map<String, SpdxExpression> customLicenseMapping, SpdxOperator operator)

        Try to map all declaredLicenses to a (compound) SpdxExpression by taking both built-in mappings and customLicenseMapping into account. As a special case, a license may be mapped to SpdxConstants.NONE to mark it as something that is not a license, like a copyright that was accidentally entered as a license. Multiple declared licenses are reduced to a SpdxCompoundExpression using the specified operator. Return a ProcessedDeclaredLicense which contains the final SpdxExpression (or null if none of the declared licenses could be mapped), and the mapped and unmapped licenses respectively.