Class MarkdownTable

java.lang.Object
org.spdx.licenselistpublisher.MarkdownTable

public class MarkdownTable
extends Object
Holds license information and generates a file in markdown format which links to the HTML version of the license files
Author:
Gary O'Neall
  • Constructor Summary

    Constructors 
    Constructor Description
    MarkdownTable​(String licenseListVersion)  
  • Method Summary

    Modifier and Type Method Description
    void addException​(org.spdx.library.model.license.LicenseException exception, boolean deprecated)
    Add an exception to be added to the markdown table of contents
    void addLicense​(org.spdx.library.model.license.SpdxListedLicense license, boolean deprecated)
    Add a license to be included in the markdown table of contents
    void writeTOC​(Writer writer)
    Write the text for all of the added licenses and exceptions in the form of a MarkDown formatted table
    void writeToFile​(File file)
    Write the markdown table of contents to an existing file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • addException

      public void addException​(org.spdx.library.model.license.LicenseException exception, boolean deprecated) throws org.spdx.library.InvalidSPDXAnalysisException
      Add an exception to be added to the markdown table of contents
      Parameters:
      exception -
      deprecated -
      Throws:
      org.spdx.library.InvalidSPDXAnalysisException
    • addLicense

      public void addLicense​(org.spdx.library.model.license.SpdxListedLicense license, boolean deprecated) throws org.spdx.library.InvalidSPDXAnalysisException
      Add a license to be included in the markdown table of contents
      Parameters:
      license -
      deprecated -
      Throws:
      org.spdx.library.InvalidSPDXAnalysisException
    • writeToFile

      public void writeToFile​(File file) throws IOException
      Write the markdown table of contents to an existing file. Overwrites all content
      Parameters:
      file -
      Throws:
      IOException
    • writeTOC

      public void writeTOC​(Writer writer) throws IOException
      Write the text for all of the added licenses and exceptions in the form of a MarkDown formatted table
      Parameters:
      writer -
      Throws:
      IOException