Package org.spdx.html
Class MustacheMap
java.lang.Object
org.spdx.html.MustacheMap
public class MustacheMap extends Object
Provides a hashmap which maps the Mustache template strings to SPDX Document
methods and strings. The constants are used in the SpdxHTMLTemplate.html file
in the resources directory.
Note that the Mustache variable names are the tag values in the SPDX specification
- Author:
- Gary O'Neall
-
Constructor Summary
Constructors Constructor Description MustacheMap() -
Method Summary
Modifier and Type Method Description static Map<String,Object>buildDocFileMustacheMap(SpdxDocument doc, SpdxFile[] files, Map<String,String> spdxIdToUrl, Map<String,List<SpdxSnippet>> fileIdToSnippets)static Map<String,Object>buildDocMustachMap(SpdxDocument doc, Map<String,String> spdxIdToUrl)static Map<String,Object>buildExtractedLicMustachMap(SpdxDocument doc, Map<String,String> spdxIdToUrl)static Map<String,Object>buildPkgFileMap(SpdxPackage pkg, Map<String,String> spdxIdToUrl, Map<String,List<SpdxSnippet>> fileIdToSnippets)static Map<String,Object>buildSnippetMustachMap(SpdxDocument doc, Map<String,String> spdxIdToUrl)
-
Constructor Details
-
MustacheMap
public MustacheMap()
-
-
Method Details
-
buildDocMustachMap
public static Map<String,Object> buildDocMustachMap(SpdxDocument doc, Map<String,String> spdxIdToUrl) throws InvalidSPDXAnalysisException- Throws:
InvalidSPDXAnalysisException
-
buildDocFileMustacheMap
public static Map<String,Object> buildDocFileMustacheMap(SpdxDocument doc, SpdxFile[] files, Map<String,String> spdxIdToUrl, Map<String,List<SpdxSnippet>> fileIdToSnippets) throws InvalidSPDXAnalysisException- Parameters:
doc-files-spdxIdToUrl-- Returns:
- Throws:
InvalidSPDXAnalysisException
-
buildExtractedLicMustachMap
public static Map<String,Object> buildExtractedLicMustachMap(SpdxDocument doc, Map<String,String> spdxIdToUrl)- Parameters:
doc-spdxIdToUrl-- Returns:
-
buildPkgFileMap
public static Map<String,Object> buildPkgFileMap(SpdxPackage pkg, Map<String,String> spdxIdToUrl, Map<String,List<SpdxSnippet>> fileIdToSnippets) throws InvalidSPDXAnalysisException- Parameters:
pkg-spdxIdToUrl-- Returns:
- Throws:
InvalidSPDXAnalysisException
-
buildSnippetMustachMap
public static Map<String,Object> buildSnippetMustachMap(SpdxDocument doc, Map<String,String> spdxIdToUrl)- Parameters:
doc-spdxIdToUrl-- Returns:
-