Class LicenseSet
- 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.LicenseSet
-
- Direct Known Subclasses:
ConjunctiveLicenseSet
,DisjunctiveLicenseSet
public abstract class LicenseSet extends AnyLicenseInfo
A specific form of license information where there is a set of licenses represented- Author:
- Gary O'Neall
-
-
Field Summary
-
Fields inherited from class org.spdx.library.model.v2.ModelObjectV2
LATEST_SPDX_2_VERSION
-
-
Constructor Summary
Constructors Constructor Description LicenseSet()
LicenseSet(String id)
-
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 objectvoid
addMember(AnyLicenseInfo member)
Adds a member to the setCollection<AnyLicenseInfo>
getMembers()
void
removeMember(AnyLicenseInfo member)
void
setMembers(Collection<AnyLicenseInfo> licenseInfos)
Sets the members of the license set.-
Methods inherited from class org.spdx.library.model.v2.license.AnyLicenseInfo
toString
-
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, equivalent, equivalent, getBooleanPropertyValue, getCopyManager, getDoublePropertyValue, getEnumPropertyValue, getIdPrefix, getIntegerPropertyValue, getModelStore, getObjectPropertyValue, getObjectPropertyValue, getObjectPropertyValueCollection, getObjectPropertyValueSet, getObjectUri, getPropertyValueDescriptors, getSpecVersion, getStringCollection, getStringPropertyValue, getType, isCollectionMembersAssignableTo, isExternal, isStrict, leaveCriticalSection, removeProperty, removePropertyValueFromCollection, setCopyManager, setIdPrefix, setPropertyValue, setStrict, updateAddPropertyValueToCollection, updateClearValueCollection, updatePropertyValue, updateRemoveProperty, updateRemovePropertyValueFromCollection, verify, verify, verifyCollection
-
-
-
-
Constructor Detail
-
LicenseSet
public LicenseSet() throws org.spdx.core.InvalidSPDXAnalysisException
- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
LicenseSet
public LicenseSet(String id) throws org.spdx.core.InvalidSPDXAnalysisException
- Parameters:
id
- identifier- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
-
Method Detail
-
setMembers
public void setMembers(Collection<AnyLicenseInfo> licenseInfos) throws org.spdx.core.InvalidSPDXAnalysisException
Sets the members of the license set. Clears any previous members- Parameters:
licenseInfos
- New members for the set- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
getMembers
public Collection<AnyLicenseInfo> getMembers() throws org.spdx.core.InvalidSPDXAnalysisException
- Returns:
- Members of the license set
- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
addMember
public void addMember(AnyLicenseInfo member) throws org.spdx.core.InvalidSPDXAnalysisException
Adds a member to the set- Parameters:
member
-- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
removeMember
public void removeMember(AnyLicenseInfo member) throws org.spdx.core.InvalidSPDXAnalysisException
- 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:
- Any verification errors or warnings associated with this object
-
-