Object DeclaredLicenseProcessor
-
- All Implemented Interfaces:
-
org.apache.logging.log4j.kotlin.Logging
public class DeclaredLicenseProcessor implements Logging
-
-
Field Summary
Fields Modifier and Type Field Description private final KotlinLoggerloggerpublic final static DeclaredLicenseProcessorINSTANCE
-
Method Summary
Modifier and Type Method Description final SpdxExpressionprocess(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 ProcessedDeclaredLicenseprocess(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. -
-
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.
-
-
-
-