Package org.spdx.storage.listedlicense
Class LicenseCreationInfo
- java.lang.Object
-
- org.spdx.storage.listedlicense.LicenseCreationInfo
-
public class LicenseCreationInfo extends Object
Creation information for the listed license store- Author:
- Gary O'Neall
-
-
Field Summary
Fields Modifier and Type Field Description static List<org.spdx.storage.PropertyDescriptor>ALL_PROPERTY_DESCRIPTORSstatic Map<org.spdx.storage.PropertyDescriptor,Object>PROPERTY_TO_STATIC_VALUE
-
Constructor Summary
Constructors Constructor Description LicenseCreationInfo(LicenseCreatorAgent licenseListCreator, String licenseListReleaseDate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.spdx.core.TypedValuegetTypedValue()ObjectgetValue(org.spdx.storage.PropertyDescriptor propertyDescriptor)List<?>getValueList(org.spdx.storage.PropertyDescriptor propertyDescriptor)booleanisCollectionMembersAssignableTo(org.spdx.storage.PropertyDescriptor propertyDescriptor, Class<?> clazz)booleanisCollectionProperty(org.spdx.storage.PropertyDescriptor propertyDescriptor)booleanisPropertyValueAssignableTo(org.spdx.storage.PropertyDescriptor propertyDescriptor, Class<?> clazz)
-
-
-
Constructor Detail
-
LicenseCreationInfo
public LicenseCreationInfo(LicenseCreatorAgent licenseListCreator, String licenseListReleaseDate) throws org.spdx.core.SpdxInvalidIdException, org.spdx.core.SpdxInvalidTypeException, org.spdx.core.ModelRegistryException
- Parameters:
licenseListCreator- creator of the licenselicenseListReleaseDate- release date of the license list- Throws:
org.spdx.core.ModelRegistryException- if there is support for the model versionorg.spdx.core.SpdxInvalidTypeException- if the license type is invalidorg.spdx.core.SpdxInvalidIdException- if the license ID is invalid
-
-
Method Detail
-
getTypedValue
public org.spdx.core.TypedValue getTypedValue()
- Returns:
- the typed value
-
isCollectionProperty
public boolean isCollectionProperty(org.spdx.storage.PropertyDescriptor propertyDescriptor)
- Parameters:
propertyDescriptor- descriptor for the property- Returns:
- true if it is a collection property
-
getValueList
public List<?> getValueList(org.spdx.storage.PropertyDescriptor propertyDescriptor)
- Parameters:
propertyDescriptor- property descriptor for the collection- Returns:
- list of values for a collection
-
getValue
public Object getValue(org.spdx.storage.PropertyDescriptor propertyDescriptor)
- Parameters:
propertyDescriptor- property descriptor for the collection- Returns:
- value if present, otherwise null
-
isCollectionMembersAssignableTo
public boolean isCollectionMembersAssignableTo(org.spdx.storage.PropertyDescriptor propertyDescriptor, Class<?> clazz)- Parameters:
propertyDescriptor- property descriptor for the collectionclazz- class to check- Returns:
- true if the property is a collection and a value of type clazz can be assigned
-
isPropertyValueAssignableTo
public boolean isPropertyValueAssignableTo(org.spdx.storage.PropertyDescriptor propertyDescriptor, Class<?> clazz)- Parameters:
propertyDescriptor- property descriptor for the collectionclazz- class to check- Returns:
- true if a value of type clazz can be assigned to the property
-
-