Class CrossRefJson
java.lang.Object
org.spdx.storage.listedlicense.CrossRefJson
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for GSON compatibilityCrossRefJson(org.spdx.library.model.v2.license.CrossRef crossRef) Construct aCrossRefJsonobject by copying values from aCrossRefobject -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddPrimitiveValueToList(org.spdx.storage.PropertyDescriptor propertyDescriptor, Object value) voidclearPropertyValueList(org.spdx.storage.PropertyDescriptor propertyDescriptor) getId()Get the crossRefIdList<org.spdx.storage.PropertyDescriptor> Retrieve all valid property descriptors for this objectgetValue(org.spdx.storage.PropertyDescriptor propertyDescriptor) Retrieve the value associated with the given property descriptorList<?> getValueList(org.spdx.storage.PropertyDescriptor propertyDescriptor) booleanisCollectionMembersAssignableTo(org.spdx.storage.PropertyDescriptor propertyDescriptor, Class<?> clazz) Check whether the members of the collection can be assigned to the given classbooleanisCollectionProperty(String propertyName) Check whether the property is a collectionbooleanisPropertyValueAssignableTo(org.spdx.storage.PropertyDescriptor propertyDescriptor, Class<?> clazz) Check whether the property value can be assigned to the given classbooleanremovePrimitiveValueToList(org.spdx.storage.PropertyDescriptor propertyDescriptor, Object value) voidremoveProperty(org.spdx.storage.PropertyDescriptor propertyDescriptor) Set the property to null (no way to remove in this store)voidSet the crossRefIdvoidsetPrimitiveValue(org.spdx.storage.PropertyDescriptor propertyDescriptor, Object value) Set the value to the property name
-
Field Details
-
match
-
url
-
isValid
-
isLive
-
timestamp
-
isWayBackLink
-
order
-
-
Constructor Details
-
CrossRefJson
public CrossRefJson()Default constructor for GSON compatibility -
CrossRefJson
public CrossRefJson(org.spdx.library.model.v2.license.CrossRef crossRef) throws org.spdx.core.InvalidSPDXAnalysisException Construct aCrossRefJsonobject by copying values from aCrossRefobject- Parameters:
crossRef- TheCrossRefobject to copy values from.- Throws:
org.spdx.core.InvalidSPDXAnalysisException- on SPDX parsing errors
-
-
Method Details
-
getPropertyValueDescriptors
Retrieve all valid property descriptors for this object- Returns:
- all valid property descriptors
-
setPrimitiveValue
public void setPrimitiveValue(org.spdx.storage.PropertyDescriptor propertyDescriptor, Object value) throws org.spdx.core.InvalidSpdxPropertyException Set the value to the property name- Parameters:
propertyDescriptor- descriptor for the property to setvalue- Value to set- Throws:
org.spdx.core.InvalidSpdxPropertyException- on SPDX parsing errors
-
clearPropertyValueList
public void clearPropertyValueList(org.spdx.storage.PropertyDescriptor propertyDescriptor) throws org.spdx.core.InvalidSpdxPropertyException - Throws:
org.spdx.core.InvalidSpdxPropertyException
-
addPrimitiveValueToList
public boolean addPrimitiveValueToList(org.spdx.storage.PropertyDescriptor propertyDescriptor, Object value) throws org.spdx.core.InvalidSpdxPropertyException - Throws:
org.spdx.core.InvalidSpdxPropertyException
-
removePrimitiveValueToList
public boolean removePrimitiveValueToList(org.spdx.storage.PropertyDescriptor propertyDescriptor, Object value) throws org.spdx.core.InvalidSpdxPropertyException - Throws:
org.spdx.core.InvalidSpdxPropertyException
-
getId
-
setId
-
getValueList
public List<?> getValueList(org.spdx.storage.PropertyDescriptor propertyDescriptor) throws org.spdx.core.InvalidSpdxPropertyException - Parameters:
propertyDescriptor- descriptor for the property to set- Returns:
- the list associated with the property
- Throws:
org.spdx.core.InvalidSpdxPropertyException- on SPDX parsing errors
-
getValue
@Nullable public Object getValue(org.spdx.storage.PropertyDescriptor propertyDescriptor) throws org.spdx.core.InvalidSpdxPropertyException Retrieve the value associated with the given property descriptor- Parameters:
propertyDescriptor- descriptor for the property to set- Returns:
- the value associated with the property - null if not assigned or not present
- Throws:
org.spdx.core.InvalidSpdxPropertyException- on SPDX parsing errors
-
removeProperty
public void removeProperty(org.spdx.storage.PropertyDescriptor propertyDescriptor) throws org.spdx.core.InvalidSpdxPropertyException Set the property to null (no way to remove in this store)- Parameters:
propertyDescriptor- Descriptor for the property to set- Throws:
org.spdx.core.InvalidSpdxPropertyException- on SPDX parsing errors
-
isCollectionMembersAssignableTo
public boolean isCollectionMembersAssignableTo(org.spdx.storage.PropertyDescriptor propertyDescriptor, Class<?> clazz) Check whether the members of the collection can be assigned to the given classNote: This is not implemented for this class and always returns false.
- Parameters:
propertyDescriptor- descriptor for the property to setclazz- target class- Returns:
- true if the members can be assigned from clazz
-
isPropertyValueAssignableTo
public boolean isPropertyValueAssignableTo(org.spdx.storage.PropertyDescriptor propertyDescriptor, Class<?> clazz) throws org.spdx.core.InvalidSpdxPropertyException Check whether the property value can be assigned to the given class- Parameters:
propertyDescriptor- descriptor for the property to setclazz- target class- Returns:
- true if the property can be assigned from clazz
- Throws:
org.spdx.core.InvalidSpdxPropertyException- on SPDX parsing errors
-
isCollectionProperty
Check whether the property is a collectionNote: This is not implemented for this class and always returns false.
- Parameters:
propertyName- Name of the property- Returns:
- if the property is a collection
-