public class LicenseJsonFormatWriter extends Object implements ILicenseFormatWriter
| Constructor and Description |
|---|
LicenseJsonFormatWriter(String version,
String releaseDate,
File jsonFolder,
File jsonFolderDetails,
File jsonFolderExceptions) |
| Modifier and Type | Method and Description |
|---|---|
File |
getJsonFolder() |
File |
getJsonFolderDetails() |
File |
getJsonFolderExceptions() |
void |
setJsonFolder(File jsonFolder) |
void |
setJsonFolderDetails(File jsonFolderDetails) |
void |
setJsonFolderExceptions(File jsonFolderExceptions) |
void |
writeException(LicenseException exception,
boolean deprecated,
String deprecatedVersion) |
void |
writeLicense(SpdxListedLicense license,
boolean deprecated,
String deprecatedVersion)
Formats and writes a specific license
|
void |
writeToC()
Write the Table of Contents file for the format if applicable
|
public LicenseJsonFormatWriter(String version, String releaseDate, File jsonFolder, File jsonFolderDetails, File jsonFolderExceptions)
version - License list versionreleaseDate - release date for the license listjsonFolder - Folder to output the main JSON filejsonFolderDetails - Folder to output a detailed JSON file per licensejsonFolderExceptions - Folder to output a detailed JSON file per exceptionpublic File getJsonFolder()
public void setJsonFolder(File jsonFolder)
jsonFolder - the jsonFolder to setpublic File getJsonFolderExceptions()
public void setJsonFolderExceptions(File jsonFolderExceptions)
jsonFolderExceptions - the jsonFolderExceptions to setpublic File getJsonFolderDetails()
public void setJsonFolderDetails(File jsonFolderDetails)
jsonFolderDetails - the jsonFolderDetails to setpublic void writeLicense(SpdxListedLicense license, boolean deprecated, String deprecatedVersion) throws IOException
ILicenseFormatWriterwriteLicense in interface ILicenseFormatWriterlicense - License to be addeddeprecated - True if deprecateddeprecatedVersion - License list version when the license was deprecated, null otherwiseIOExceptionpublic void writeToC()
throws IOException
ILicenseFormatWriterwriteToC in interface ILicenseFormatWriterIOExceptionpublic void writeException(LicenseException exception, boolean deprecated, String deprecatedVersion) throws IOException
writeException in interface ILicenseFormatWriterexception - Exception to be formatted and writtendeprecated - True if deprecateddeprecatedVersion - License list version when the license was deprecated, null otherwiseIOExceptionCopyright © 2018 Linux Foundation. All Rights Reserved.