Package org.spdx.tools
Class RdfToHtml
java.lang.Object
org.spdx.tools.RdfToHtml
public class RdfToHtml extends Object
Takes an input SPDX Document and produces the following HTML files in the
specified directory: [spdxdocumentname]-document.html - Document level
information [spdxpackagename]-package.html - Package level information (one
per package found) [spdxpackagename]-packagefiles.html - File level
information for all files found in the given package
[spdxdocumentname]-packagefiles.html - File level information for all files
described directly by the document [spdxdocumentname]-extractedlicenses.html
- Extracted license information from the document The HTML pretty printer is
based on a set of HTML templates found in the resources directory:
SpdxDocHTMLTemplate.html - Document level HTML file template
PackageHTMLTemplate.html - Package level HTML file template
FilesHTMLTemplate.html - File level information HTML file template
LicensesHTMLTemplate.html - Extracted license information HTML file template
The template uses Mustache - see http://mustache.github.com/mustache.5.html
- Author:
- Gary O'Neall
-
Constructor Summary
Constructors Constructor Description RdfToHtml() -
Method Summary
Modifier and Type Method Description static voidmain(String[] args)static List<String>onlineFunction(String[] args)static voidrdfToHtml(SpdxDocument doc, File docHtmlFile, File licenseHtmlFile, File snippetHtmlFile, File docFilesHtmlFile)static voidrdfToHtml(SpdxDocument doc, File templateDir, File docHtmlFile, File licenseHtmlFile, File snippetHtmlFile, File docFilesHtmlFile)
-
Constructor Details
-
RdfToHtml
public RdfToHtml()
-
-
Method Details
-
main
- Parameters:
args- Argument 0 is the file path of RDF XML file; argument 1 is the file path for the output HTML file(s)
-
onlineFunction
- Parameters:
args- args[0] is the RDF file to be converted, args[1] is the result HTML file name- Throws:
OnlineToolException- Exception caught by JPype and displayed to the user
-
rdfToHtml
public static void rdfToHtml(SpdxDocument doc, File templateDir, File docHtmlFile, File licenseHtmlFile, File snippetHtmlFile, File docFilesHtmlFile) throws com.github.mustachejava.MustacheException, IOException, InvalidSPDXAnalysisException- Throws:
com.github.mustachejava.MustacheExceptionIOExceptionInvalidSPDXAnalysisException
-
rdfToHtml
public static void rdfToHtml(SpdxDocument doc, File docHtmlFile, File licenseHtmlFile, File snippetHtmlFile, File docFilesHtmlFile) throws com.github.mustachejava.MustacheException, IOException, InvalidSPDXAnalysisException- Throws:
com.github.mustachejava.MustacheExceptionIOExceptionInvalidSPDXAnalysisException
-