Class DisjunctiveLicenseSet
- 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
-
- org.spdx.library.model.v2.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
-
Fields inherited from class org.spdx.library.model.v2.ModelObjectV2
LATEST_SPDX_2_VERSION
-
-
Constructor Summary
Constructors Constructor Description DisjunctiveLicenseSet()
DisjunctiveLicenseSet(String id)
DisjunctiveLicenseSet(org.spdx.storage.IModelStore modelStore, String documentUri, String id, org.spdx.core.IModelCopyManager copyManager, boolean create)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
boolean
equivalent(org.spdx.core.CoreModelObject compare)
protected List<AnyLicenseInfo>
getFlattenedMembers()
Disjunctive license sets can contain other conjunctive license sets as members.String
getType()
int
hashCode()
String
toString()
-
Methods inherited from class org.spdx.library.model.v2.license.LicenseSet
_verify, addMember, getMembers, removeMember, setMembers
-
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, getAnyLicenseInfoPropertyValue, getDocumentUri, getElementPropertyValue, getId, isEquivalentToNull, isNoAssertion, isRelatedElement, toTypedValue, verify
-
Methods inherited from class org.spdx.core.CoreModelObject
addPropertyValueToCollection, clearValueCollection, clone, copyFrom, enterCriticalSection, equivalent, 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
-
-
-
-
Constructor Detail
-
DisjunctiveLicenseSet
public DisjunctiveLicenseSet() throws org.spdx.core.InvalidSPDXAnalysisException
- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
DisjunctiveLicenseSet
public DisjunctiveLicenseSet(String id) throws org.spdx.core.InvalidSPDXAnalysisException
- Parameters:
id
- identifier- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
DisjunctiveLicenseSet
public DisjunctiveLicenseSet(org.spdx.storage.IModelStore modelStore, String documentUri, String id, @Nullable org.spdx.core.IModelCopyManager copyManager, boolean create) throws org.spdx.core.InvalidSPDXAnalysisException
- Parameters:
modelStore
- container which includes the model datadocumentUri
- URI for the SPDX document containing the model dataid
- identifiercopyManager
- 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
-
toString
public String toString()
- Specified by:
toString
in classAnyLicenseInfo
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classModelObjectV2
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classModelObjectV2
-
getFlattenedMembers
protected List<AnyLicenseInfo> getFlattenedMembers() throws org.spdx.core.InvalidSPDXAnalysisException
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:
org.spdx.core.InvalidSPDXAnalysisException
-
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
-
getType
public String getType()
- Specified by:
getType
in classorg.spdx.core.CoreModelObject
-
-