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
  • Constructor Details

    • ExceptionJsonTOC

      public ExceptionJsonTOC(String version, String releaseDate)
      Create an ExceptionJsonTOC
      Parameters:
      version - license list version
      releaseDate - release date of the license list
    • ExceptionJsonTOC

      public ExceptionJsonTOC()
      Create an ExceptionJsonTOC
  • Method Details

    • 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.InvalidSPDXAnalysisException
      Add a new exception to the list of exceptions
      Parameters:
      exception - exception to be added
      exceptionHTMLReference - URL of the exception HTML
      exceptionJSONReference - URL of the JSON
      deprecated - 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