Class PrimitivePropertyValueMapping
java.lang.Object
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.mapping.AbstractMapping
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.mapping.InstancePropertyValueMapping
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.mapping.PrimitivePropertyValueMapping
Maps singular PrimitivePropertyValues 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/qualifiedName.json {:json "{\"class\":\"PrimitivePropertyValue\",\"instancePropertyCategory\":\"PRIMITIVE\",\"primitiveDefCategory\":\"OM_PRIMITIVE_TYPE_STRING\",\"primitiveValue\":\"A Simple Term\"}"}
:entityProperties/Referenceable.qualifiedName.value "A Simple Term"
...
:classifications.Confidentiality.classificationProperties/Confidentiality.level.json {:json "{\"class\":\"PrimitivePropertyValue\",\"instancePropertyCategory\":\"PRIMITIVE\",\"primitiveDefCategory\":\"OM_PRIMITIVE_TYPE_INT\",\"primitiveValue\":5}"}
:classifications.Confidentiality.classificationProperties/Confidentiality.level.value 5
...
}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic clojure.lang.IPersistentMapaddPrimitivePropertyValueToDoc(clojure.lang.IPersistentMap doc, clojure.lang.Keyword propertyKeyword, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.PrimitivePropertyValue value) Add the provided primitive value to the XTDB map.static voidaddPrimitivePropertyValueToDoc(xtdb.api.XtdbDocument.Builder builder, PropertyKeywords keywords, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.PrimitivePropertyValue value) Add the provided primitive value to the XTDB document.static ObjectgetPrimitiveValueForComparison(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.PrimitivePropertyValue ppv) Convert the provided primitive property value into a XTDB comparable form.Methods inherited from class org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.mapping.InstancePropertyValueMapping
addInstancePropertyValueToDoc, getKeywordsForProperty, getValueForComparison, getValueForComparisonMethods inherited from class org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.mapping.AbstractMapping
getKeyword, getKeyword
-
Constructor Details
-
PrimitivePropertyValueMapping
public PrimitivePropertyValueMapping()
-
-
Method Details
-
addPrimitivePropertyValueToDoc
public static void addPrimitivePropertyValueToDoc(xtdb.api.XtdbDocument.Builder builder, PropertyKeywords keywords, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.PrimitivePropertyValue value) Add the provided primitive value to the XTDB document.- Parameters:
builder- to which to add the property valuekeywords- of the propertyvalue- of the property
-
addPrimitivePropertyValueToDoc
public static clojure.lang.IPersistentMap addPrimitivePropertyValueToDoc(clojure.lang.IPersistentMap doc, clojure.lang.Keyword propertyKeyword, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.PrimitivePropertyValue value) Add the provided primitive value to the XTDB map.- Parameters:
doc- the XTDB map to which to add the propertypropertyKeyword- the property whose value should be set, fully-qualified with namespace and type namevalue- of the property- Returns:
- IPersistentMap of the updated XTDB doc
-
getPrimitiveValueForComparison
public static Object getPrimitiveValueForComparison(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.PrimitivePropertyValue ppv) Convert the provided primitive property value into a XTDB comparable form.- Parameters:
ppv- Egeria value to translate to XTDB-comparable value- Returns:
- Object value that XTDB can compare
-