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

    • LicenseJsonTOC

      public LicenseJsonTOC(String version, String releaseDate)
    • LicenseJsonTOC

      public LicenseJsonTOC()
  • Method Details

    • 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 add
      licHTMLReference - HTML URL reference for the license
      licJSONReference - URL reference to the JSON file
      deprecated - 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
    • toAbsoluteURL

      protected static String toAbsoluteURL(String relURL)