Package org.spdx.storage.listedlicense
Class LicenseJsonTOC
- java.lang.Object
-
- org.spdx.storage.listedlicense.LicenseJsonTOC
-
public class LicenseJsonTOC extends Object
Table of Contents for the listed license list as represented as a JSON index file at spdx.org/licenses/licenses.json- Author:
- Gary O'Neall
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LicenseJsonTOC.LicenseJson
-
Constructor Summary
Constructors Constructor Description LicenseJsonTOC()
LicenseJsonTOC(String version, String releaseDate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLicense(org.spdx.library.model.v2.license.SpdxListedLicense license, String licHTMLReference, String licJSONReference, boolean deprecated)
Add summary information about a specific license to the licenses listMap<String,String>
getLicenseIds()
String
getLicenseListVersion()
List<LicenseJsonTOC.LicenseJson>
getLicenses()
String
getReleaseDate()
void
setLicenseListVersion(String licenseListVersion)
void
setReleaseDate(String releaseDate)
protected static String
toAbsoluteURL(String relURL)
-
-
-
Method Detail
-
getLicenseListVersion
public String getLicenseListVersion()
- Returns:
- the licenseListVersion
-
getLicenses
public List<LicenseJsonTOC.LicenseJson> getLicenses()
- Returns:
- the licenses
-
getLicenseIds
public Map<String,String> getLicenseIds()
- Returns:
- map of lower case to correct case license IDs
-
getReleaseDate
public String getReleaseDate()
- Returns:
- the releaseDate
-
addLicense
public void addLicense(org.spdx.library.model.v2.license.SpdxListedLicense license, String licHTMLReference, String licJSONReference, boolean deprecated) throws org.spdx.core.InvalidSPDXAnalysisException
Add summary information about a specific license to the licenses list- Parameters:
license
- license to addlicHTMLReference
- HTML URL reference for the licenselicJSONReference
- URL reference to the JSON filedeprecated
- if true, license ID is deprecated- Throws:
org.spdx.core.InvalidSPDXAnalysisException
- on SPDX parsing error
-
setLicenseListVersion
public void setLicenseListVersion(String licenseListVersion)
- Parameters:
licenseListVersion
- the licenseListVersion to set
-
setReleaseDate
public void setReleaseDate(String releaseDate)
- Parameters:
releaseDate
- the releaseDate to set
-
-