Class FsfLicenseDataParser
java.lang.Object
org.spdx.licenselistpublisher.licensegenerator.FsfLicenseDataParser
Singleton class which returns information maintained by the Free Software Foundation
The default behavior is to pull the FSF data from
https://spdx.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- Author:
- Gary O'Neall
-
Method Summary
Modifier and TypeMethodDescriptionstatic FsfLicenseDataParserisSpdxLicenseFsfLibre(String spdxLicenseId) Determines if an SPDX license is designated as FSF Free / Libre by FSF.
-
Method Details
-
getFsfLicenseDataParser
- Throws:
LicenseGeneratorException
-
isSpdxLicenseFsfLibre
Determines if an SPDX license is designated as FSF Free / Libre by FSF. Reference https://www.gnu.org/licenses/license-list.en.html- Parameters:
spdxLicenseId-- Returns:
- true if FSF describes the license as free / libre, false if FSF describes the license as not free / libre, null if FSF does not reference the license
-