Class SpdxWebsiteFormatWriter

java.lang.Object
org.spdx.licenselistpublisher.licensegenerator.SpdxWebsiteFormatWriter
All Implemented Interfaces:
ILicenseFormatWriter

public class SpdxWebsiteFormatWriter extends Object implements ILicenseFormatWriter
Writer to format all files for the https://spdx.org/licenses website
Author:
Gary O'Neall
  • Constructor Details

    • SpdxWebsiteFormatWriter

      public SpdxWebsiteFormatWriter(String version, String releaseDate, File websiteFolder)
      Parameters:
      version - License list version
      releaseDate - release date for the license list
      websiteFolder - Folder to store all of the website files
  • Method Details

    • getVersion

      public String getVersion()
      Returns:
      the version
    • setVersion

      public void setVersion(String version)
      Parameters:
      version - the version to set
    • getReleaseDate

      public String getReleaseDate()
      Returns:
      the releaseDate
    • setReleaseDate

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

      public org.spdx.storage.listedlicense.LicenseJson getLicJson()
      Returns:
      the licJson
    • getTableOfContentsJSON

      public org.spdx.storage.listedlicense.LicenseJsonTOC getTableOfContentsJSON()
      Returns:
      the tableOfContentsJSON
    • getHtmlExceptionToc

      public ExceptionHtmlToc getHtmlExceptionToc()
      Returns:
      the htmlExceptionToc
    • getJsonExceptionToc

      public org.spdx.storage.listedlicense.ExceptionJsonTOC getJsonExceptionToc()
      Returns:
      the jsonExceptionToc
    • getWebsiteFolder

      public File getWebsiteFolder()
      Returns:
      the websiteFolder
    • setWebsiteFolder

      public void setWebsiteFolder(File websiteFolder)
      Parameters:
      websiteFolder - the websiteFolder to set
    • getLicHtml

      public LicenseHTMLFile getLicHtml()
      Returns:
      the licHtml
    • setLicHtml

      public void setLicHtml(LicenseHTMLFile licHtml)
      Parameters:
      licHtml - the licHtml to set
    • getTableOfContentsHTML

      public LicenseTOCHTMLFile getTableOfContentsHTML()
      Returns:
      the tableOfContentsHTML
    • setTableOfContentsHTML

      public void setTableOfContentsHTML(LicenseTOCHTMLFile tableOfContentsHTML)
      Parameters:
      tableOfContentsHTML - the tableOfContentsHTML to set
    • writeLicense

      public void writeLicense(ListedLicenseContainer licenseContainer, boolean deprecated, String deprecatedVersion) throws IOException, LicenseGeneratorException, org.spdx.core.InvalidSPDXAnalysisException, org.spdx.licenseTemplate.InvalidLicenseTemplateException
      Description copied from interface: ILicenseFormatWriter
      Formats and writes a specific license
      Specified by:
      writeLicense in interface ILicenseFormatWriter
      Parameters:
      licenseContainer - License to be added
      deprecated - True if deprecated
      deprecatedVersion - License list version when the license was deprecated, null otherwise
      Throws:
      IOException
      LicenseGeneratorException
      org.spdx.core.InvalidSPDXAnalysisException
      org.spdx.licenseTemplate.InvalidLicenseTemplateException
    • writeToC

      public void writeToC() throws IOException
      Description copied from interface: ILicenseFormatWriter
      Write the Table of Contents file for the format if applicable
      Specified by:
      writeToC in interface ILicenseFormatWriter
      Throws:
      IOException
    • writeException

      public void writeException(ListedExceptionContainer exceptionContainer) throws IOException, org.spdx.licenseTemplate.InvalidLicenseTemplateException, LicenseGeneratorException, org.spdx.core.InvalidSPDXAnalysisException
      Specified by:
      writeException in interface ILicenseFormatWriter
      Parameters:
      exceptionContainer - Exception to be formatted and written
      Throws:
      IOException
      org.spdx.licenseTemplate.InvalidLicenseTemplateException
      LicenseGeneratorException
      org.spdx.core.InvalidSPDXAnalysisException