Class SpdxWebsiteFormatWriter
java.lang.Object
org.spdx.licenselistpublisher.licensegenerator.SpdxWebsiteFormatWriter
- All Implemented Interfaces:
ILicenseFormatWriter
public class SpdxWebsiteFormatWriter extends Object implements ILicenseFormatWriter
Writer to format all files for the https://spdx.org/licenses website
- Author:
- Gary O'Neall
-
Constructor Summary
Constructors Constructor Description SpdxWebsiteFormatWriter(String version, String releaseDate, File websiteFolder) -
Method Summary
Modifier and Type Method Description ExceptionHtmlTocgetHtmlExceptionToc()org.spdx.storage.listedlicense.ExceptionJsonTOCgetJsonExceptionToc()LicenseHTMLFilegetLicHtml()org.spdx.storage.listedlicense.LicenseJsongetLicJson()StringgetReleaseDate()LicenseTOCHTMLFilegetTableOfContentsHTML()org.spdx.storage.listedlicense.LicenseJsonTOCgetTableOfContentsJSON()StringgetVersion()FilegetWebsiteFolder()voidsetLicHtml(LicenseHTMLFile licHtml)voidsetReleaseDate(String releaseDate)voidsetTableOfContentsHTML(LicenseTOCHTMLFile tableOfContentsHTML)voidsetVersion(String version)voidsetWebsiteFolder(File websiteFolder)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
-
SpdxWebsiteFormatWriter
- Parameters:
version- License list versionreleaseDate- release date for the license listwebsiteFolder- Folder to store all of the website files
-
-
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(org.spdx.library.model.license.SpdxListedLicense license, boolean deprecated, String deprecatedVersion) throws IOException, LicenseGeneratorException, org.spdx.library.InvalidSPDXAnalysisException, org.spdx.licenseTemplate.InvalidLicenseTemplateExceptionDescription 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:
IOExceptionLicenseGeneratorExceptionorg.spdx.library.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(org.spdx.library.model.license.ListedLicenseException exception) throws IOException, org.spdx.licenseTemplate.InvalidLicenseTemplateException, LicenseGeneratorException, org.spdx.library.InvalidSPDXAnalysisException- Specified by:
writeExceptionin interfaceILicenseFormatWriter- Parameters:
exception- Exception to be formatted and written- Throws:
IOExceptionorg.spdx.licenseTemplate.InvalidLicenseTemplateExceptionLicenseGeneratorExceptionorg.spdx.library.InvalidSPDXAnalysisException
-