Package org.spdx.storage.listedlicense
Class ExceptionJsonTOC
- java.lang.Object
-
- org.spdx.storage.listedlicense.ExceptionJsonTOC
-
public class ExceptionJsonTOC 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 classExceptionJsonTOC.ExceptionJson
-
Constructor Summary
Constructors Constructor Description ExceptionJsonTOC()Create an ExceptionJsonTOCExceptionJsonTOC(String version, String releaseDate)Create an ExceptionJsonTOC
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddException(org.spdx.library.model.v2.license.ListedLicenseException exception, String exceptionHTMLReference, String exceptionJSONReference, boolean deprecated)Add a new exception to the list of exceptionsMap<String,String>getExceptionIds()Retrieve a map of lower case to correct case exception IDsList<ExceptionJsonTOC.ExceptionJson>getExceptions()Retrieve the list of exceptionsStringgetLicenseListVersion()Retrieve the license list versionStringgetReleaseDate()Retrieve the release datevoidsetLicenseListVersion(String licenseListVersion)Set the license list versionvoidsetReleaseDate(String releaseDate)Set the release date
-
-
-
Method Detail
-
getLicenseListVersion
@Nullable public String getLicenseListVersion()
Retrieve the license list version- Returns:
- the licenseListVersion
-
getExceptions
public List<ExceptionJsonTOC.ExceptionJson> getExceptions()
Retrieve the list of exceptions- Returns:
- the exceptions
-
getExceptionIds
public Map<String,String> getExceptionIds()
Retrieve a map of lower case to correct case exception IDs- Returns:
- A map of lower case to correct case exception IDs
-
getReleaseDate
@Nullable public String getReleaseDate()
Retrieve the release date- Returns:
- the releaseDate
-
addException
public void addException(org.spdx.library.model.v2.license.ListedLicenseException exception, String exceptionHTMLReference, String exceptionJSONReference, boolean deprecated) throws org.spdx.core.InvalidSPDXAnalysisExceptionAdd a new exception to the list of exceptions- Parameters:
exception- exception to be addedexceptionHTMLReference- URL of the exception HTMLexceptionJSONReference- URL of the JSONdeprecated- true if deprecated- Throws:
org.spdx.core.InvalidSPDXAnalysisException- on error accessing Exception properties
-
setLicenseListVersion
public void setLicenseListVersion(String licenseListVersion)
Set the license list version- Parameters:
licenseListVersion- the licenseListVersion to set
-
setReleaseDate
public void setReleaseDate(String releaseDate)
Set the release date- Parameters:
releaseDate- the releaseDate to set
-
-