Package org.spdx.library.model.license
Class LicenseException
java.lang.Object
org.spdx.library.model.ModelObject
org.spdx.library.model.license.LicenseException
- Direct Known Subclasses:
ListedLicenseException
Represents an SPDX license exception as defined in the License Expression Language
Used with the "with" unary expression.
- Author:
- Gary O'Neall
-
Field Summary
Fields inherited from class org.spdx.library.model.ModelObject
strict -
Constructor Summary
ConstructorsConstructorDescriptionLicenseException(String id, String name, String text) LicenseException(String id, String name, String text, String template, Collection<String> seeAlso, String comment) LicenseException(String id, String name, String text, Collection<String> seeAlso, String comment) LicenseException(IModelStore modelStore, String documentUri, String id, ModelCopyManager copyManager, boolean create) Create a new LicenseException object -
Method Summary
Modifier and TypeMethodDescriptionImplementation of the specific verifications for this model objectDeprecated.getName()getType()booleanvoidsetComment(String comment) voidsetDeprecated(Boolean deprecated) voidsetDeprecatedVersion(String deprecatedVersion) voidsetExample(String example) Deprecated.voidsetLicenseExceptionTemplate(String template) Set the template text for the exceptionvoidSets the text for the exceptionvoidvoidsetSeeAlso(Collection<String> seeAlso) toString()Methods inherited from class org.spdx.library.model.ModelObject
addPropertyValueToCollection, addValueToCollection, clearValueCollection, clearValueCollection, clone, copyFrom, createAnnotation, createByteOffsetPointer, createChecksum, createConjunctiveLicenseSet, createCreationInfo, createCrossRef, createDisjunctiveLicenseSet, createExternalDocumentRef, createExternalRef, createExtractedLicense, createLineCharPointer, createPackage, createPackageVerificationCode, createRelationship, createSpdxFile, createSpdxSnippet, createStartEndPointer, enterCriticalSection, equals, equivalent, equivalent, getAnyLicenseInfoPropertyValue, getBooleanPropertyValue, getCopyManager, getDocumentUri, getElementPropertyValue, getEnumPropertyValue, getId, getIntegerPropertyValue, getModelStore, getObjectPropertyValue, getObjectPropertyValue, getObjectPropertyValueCollection, getObjectPropertyValueSet, getPropertyValueNames, getStringCollection, getStringPropertyValue, hashCode, idToIdType, isCollectionMembersAssignableTo, isStrict, leaveCriticalSection, removeProperty, removeProperty, removePropertyValueFromCollection, removePropertyValueFromCollection, replacePropertyValueCollection, setCopyManager, setPropertyValue, setPropertyValue, setStrict, toTypedValue, updateAddPropertyValueToCollection, updateClearValueCollection, updatePropertyValue, updateRemoveProperty, updateRemovePropertyValueFromCollection, verify, verify, verify, verifyCollection
-
Constructor Details
-
LicenseException
public LicenseException(IModelStore modelStore, String documentUri, String id, @Nullable ModelCopyManager copyManager, boolean create) throws InvalidSPDXAnalysisException Create a new LicenseException object- Parameters:
modelStore- container which includes the license exceptiondocumentUri- URI for the SPDX document containing the license exceptionid- identifier for the license exceptioncopyManager- if non-null, allows for copying of any properties set which use other model stores or document URI'screate- if true, create the license exception if it does not exist- Throws:
InvalidSPDXAnalysisException
-
LicenseException
public LicenseException(String id, String name, String text, Collection<String> seeAlso, String comment) throws InvalidSPDXAnalysisException - Throws:
InvalidSPDXAnalysisException
-
LicenseException
public LicenseException(String id, String name, String text, String template, Collection<String> seeAlso, String comment) throws InvalidSPDXAnalysisException - Throws:
InvalidSPDXAnalysisException
-
LicenseException
- Throws:
InvalidSPDXAnalysisException
-
-
Method Details
-
getComment
- Returns:
- Comment associated with the License Exception
- Throws:
InvalidSPDXAnalysisException
-
setComment
- Parameters:
comment- the comment to set- Throws:
InvalidSPDXAnalysisException
-
getExample
Deprecated.Deprecated since SPDX spec 2.0- Returns:
- example text
- Throws:
InvalidSPDXAnalysisException
-
setExample
Deprecated.Deprecated since SPDX spec 2.0- Parameters:
example-- Throws:
InvalidSPDXAnalysisException
-
getLicenseExceptionId
- Returns:
- the id
-
getLicenseExceptionTemplate
- Returns:
- the template
- Throws:
InvalidSPDXAnalysisException
-
setLicenseExceptionTemplate
Set the template text for the exception- Parameters:
template- template- Throws:
InvalidSPDXAnalysisException
-
getLicenseExceptionText
- Returns:
- the text
- Throws:
InvalidSPDXAnalysisException
-
setLicenseExceptionText
Sets the text for the exception- Parameters:
text- text- Throws:
InvalidSPDXAnalysisException
-
getName
- Returns:
- the name
- Throws:
SpdxInvalidTypeExceptionInvalidSPDXAnalysisException
-
setName
- Parameters:
name- the name to set- Throws:
InvalidSPDXAnalysisException
-
getSeeAlso
- Returns:
- the urls which reference the same license information
- Throws:
SpdxInvalidTypeExceptionInvalidSPDXAnalysisException
-
setSeeAlso
- Parameters:
seeAlso- the urls which are references to the same license to set- Throws:
InvalidSPDXAnalysisException
-
isDeprecated
- Returns:
- true if this license is marked as being deprecated
- Throws:
SpdxInvalidTypeExceptionInvalidSPDXAnalysisException
-
setDeprecated
- Parameters:
deprecated- true if this license is deprecated- Throws:
InvalidSPDXAnalysisException
-
getDeprecatedVersion
- Returns:
- the deprecatedVersion
- Throws:
SpdxInvalidTypeExceptionInvalidSPDXAnalysisException
-
setDeprecatedVersion
- Parameters:
deprecatedVersion- the deprecatedVersion to set- Throws:
InvalidSPDXAnalysisException
-
getType
- Specified by:
getTypein classModelObject- Returns:
- The class name for this object. Class names are defined in the constants file
-
_verify
Description copied from class:ModelObjectImplementation of the specific verifications for this model object- Specified by:
_verifyin classModelObject- 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:
- Any verification errors or warnings associated with this object
-
toString
- Overrides:
toStringin classModelObject
-