Class ConjunctiveLicenseSet
- 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.ConjunctiveLicenseSet
-
public class ConjunctiveLicenseSet extends LicenseSet
A set of licenses where all of the licenses apply- 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 ConjunctiveLicenseSet()
ConjunctiveLicenseSet(String id)
ConjunctiveLicenseSet(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)
List<AnyLicenseInfo>
getFlattenedMembers()
Conjunctive license sets can contain other conjunctive license sets as members.String
getType()
int
hashCode()
protected boolean
setsEquivalent(ConjunctiveLicenseSet compare)
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
-
ConjunctiveLicenseSet
public ConjunctiveLicenseSet() throws org.spdx.core.InvalidSPDXAnalysisException
- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
ConjunctiveLicenseSet
public ConjunctiveLicenseSet(String id) throws org.spdx.core.InvalidSPDXAnalysisException
- Parameters:
id
- identifier- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
ConjunctiveLicenseSet
public ConjunctiveLicenseSet(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
-
getFlattenedMembers
public List<AnyLicenseInfo> getFlattenedMembers() throws org.spdx.core.InvalidSPDXAnalysisException
Conjunctive license sets can contain other conjunctive license sets as members. Logically, the members of these "sub-conjunctive license sets" could be direct members and have the same meaning.- Returns:
- all members "flattening out" conjunctive license sets which are members of this set
- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classModelObjectV2
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classModelObjectV2
-
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
-
setsEquivalent
protected boolean setsEquivalent(ConjunctiveLicenseSet compare) throws org.spdx.core.InvalidSPDXAnalysisException
- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
getType
public String getType()
- Specified by:
getType
in classorg.spdx.core.CoreModelObject
-
-