Interface ILicenseFormatWriter

All Known Implementing Classes:
LicenseHtmlFormatWriter, LicenseJsonFormatWriter, LicenseMarkdownFormatWriter, LicenseRdfaFormatWriter, LicenseRdfFormatWriter, LicenseTemplateFormatWriter, LicenseTextFormatWriter, SpdxWebsiteFormatWriter

public interface ILicenseFormatWriter
Writes licenses in a specific format
Author:
Gary O'Neall
  • Method Summary

    Modifier and Type Method Description
    void writeException​(org.spdx.library.model.license.ListedLicenseException exception)  
    void writeLicense​(org.spdx.library.model.license.SpdxListedLicense license, boolean deprecated, String deprecatedVersion)
    Formats and writes a specific license
    void writeToC()
    Write the Table of Contents file for the format if applicable
  • Method Details

    • writeLicense

      void writeLicense​(org.spdx.library.model.license.SpdxListedLicense license, boolean deprecated, String deprecatedVersion) throws IOException, LicenseGeneratorException, org.spdx.library.InvalidSPDXAnalysisException, org.spdx.licenseTemplate.InvalidLicenseTemplateException
      Formats and writes a specific license
      Parameters:
      license - License to be added
      deprecated - True if deprecated
      deprecatedVersion - License list version when the license was deprecated, null otherwise
      Throws:
      IOException
      LicenseGeneratorException
      org.spdx.library.InvalidSPDXAnalysisException
      org.spdx.licenseTemplate.InvalidLicenseTemplateException
    • writeToC

      void writeToC() throws IOException, LicenseGeneratorException
      Write the Table of Contents file for the format if applicable
      Throws:
      IOException
      LicenseGeneratorException
    • writeException

      void writeException​(org.spdx.library.model.license.ListedLicenseException exception) throws IOException, LicenseGeneratorException, org.spdx.licenseTemplate.InvalidLicenseTemplateException, org.spdx.library.InvalidSPDXAnalysisException
      Parameters:
      exception - Exception to be formatted and written
      Throws:
      IOException
      LicenseGeneratorException
      org.spdx.licenseTemplate.InvalidLicenseTemplateException
      org.spdx.library.InvalidSPDXAnalysisException