Class MapPropertyValueMapping


  • public class MapPropertyValueMapping
    extends InstancePropertyValueMapping
    Maps singular MapPropertyValues 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\":\"MapPropertyValue\",\"instancePropertyCategory\":\"MAP\",\"mapValues\":{\"class\":\"InstanceProperties\",\"instanceProperties\":{\"key\":\"{\"class\":\"PrimitivePropertyValue\",\"instancePropertyCategory\":\"PRIMITIVE\",\"primitiveDefCategory\":\"OM_PRIMITIVE_TYPE_STRING\",\"primitiveValue\":\"A Simple Term\"}\"}}}"} :entityProperties/someProperty.value {"key": "A Simple Term"} ... }
    • Constructor Detail

      • MapPropertyValueMapping

        public MapPropertyValueMapping()
    • Method Detail

      • addMapPropertyValueToDoc

        public static void addMapPropertyValueToDoc​(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.MapPropertyValue value)
        Add the provided map value to the Crux document.
        Parameters:
        cruxConnector - connectivity to the repository
        instanceType - of the instance for which this value applies
        builder - to which to add the property value
        propertyName - of the property
        namespace - by which to qualify the property
        value - of the property
      • getMapPropertyValueForComparison

        public static Map<String,​Object> getMapPropertyValueForComparison​(CruxOMRSRepositoryConnector cruxConnector,
                                                                                org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.MapPropertyValue mpv)
        Convert the provided map property value into a Crux comparable form.
        Parameters:
        cruxConnector - connectivity to the repository
        mpv - Egeria value to translate to Crux-comparable value
        Returns:
        Map<String, Object> value that Crux can compare