Class SpdxWebsiteFormatWriter
java.lang.Object
org.spdx.licenselistpublisher.licensegenerator.SpdxWebsiteFormatWriter
- All Implemented Interfaces:
ILicenseFormatWriter
Writer to format all files for the https://spdx.org/licenses website
- Author:
- Gary O'Neall
-
Constructor Summary
ConstructorsConstructorDescriptionSpdxWebsiteFormatWriter(String version, String releaseDate, File websiteFolder) -
Method Summary
Modifier and TypeMethodDescriptionorg.spdx.storage.listedlicense.ExceptionJsonTOCorg.spdx.storage.listedlicense.LicenseJsonorg.spdx.storage.listedlicense.LicenseJsonTOCvoidsetLicHtml(LicenseHTMLFile licHtml) voidsetReleaseDate(String releaseDate) voidsetTableOfContentsHTML(LicenseTOCHTMLFile tableOfContentsHTML) voidsetVersion(String version) voidsetWebsiteFolder(File websiteFolder) voidwriteException(ListedExceptionContainer exceptionContainer) 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
-
SpdxWebsiteFormatWriter
-
-
Method Details
-
getVersion
- Returns:
- the version
-
setVersion
- Parameters:
version- the version to set
-
getReleaseDate
- Returns:
- the releaseDate
-
setReleaseDate
- Parameters:
releaseDate- the releaseDate to set
-
getLicJson
public org.spdx.storage.listedlicense.LicenseJson getLicJson()- Returns:
- the licJson
-
getTableOfContentsJSON
public org.spdx.storage.listedlicense.LicenseJsonTOC getTableOfContentsJSON()- Returns:
- the tableOfContentsJSON
-
getHtmlExceptionToc
- Returns:
- the htmlExceptionToc
-
getJsonExceptionToc
public org.spdx.storage.listedlicense.ExceptionJsonTOC getJsonExceptionToc()- Returns:
- the jsonExceptionToc
-
getWebsiteFolder
- Returns:
- the websiteFolder
-
setWebsiteFolder
- Parameters:
websiteFolder- the websiteFolder to set
-
getLicHtml
- Returns:
- the licHtml
-
setLicHtml
- Parameters:
licHtml- the licHtml to set
-
getTableOfContentsHTML
- Returns:
- the tableOfContentsHTML
-
setTableOfContentsHTML
- Parameters:
tableOfContentsHTML- the tableOfContentsHTML to set
-
writeLicense
public void writeLicense(ListedLicenseContainer licenseContainer, boolean deprecated, String deprecatedVersion) throws IOException, LicenseGeneratorException, org.spdx.core.InvalidSPDXAnalysisException, org.spdx.licenseTemplate.InvalidLicenseTemplateException 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:
IOExceptionLicenseGeneratorExceptionorg.spdx.core.InvalidSPDXAnalysisExceptionorg.spdx.licenseTemplate.InvalidLicenseTemplateException
-
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.licenseTemplate.InvalidLicenseTemplateException, LicenseGeneratorException, org.spdx.core.InvalidSPDXAnalysisException - Specified by:
writeExceptionin interfaceILicenseFormatWriter- Parameters:
exceptionContainer- Exception to be formatted and written- Throws:
IOExceptionorg.spdx.licenseTemplate.InvalidLicenseTemplateExceptionLicenseGeneratorExceptionorg.spdx.core.InvalidSPDXAnalysisException
-