Class LicenseTextFormatWriter
java.lang.Object
org.spdx.licenselistpublisher.licensegenerator.LicenseTextFormatWriter
- All Implemented Interfaces:
ILicenseFormatWriter
Writes licenses in a simple text format
- Author:
- Gary O'Neall
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetTextFolder(File textFolder) voidwriteException(ListedExceptionContainer exceptionContainer) voidwriteLicense(ListedLicenseContainer licenseContainer, boolean deprecated, String deprecatedVersion) Formats and writes a specific licensevoidwriteLicense(ListedLicenseContainer licenseContainer, boolean deprecated, String deprecatedVersion, boolean wordWrapText) voidwriteToC()Write the Table of Contents file for the format if applicable
-
Constructor Details
-
LicenseTextFormatWriter
- Parameters:
textFolder- Folder to write the text files
-
-
Method Details
-
getTextFolder
- Returns:
- Folder to write the text files
-
setTextFolder
- Parameters:
textFolder- Folder to write the text files
-
writeLicense
public void writeLicense(ListedLicenseContainer licenseContainer, boolean deprecated, String deprecatedVersion, boolean wordWrapText) throws org.spdx.core.InvalidSPDXAnalysisException, IOException - Parameters:
licenseContainer- license to writedeprecated- true if deprecateddeprecatedVersion- version deprecated inwordWrapText- if true, reformat the license text wrapping words- Throws:
org.spdx.core.InvalidSPDXAnalysisExceptionIOException
-
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 exceptionContainer) throws IOException, org.spdx.core.InvalidSPDXAnalysisException - Specified by:
writeExceptionin interfaceILicenseFormatWriter- Parameters:
exceptionContainer- Exception to be formatted and written- Throws:
IOExceptionorg.spdx.core.InvalidSPDXAnalysisException
-