Class LicenseMarkdownFormatWriter
java.lang.Object
org.spdx.licenselistpublisher.licensegenerator.LicenseMarkdownFormatWriter
- All Implemented Interfaces:
ILicenseFormatWriter
public class LicenseMarkdownFormatWriter extends Object implements ILicenseFormatWriter
Formats MarkDown files for the licenses
- Author:
- Gary O'Neall
-
Constructor Summary
Constructors Constructor Description LicenseMarkdownFormatWriter(String version, String releaseDate, File markdownFile) -
Method Summary
Modifier and Type Method Description FilegetMarkdownFile()voidsetMarkdownFile(File markdownFile)voidwriteException(org.spdx.library.model.license.ListedLicenseException exception)voidwriteLicense(org.spdx.library.model.license.SpdxListedLicense license, boolean deprecated, String deprecatedVersion)Formats and writes a specific licensevoidwriteToC()Write the Table of Contents file for the format if applicable
-
Constructor Details
-
LicenseMarkdownFormatWriter
- Parameters:
version- License list versionreleaseDate- release date for the license listmarkdownFile- Markdown formated file written by this class
-
-
Method Details
-
getMarkdownFile
- Returns:
- the markdownFile
-
setMarkdownFile
- Parameters:
markdownFile- the markdownFile to set
-
writeLicense
public void writeLicense(org.spdx.library.model.license.SpdxListedLicense license, boolean deprecated, String deprecatedVersion) throws IOException, org.spdx.library.InvalidSPDXAnalysisExceptionDescription copied from interface:ILicenseFormatWriterFormats and writes a specific license- Specified by:
writeLicensein interfaceILicenseFormatWriter- Parameters:
license- License to be addeddeprecated- True if deprecateddeprecatedVersion- License list version when the license was deprecated, null otherwise- Throws:
IOExceptionorg.spdx.library.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(org.spdx.library.model.license.ListedLicenseException exception) throws IOException, org.spdx.library.InvalidSPDXAnalysisException- Specified by:
writeExceptionin interfaceILicenseFormatWriter- Parameters:
exception- Exception to be formatted and written- Throws:
IOExceptionorg.spdx.library.InvalidSPDXAnalysisException
-