Package org.spdx.licensexml
Class LicenseXmlHelper
java.lang.Object
org.spdx.licensexml.LicenseXmlHelper
public class LicenseXmlHelper extends Object
Static helper class for License XML parsing
- Author:
- Gary O'Neall
-
Constructor Summary
Constructors Constructor Description LicenseXmlHelper() -
Method Summary
Modifier and Type Method Description static StringdumpLicenseDom(Element licenseElement)static ObjectgetHeaderTemplate(Element headerElement)static ObjectgetHeaderText(Element headerElement)static ObjectgetHeaderTextHtml(Element headerElement)static StringgetLicenseTemplate(Element licenseElement)Gets the license template text from the license elementstatic StringgetLicenseText(Element licenseElement)Gets license text from the license elementstatic StringgetLicenseTextHtml(Element licenseElement)Get the HTML fragment representing the license text from the license bodystatic StringgetNoteText(Element licenseElement)Format note text taking into account line breaks, paragraphs etc.
-
Constructor Details
-
LicenseXmlHelper
public LicenseXmlHelper()
-
-
Method Details
-
getLicenseTemplate
Gets the license template text from the license element- Parameters:
licenseElement-- Returns:
- Throws:
LicenseXmlException
-
getNoteText
Format note text taking into account line breaks, paragraphs etc.- Parameters:
licenseElement-- Returns:
- Throws:
LicenseXmlException
-
getLicenseText
Gets license text from the license element- Parameters:
licenseElement-- Returns:
- Throws:
LicenseXmlException
-
dumpLicenseDom
-
getHeaderText
- Parameters:
headerElement-- Returns:
- header text where headerNode is the root element
- Throws:
LicenseXmlException
-
getHeaderTemplate
- Parameters:
headerElement-- Returns:
- header template where headerNode is the root element
- Throws:
LicenseXmlException
-
getHeaderTextHtml
- Parameters:
headerElement-- Returns:
- header html fragment where headerNode is the root element
- Throws:
LicenseXmlException
-
getLicenseTextHtml
Get the HTML fragment representing the license text from the license body- Parameters:
licenseElement- root element containing the license text- Returns:
- Throws:
LicenseXmlException
-