Package org.spdx.licenselistpublisher
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 voidaddException(org.spdx.library.model.license.LicenseException exception, boolean deprecated)Add an exception to be added to the markdown table of contentsvoidaddLicense(org.spdx.library.model.license.SpdxListedLicense license, boolean deprecated)Add a license to be included in the markdown table of contentsvoidwriteTOC(Writer writer)Write the text for all of the added licenses and exceptions in the form of a MarkDown formatted tablevoidwriteToFile(File file)Write the markdown table of contents to an existing file.
-
Constructor Details
-
Method Details
-
addException
public void addException(org.spdx.library.model.license.LicenseException exception, boolean deprecated) throws org.spdx.library.InvalidSPDXAnalysisExceptionAdd 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.InvalidSPDXAnalysisExceptionAdd a license to be included in the markdown table of contents- Parameters:
license-deprecated-- Throws:
org.spdx.library.InvalidSPDXAnalysisException
-
writeToFile
Write the markdown table of contents to an existing file. Overwrites all content- Parameters:
file-- Throws:
IOException
-
writeTOC
Write the text for all of the added licenses and exceptions in the form of a MarkDown formatted table- Parameters:
writer-- Throws:
IOException
-