Class StructPropertyValueMapping
- java.lang.Object
-
- org.odpi.egeria.connectors.juxt.crux.mapping.AbstractMapping
-
- org.odpi.egeria.connectors.juxt.crux.mapping.InstancePropertyValueMapping
-
- org.odpi.egeria.connectors.juxt.crux.mapping.StructPropertyValueMapping
-
public class StructPropertyValueMapping extends InstancePropertyValueMapping
Maps singular StructPropertyValues between persistence and objects. These cannot simply be serialized to JSON as that would impact the ability to search their values correctly, so we must break apart the values and the types for each property:{ ... :entityProperties/someProperty.json {:json "{\"class\":\"StructPropertyValue\",\"instancePropertyCategory\":\"STRUCT\",\"attributes\":{\"class\":\"InstanceProperties\",\"instanceProperties\":{\"key\":\"{\"class\":\"PrimitivePropertyValue\",\"instancePropertyCategory\":\"PRIMITIVE\",\"primitiveDefCategory\":\"OM_PRIMITIVE_TYPE_STRING\",\"primitiveValue\":\"A Simple Term\"}\"}}}"} :entityProperties/someProperty.value {"key": "A Simple Term"} ... }
-
-
Field Summary
-
Fields inherited from class org.odpi.egeria.connectors.juxt.crux.mapping.AbstractMapping
cruxConnector, mapper
-
-
Constructor Summary
Constructors Constructor Description StructPropertyValueMapping()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddStructPropertyValueToDoc(CruxOMRSRepositoryConnector cruxConnector, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType instanceType, crux.api.CruxDocument.Builder builder, String propertyName, String namespace, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.StructPropertyValue value)Add the provided struct value to the Crux document.static Map<String,Object>getStructPropertyValueForComparison(CruxOMRSRepositoryConnector cruxConnector, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.StructPropertyValue spv)Convert the provided struct property value into a Crux comparable form.-
Methods inherited from class org.odpi.egeria.connectors.juxt.crux.mapping.InstancePropertyValueMapping
addInstancePropertyValueToDoc, getEndsWithPropertyNameForMatching, getInstancePropertyValueFromDoc, getKeywordsForProperty, getNamesForProperty, getPropertyValueKeyword, getSerializedPropertyKeyword, getValueForComparison
-
Methods inherited from class org.odpi.egeria.connectors.juxt.crux.mapping.AbstractMapping
getDeserializedValue, getEmbeddedSerializedForm, getKeyword, getKeyword
-
-
-
-
Method Detail
-
addStructPropertyValueToDoc
public static void addStructPropertyValueToDoc(CruxOMRSRepositoryConnector cruxConnector, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType instanceType, crux.api.CruxDocument.Builder builder, String propertyName, String namespace, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.StructPropertyValue value)
Add the provided struct value to the Crux document.- Parameters:
cruxConnector- connectivity to the repositoryinstanceType- of the instance for which this value appliesbuilder- to which to add the property valuepropertyName- of the propertynamespace- by which to qualify the propertyvalue- of the property
-
getStructPropertyValueForComparison
public static Map<String,Object> getStructPropertyValueForComparison(CruxOMRSRepositoryConnector cruxConnector, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.StructPropertyValue spv)
Convert the provided struct property value into a Crux comparable form.- Parameters:
cruxConnector- connectivity to the repositoryspv- Egeria value to translate to Crux-comparable value- Returns:
Map<String, Object>value that Crux can compare
-
-