public class ArrayPropertyValueMapping extends InstancePropertyValueMapping
Maps singular ArrayPropertyValues 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\":\"ArrayPropertyValue\",\"instancePropertyCategory\":\"ARRAY\",\"arrayValues\":{\"class\":\"InstanceProperties\",\"instanceProperties\":{\"0\":\"{\"class\":\"PrimitivePropertyValue\",\"instancePropertyCategory\":\"PRIMITIVE\",\"primitiveDefCategory\":\"OM_PRIMITIVE_TYPE_STRING\",\"primitiveValue\":\"A Simple Term\"}\"}}}"} :entityProperties/someProperty.value ["A Simple Term"] ... }
  • Constructor Details

    • ArrayPropertyValueMapping

      public ArrayPropertyValueMapping()
  • Method Details

    • addArrayPropertyValueToDoc

      public static void addArrayPropertyValueToDoc(XTDBOMRSRepositoryConnector xtdbConnector, xtdb.api.XtdbDocument.Builder builder, PropertyKeywords keywords, ArrayPropertyValue value)
      Add the provided array value to the XTDB document.
      Parameters:
      xtdbConnector - connectivity to the repository
      builder - to which to add the property value
      keywords - of the property
      value - of the property
    • addArrayPropertyValueToDoc

      public static clojure.lang.IPersistentMap addArrayPropertyValueToDoc(clojure.lang.IPersistentMap doc, clojure.lang.Keyword propertyKeyword, ArrayPropertyValue value) throws InvalidParameterException
      Add the provided array value to the XTDB map.
      Parameters:
      doc - the XTDB map to which to add the property
      propertyKeyword - the property whose value should be set, fully-qualified with namespace and type name
      value - of the property
      Returns:
      IPersistentMap containing the updated XTDB map
      Throws:
      InvalidParameterException - if the value cannot be persisted
    • getArrayPropertyValueForComparison

      public static List<Object> getArrayPropertyValueForComparison(XTDBOMRSRepositoryConnector xtdbConnector, ArrayPropertyValue apv)
      Convert the provided array property value into a XTDB comparable form.
      Parameters:
      xtdbConnector - connectivity to the repository
      apv - Egeria value to translate to XTDB-comparable value
      Returns:
      List<Object> value that XTDB can compare
    • getArrayPropertyValueForComparison

      public static List<Object> getArrayPropertyValueForComparison(ArrayPropertyValue apv) throws InvalidParameterException
      Convert the provided array property value into a XTDB comparable form.
      Parameters:
      apv - Egeria value to translate to XTDB-comparable value
      Returns:
      List<Object> value that XTDB can compare
      Throws:
      InvalidParameterException - if the value cannot be persisted