Package org.spdx.licensexml
Class LicenseXmlDocument
java.lang.Object
org.spdx.licensexml.LicenseXmlDocument
public class LicenseXmlDocument extends Object
Parses and provides access to a License XML document
- Author:
- Gary O'Neall
-
Field Summary
Fields Modifier and Type Field Description static StringLICENSE_XML_SCHEMA_LOCATIONstatic StringLICENSE_XML_SCHEMA_URLstatic StringPROP_SCHEMA_FILENAME -
Constructor Summary
Constructors Constructor Description LicenseXmlDocument(File file)LicenseXmlDocument(Document xmlDocument) -
Method Summary
Modifier and Type Method Description List<org.spdx.library.model.license.ListedLicenseException>getLicenseExceptions()List<org.spdx.library.model.license.SpdxListedLicense>getListedLicenses()Will skip deprecated licenses
-
Field Details
-
PROP_SCHEMA_FILENAME
- See Also:
- Constant Field Values
-
LICENSE_XML_SCHEMA_URL
- See Also:
- Constant Field Values
-
LICENSE_XML_SCHEMA_LOCATION
- See Also:
- Constant Field Values
-
-
Constructor Details
-
LicenseXmlDocument
- Parameters:
file- XML file for the License- Throws:
LicenseXmlException
-
LicenseXmlDocument
- Throws:
LicenseXmlException
-
-
Method Details
-
getListedLicenses
public List<org.spdx.library.model.license.SpdxListedLicense> getListedLicenses() throws org.spdx.library.InvalidSPDXAnalysisException, LicenseXmlExceptionWill skip deprecated licenses- Returns:
- Throws:
org.spdx.library.InvalidSPDXAnalysisExceptionLicenseXmlException
-
getLicenseExceptions
public List<org.spdx.library.model.license.ListedLicenseException> getLicenseExceptions() throws LicenseXmlException, org.spdx.library.InvalidSPDXAnalysisException- Returns:
- Throws:
LicenseXmlExceptionorg.spdx.library.InvalidSPDXAnalysisException
-