Class XmlLicenseProvider
java.lang.Object
org.spdx.licensexml.XmlLicenseProvider
- All Implemented Interfaces:
ISpdxListedLicenseProvider
- Direct Known Subclasses:
XmlLicenseProviderWithCrossRefDetails
Provide license information from XML files
- Author:
- Gary O'Neall
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionXmlLicenseProvider(File xmlFileDirectory, String currentListVersion, String releaseDate) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.spdx.library.model.v3_0_1.core.CreationInfocreateCreationInfo(org.spdx.storage.IModelStore modelStore, org.spdx.core.IModelCopyManager copyManager, String listCreationDate, String licenseListVersion)
-
Field Details
-
warnings
-
v2ModelStore
protected org.spdx.storage.IModelStore v2ModelStore -
v3ModelStore
protected org.spdx.storage.IModelStore v3ModelStore -
copyManager
protected org.spdx.core.IModelCopyManager copyManager -
releaseDate
-
currentListVersion
-
creationInfo
protected org.spdx.library.model.v3_0_1.core.CreationInfo creationInfo
-
-
Constructor Details
-
XmlLicenseProvider
public XmlLicenseProvider(File xmlFileDirectory, String currentListVersion, String releaseDate) throws org.spdx.core.InvalidSPDXAnalysisException - Parameters:
xmlFileDirectory- directory of XML filescurrentListVersion- version of the license list to include the license datareleaseDate- Date the license list is released- Throws:
org.spdx.core.InvalidSPDXAnalysisException- on error creating licenses or creationInfo
-
-
Method Details
-
createCreationInfo
public static org.spdx.library.model.v3_0_1.core.CreationInfo createCreationInfo(org.spdx.storage.IModelStore modelStore, @Nullable org.spdx.core.IModelCopyManager copyManager, String listCreationDate, String licenseListVersion) throws org.spdx.core.InvalidSPDXAnalysisException - Parameters:
modelStore- Store to store the CreationInfocopyManager- Optional copyManagerlistCreationDate- Date the license list was createdlicenseListVersion- Version of the license list- Returns:
- the creationInfo intended for use in licensing data
- Throws:
org.spdx.core.InvalidSPDXAnalysisException- on error creating the creation info
-
getLicenseIterator
public Iterator<ListedLicenseContainer> getLicenseIterator() throws org.spdx.library.model.v2.license.SpdxListedLicenseException- Specified by:
getLicenseIteratorin interfaceISpdxListedLicenseProvider- Throws:
org.spdx.library.model.v2.license.SpdxListedLicenseException
-
getExceptionIterator
public Iterator<ListedExceptionContainer> getExceptionIterator() throws org.spdx.core.InvalidSPDXAnalysisException- Specified by:
getExceptionIteratorin interfaceISpdxListedLicenseProvider- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
getWarnings
- Specified by:
getWarningsin interfaceISpdxListedLicenseProvider
-