Class LicenseMarkdownFormatWriter
java.lang.Object
org.spdx.licenselistpublisher.licensegenerator.LicenseMarkdownFormatWriter
- All Implemented Interfaces:
ILicenseFormatWriter
Formats MarkDown files for the licenses
- Author:
- Gary O'Neall
-
Constructor Summary
ConstructorsConstructorDescriptionLicenseMarkdownFormatWriter(String version, String releaseDate, File markdownFile) -
Method Summary
Modifier and TypeMethodDescriptionvoidsetMarkdownFile(File markdownFile) voidwriteException(ListedExceptionContainer exceptionContianer) voidwriteLicense(ListedLicenseContainer licenseContainer, boolean deprecated, String deprecatedVersion) Formats and writes a specific licensevoidwriteToC()Write the Table of Contents file for the format if applicable
-
Constructor Details
-
LicenseMarkdownFormatWriter
-
-
Method Details
-
getMarkdownFile
- Returns:
- the markdownFile
-
setMarkdownFile
- Parameters:
markdownFile- the markdownFile to set
-
writeLicense
public void writeLicense(ListedLicenseContainer licenseContainer, boolean deprecated, String deprecatedVersion) throws IOException, org.spdx.core.InvalidSPDXAnalysisException Description copied from interface:ILicenseFormatWriterFormats and writes a specific license- Specified by:
writeLicensein interfaceILicenseFormatWriter- Parameters:
licenseContainer- License to be addeddeprecated- True if deprecateddeprecatedVersion- License list version when the license was deprecated, null otherwise- Throws:
IOExceptionorg.spdx.core.InvalidSPDXAnalysisException
-
writeToC
Description copied from interface:ILicenseFormatWriterWrite the Table of Contents file for the format if applicable- Specified by:
writeToCin interfaceILicenseFormatWriter- Throws:
IOException
-
writeException
public void writeException(ListedExceptionContainer exceptionContianer) throws IOException, org.spdx.core.InvalidSPDXAnalysisException - Specified by:
writeExceptionin interfaceILicenseFormatWriter- Parameters:
exceptionContianer- Exception to be formatted and written- Throws:
IOExceptionorg.spdx.core.InvalidSPDXAnalysisException
-