Class ExtractedLicenseInfo
- java.lang.Object
-
- org.spdx.core.CoreModelObject
-
- org.spdx.library.model.v2.ModelObjectV2
-
- org.spdx.library.model.v2.license.AnyLicenseInfo
-
- org.spdx.library.model.v2.license.SimpleLicensingInfo
-
- org.spdx.library.model.v2.license.AbstractExtractedLicenseInfo
-
- org.spdx.library.model.v2.license.ExtractedLicenseInfo
-
- All Implemented Interfaces:
Comparable<AbstractExtractedLicenseInfo>
public class ExtractedLicenseInfo extends AbstractExtractedLicenseInfo
An ExtractedLicensingInfo represents a license or licensing notice that was found in the package. Any license text that is recognized as a license may be represented as a License rather than an ExtractedLicensingInfo.- Author:
- Gary O'Neall
-
-
Field Summary
Fields Modifier and Type Field Description static String
UNINITIALIZED_LICENSE_TEXT
-
Fields inherited from class org.spdx.library.model.v2.ModelObjectV2
LATEST_SPDX_2_VERSION
-
-
Constructor Summary
Constructors Constructor Description ExtractedLicenseInfo()
ExtractedLicenseInfo(String id)
ExtractedLicenseInfo(String id, String text)
Create a new ExtractedLicenseInfo using the ID and textExtractedLicenseInfo(org.spdx.storage.IModelStore modelStore, String documentUri, String id, org.spdx.core.IModelCopyManager copyManager, boolean create)
Create a new ExtractedLicenseInfo object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<String>
_verify(Set<String> verifiedIds, String specVersion)
Implementation of the specific verifications for this model objectboolean
equivalent(org.spdx.core.CoreModelObject compare)
boolean
equivalent(org.spdx.core.CoreModelObject compare, boolean ignoreRelatedItems)
String
getExtractedText()
String
getType()
void
setExtractedText(String text)
-
Methods inherited from class org.spdx.library.model.v2.license.AbstractExtractedLicenseInfo
compareTo, toString
-
Methods inherited from class org.spdx.library.model.v2.license.SimpleLicensingInfo
getComment, getLicenseId, getName, getSeeAlso, setComment, setName, setSeeAlso
-
Methods inherited from class org.spdx.library.model.v2.ModelObjectV2
_verify, createAnnotation, createByteOffsetPointer, createChecksum, createConjunctiveLicenseSet, createCreationInfo, createCrossRef, createDisjunctiveLicenseSet, createExternalDocumentRef, createExternalRef, createExtractedLicense, createLineCharPointer, createPackage, createPackageVerificationCode, createRelationship, createSpdxFile, createSpdxSnippet, createStartEndPointer, equals, getAnyLicenseInfoPropertyValue, getDocumentUri, getElementPropertyValue, getId, hashCode, isEquivalentToNull, isNoAssertion, isRelatedElement, toTypedValue, verify
-
Methods inherited from class org.spdx.core.CoreModelObject
addPropertyValueToCollection, clearValueCollection, clone, copyFrom, enterCriticalSection, getBooleanPropertyValue, getCopyManager, getDoublePropertyValue, getEnumPropertyValue, getIdPrefix, getIntegerPropertyValue, getModelStore, getObjectPropertyValue, getObjectPropertyValue, getObjectPropertyValueCollection, getObjectPropertyValueSet, getObjectUri, getPropertyValueDescriptors, getSpecVersion, getStringCollection, getStringPropertyValue, isCollectionMembersAssignableTo, isExternal, isStrict, leaveCriticalSection, removeProperty, removePropertyValueFromCollection, setCopyManager, setIdPrefix, setPropertyValue, setStrict, updateAddPropertyValueToCollection, updateClearValueCollection, updatePropertyValue, updateRemoveProperty, updateRemovePropertyValueFromCollection, verify, verify, verifyCollection
-
-
-
-
Field Detail
-
UNINITIALIZED_LICENSE_TEXT
public static final String UNINITIALIZED_LICENSE_TEXT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ExtractedLicenseInfo
public ExtractedLicenseInfo() throws org.spdx.core.InvalidSPDXAnalysisException
- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
ExtractedLicenseInfo
public ExtractedLicenseInfo(String id) throws org.spdx.core.InvalidSPDXAnalysisException
- Parameters:
id
- identifier- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
ExtractedLicenseInfo
public ExtractedLicenseInfo(org.spdx.storage.IModelStore modelStore, String documentUri, String id, @Nullable org.spdx.core.IModelCopyManager copyManager, boolean create) throws org.spdx.core.InvalidSPDXAnalysisException
Create a new ExtractedLicenseInfo object- Parameters:
modelStore
- container which includes the licensedocumentUri
- URI for the SPDX document containing the licenseid
- identifier for the licensecopyManager
- if non-null, allows for copying of any properties set which use other model stores or document URI'screate
- if true, create the license if it does not exist- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
-
Method Detail
-
getType
public String getType()
- Specified by:
getType
in classorg.spdx.core.CoreModelObject
-
getExtractedText
public String getExtractedText() throws org.spdx.core.InvalidSPDXAnalysisException
- Specified by:
getExtractedText
in classAbstractExtractedLicenseInfo
- Returns:
- the text
- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
setExtractedText
public void setExtractedText(String text) throws org.spdx.core.InvalidSPDXAnalysisException
- Parameters:
text
- the text to set- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
_verify
protected List<String> _verify(Set<String> verifiedIds, String specVersion)
Description copied from class:ModelObjectV2
Implementation of the specific verifications for this model object- Specified by:
_verify
in classModelObjectV2
- Parameters:
verifiedIds
- list of all Element Id's which have already been verified - prevents infinite recursionspecVersion
- Version of the SPDX spec to verify against- Returns:
-
equivalent
public boolean equivalent(org.spdx.core.CoreModelObject compare) throws org.spdx.core.InvalidSPDXAnalysisException
- Overrides:
equivalent
in classorg.spdx.core.CoreModelObject
- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
equivalent
public boolean equivalent(org.spdx.core.CoreModelObject compare, boolean ignoreRelatedItems) throws org.spdx.core.InvalidSPDXAnalysisException
- Overrides:
equivalent
in classorg.spdx.core.CoreModelObject
- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
-