Object DeclaredLicenseProcessor

  • All Implemented Interfaces:
    org.apache.logging.log4j.kotlin.Logging

    
    public class DeclaredLicenseProcessor
     implements Logging
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      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.
      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.
      • Methods inherited from class org.apache.logging.log4j.kotlin.Logging

        getLogger
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.