public class FsfLicenseDataParser extends Object
https://wking.github.io/fsf-api/licenses-full.json
If the URL is not accessible, the file resources/licenses-full.json in the same path as the .jar file will be used.
If the local file can not be found, then a properties file resources/licenses-full.json will be used.
There are two properties that can be used to control where the JSON file is loaded from:
LocalFsfFreeJson - if set to true, then use the local file or, if the local file is not found, the resource files and don't access the file from the github.io page
FsfFreeJsonUrl - the URL to pull the JSON file from. If both LocalFsfFreeJson and FsfFreeJsonUrl are specified, then
the LocalFsfFreeJson takes precedence and the local resource file will be used.
NOTE: This is currently using a non authoritative data source
TODO: Update the class to use an official FSF data source once available| Modifier and Type | Method and Description |
|---|---|
static FsfLicenseDataParser |
getFsfLicenseDataParser() |
Boolean |
isSpdxLicenseFsfLibre(String spdxLicenseId)
Determines if an SPDX license is designated as FSF Free / Libre by FSF.
|
public static FsfLicenseDataParser getFsfLicenseDataParser() throws LicenseGeneratorException
LicenseGeneratorExceptionpublic Boolean isSpdxLicenseFsfLibre(String spdxLicenseId)
spdxLicenseId - Copyright © 2018 Linux Foundation. All Rights Reserved.