Class EnumPropertyValueMapping
- 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.EnumPropertyValueMapping
-
public class EnumPropertyValueMapping extends InstancePropertyValueMapping
Maps singular EnumPropertyValues between persistence and objects. These cannot simply be serialized to JSON as that would impact the ability to search their values correctly, so we will serde and search based strictly on their ordinal values:{ ... :instanceProvenanceType 1 :currentStatus 15 ... }
-
-
Field Summary
-
Fields inherited from class org.odpi.egeria.connectors.juxt.crux.mapping.AbstractMapping
cruxConnector, mapper
-
-
Constructor Summary
Constructors Constructor Description EnumPropertyValueMapping()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddEnumPropertyValueToDoc(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.EnumPropertyValue value)Add the provided enum value to the Crux document.static IntegergetEnumPropertyValueForComparison(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue epv)Convert the provided enumeration property value into a Crux comparable form.static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProvenanceTypegetInstanceProvenanceTypeFromOrdinal(CruxOMRSRepositoryConnector cruxConnector, Integer ordinal)Convert the provided ordinal into its InstanceProvenanceType.static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatusgetInstanceStatusFromOrdinal(CruxOMRSRepositoryConnector cruxConnector, Integer ordinal)Convert the provided ordinal into its InstanceStatus.static IntegergetOrdinalForInstanceProvenanceType(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProvenanceType ipt)Convert the provided InstanceProvenanceType into its symbolic name.static IntegergetOrdinalForInstanceStatus(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus is)Convert the provided InstanceStatus into its ordinal.-
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
-
addEnumPropertyValueToDoc
public static void addEnumPropertyValueToDoc(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.EnumPropertyValue value)
Add the provided enum 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
-
getEnumPropertyValueForComparison
public static Integer getEnumPropertyValueForComparison(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue epv)
Convert the provided enumeration property value into a Crux comparable form.- Parameters:
epv- Egeria value to translate to Crux-comparable value- Returns:
- Integer value that Crux can compare
-
getInstanceProvenanceTypeFromOrdinal
public static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProvenanceType getInstanceProvenanceTypeFromOrdinal(CruxOMRSRepositoryConnector cruxConnector, Integer ordinal)
Convert the provided ordinal into its InstanceProvenanceType.- Parameters:
cruxConnector- connectivity to the repositoryordinal- to convert- Returns:
- InstanceProvenanceType
-
getOrdinalForInstanceProvenanceType
public static Integer getOrdinalForInstanceProvenanceType(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProvenanceType ipt)
Convert the provided InstanceProvenanceType into its symbolic name.- Parameters:
ipt- to convert- Returns:
- Integer
-
getInstanceStatusFromOrdinal
public static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus getInstanceStatusFromOrdinal(CruxOMRSRepositoryConnector cruxConnector, Integer ordinal)
Convert the provided ordinal into its InstanceStatus.- Parameters:
cruxConnector- connectivity to the repositoryordinal- to convert- Returns:
- InstanceStatus
-
getOrdinalForInstanceStatus
public static Integer getOrdinalForInstanceStatus(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus is)
Convert the provided InstanceStatus into its ordinal.- Parameters:
is- to convert- Returns:
- Integer
-
-