Class LicenseResolver
java.lang.Object
org.cyclonedx.util.LicenseResolver
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumLists possible choices for license text encodingstatic classData class aggregating settings for license text output -
Method Summary
Modifier and TypeMethodDescriptionstatic LicenseChoiceAttempts to resolve the specified license string via SPDX license identifier and expression parsing first.static LicenseChoiceAttempts to resolve the specified license string via SPDX license identifier and expression parsing first.static LicenseChoiceresolve(String licenseString, LicenseResolver.LicenseTextSettings licenseTextSettings) Attempts to resolve the specified license string via SPDX license identifier and expression parsing first.
-
Method Details
-
resolve
Attempts to resolve the specified license string via SPDX license identifier and expression parsing first. If SPDX resolution is not successful, the method will attempt fuzzy matching.- Parameters:
licenseString- the license string to resolve- Returns:
- a LicenseChoice object if resolution was successful, or null if unresolved
-
resolve
Attempts to resolve the specified license string via SPDX license identifier and expression parsing first. If SPDX resolution is not successful, the method will attempt fuzzy matching.- Parameters:
licenseString- the license string to resolveincludeLicenseText- specifies is the resolved license will include the entire text of the license- Returns:
- a LicenseChoice object if resolution was successful, or null if unresolved
-
resolve
public static LicenseChoice resolve(String licenseString, LicenseResolver.LicenseTextSettings licenseTextSettings) Attempts to resolve the specified license string via SPDX license identifier and expression parsing first. If SPDX resolution is not successful, the method will attempt fuzzy matching.- Parameters:
licenseString- the license string to resolvelicenseTextSettings- specifies settings regarding the entire text of the resolved license- Returns:
- a LicenseChoice object if resolution was successful, or null if unresolved
-