Class 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 Detail

      • 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 Detail

      • getLicenseListVersion

        @Nullable
        public String getLicenseListVersion()
        Returns:
        the licenseListVersion
      • getExceptions

        public List<org.spdx.storage.listedlicense.ExceptionJsonTOC.ExceptionJson> getExceptions()
        Returns:
        the exceptions
      • getExceptionIds

        public Map<String,​String> getExceptionIds()
        Returns:
        map of lower case to correct case exception IDs
      • getReleaseDate

        @Nullable
        public String getReleaseDate()
        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)
        Parameters:
        licenseListVersion - the licenseListVersion to set
      • setReleaseDate

        public void setReleaseDate​(String releaseDate)
        Parameters:
        releaseDate - the releaseDate to set