public class LicenseRdfFormatWriter extends Object implements ILicenseFormatWriter
| Constructor and Description |
|---|
LicenseRdfFormatWriter(File rdfXml,
File rdfTurtle,
File rdfNt,
File rdfJsonLd) |
| Modifier and Type | Method and Description |
|---|---|
File |
getRdfNt() |
File |
getRdfTurtle() |
File |
getRdfXml() |
void |
setRdfNt(File rdfNt) |
void |
setRdfTurtle(File rdfTurtle) |
void |
setRdfXml(File rdfXml) |
void |
writeException(org.spdx.rdfparser.license.LicenseException exception,
boolean deprecated,
String deprecatedVersion) |
void |
writeLicense(org.spdx.rdfparser.license.SpdxListedLicense license,
boolean deprecated,
String deprecatedVersion)
Formats and writes a specific license
|
static void |
writeRdf(org.spdx.rdfparser.IModelContainer container,
String fileName,
String format)
Write an RDF file for for all elements in the container
|
void |
writeToC()
Write the Table of Contents file for the format if applicable
|
public LicenseRdfFormatWriter(File rdfXml, File rdfTurtle, File rdfNt, File rdfJsonLd)
rdfXml - File to store RDF XML formatted license listrdfTurtle - File to store RDF Turtle formatted license listrdfNt - File to store RDF Nt formatted license listrdfJsonLd - File to store JSON-LD formatted license listpublic File getRdfXml()
public void setRdfXml(File rdfXml)
rdfXml - the rdfXml to setpublic File getRdfTurtle()
public void setRdfTurtle(File rdfTurtle)
rdfTurtle - the rdfTurtle to setpublic File getRdfNt()
public void setRdfNt(File rdfNt)
rdfNt - the rdfNt to setpublic void writeLicense(org.spdx.rdfparser.license.SpdxListedLicense license,
boolean deprecated,
String deprecatedVersion)
throws IOException,
LicenseGeneratorException
ILicenseFormatWriterwriteLicense in interface ILicenseFormatWriterlicense - License to be addeddeprecated - True if deprecateddeprecatedVersion - License list version when the license was deprecated, null otherwiseIOExceptionLicenseGeneratorExceptionpublic static void writeRdf(org.spdx.rdfparser.IModelContainer container,
String fileName,
String format)
throws LicenseGeneratorException
container - Container for the RDF elementsfileName - File name to write the elements toformat - Jena RDF formatLicenseGeneratorExceptionpublic void writeToC()
throws IOException,
LicenseGeneratorException
ILicenseFormatWriterwriteToC in interface ILicenseFormatWriterIOExceptionLicenseGeneratorExceptionpublic void writeException(org.spdx.rdfparser.license.LicenseException exception,
boolean deprecated,
String deprecatedVersion)
throws IOException,
LicenseGeneratorException
writeException in interface ILicenseFormatWriterexception - Exception to be formatted and writtendeprecated - True if deprecateddeprecatedVersion - License list version when the license was deprecated, null otherwiseIOExceptionLicenseGeneratorExceptionCopyright © 2018 Linux Foundation. All Rights Reserved.