Package org.spdx.library.model.license
Class DisjunctiveLicenseSet
java.lang.Object
org.spdx.library.model.ModelObject
org.spdx.library.model.license.AnyLicenseInfo
org.spdx.library.model.license.LicenseSet
org.spdx.library.model.license.DisjunctiveLicenseSet
public class DisjunctiveLicenseSet extends LicenseSet
A set of licenses where there is a choice of one of the licenses in the set
- Author:
- Gary O'Neall
-
Field Summary
-
Constructor Summary
Constructors Constructor Description DisjunctiveLicenseSet()DisjunctiveLicenseSet(String id)DisjunctiveLicenseSet(IModelStore modelStore, String documentUri, String id, ModelCopyManager copyManager, boolean create) -
Method Summary
Modifier and Type Method Description booleanequals(Object o)booleanequivalent(ModelObject compare)protected List<AnyLicenseInfo>getFlattenedMembers()Disjunctive license sets can contain other conjunctive license sets as members.StringgetType()inthashCode()StringtoString()Methods inherited from class org.spdx.library.model.license.LicenseSet
_verify, addMember, getMembers, removeMember, setMembersMethods inherited from class org.spdx.library.model.ModelObject
addPropertyValueToCollection, addValueToCollection, clearValueCollection, clearValueCollection, clone, copyFrom, createAnnotation, createByteOffsetPointer, createChecksum, createConjunctiveLicenseSet, createCreationInfo, createCrossRef, createDisjunctiveLicenseSet, createExternalDocumentRef, createExternalRef, createLineCharPointer, createPackage, createPackageVerificationCode, createRelationship, createSpdxFile, createSpdxSnippet, createStartEndPointer, enterCriticalSection, equivalent, getAnyLicenseInfoPropertyValue, getBooleanPropertyValue, getCopyManager, getDocumentUri, getElementPropertyValue, getEnumPropertyValue, getId, getIntegerPropertyValue, getModelStore, getObjectPropertyValue, getObjectPropertyValue, getObjectPropertyValueCollection, getObjectPropertyValueSet, getPropertyValueNames, getStringCollection, getStringPropertyValue, 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
-
DisjunctiveLicenseSet
- Throws:
InvalidSPDXAnalysisException
-
DisjunctiveLicenseSet
- Throws:
InvalidSPDXAnalysisException
-
DisjunctiveLicenseSet
public DisjunctiveLicenseSet(IModelStore modelStore, String documentUri, String id, @Nullable ModelCopyManager copyManager, boolean create) throws InvalidSPDXAnalysisException- Parameters:
modelStore-documentUri-id-copyManager-create-- Throws:
InvalidSPDXAnalysisException
-
-
Method Details
-
toString
- Specified by:
toStringin classAnyLicenseInfo
-
hashCode
public int hashCode()- Overrides:
hashCodein classModelObject
-
equals
- Overrides:
equalsin classModelObject
-
getFlattenedMembers
Disjunctive license sets can contain other conjunctive license sets as members. Logically, the members of these "sub-disjunctive license sets" could be direct members and have the same meaning.- Returns:
- all members "flattening out" disjunctive license sets which are members of this set
- Throws:
SpdxInvalidTypeExceptionInvalidSPDXAnalysisException
-
equivalent
- Overrides:
equivalentin classModelObject- Returns:
- true if all the properties have the same or equivalent values
- Throws:
InvalidSPDXAnalysisException
-
getType
- Specified by:
getTypein classModelObject- Returns:
- The class name for this object. Class names are defined in the constants file
-