Class InstanceAuditHeaderMapping

java.lang.Object
org.odpi.egeria.connectors.juxt.xtdb.mapping.AbstractMapping
org.odpi.egeria.connectors.juxt.xtdb.mapping.InstanceAuditHeaderMapping
Direct Known Subclasses:
ClassificationMapping, InstanceHeaderMapping

public abstract class InstanceAuditHeaderMapping extends AbstractMapping
Maps the properties of InstanceAuditHeaders between persistence and objects.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     

    Fields inherited from class org.odpi.egeria.connectors.juxt.xtdb.mapping.AbstractMapping

    mapper, xtdbConnector
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    static clojure.lang.IPersistentVector
    addToMap(clojure.lang.IPersistentMap doc, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah, String namespace)
    Translate the provided Egeria representation into a XTDB document map.
    static clojure.lang.IPersistentMap
    addTypeDetailsToMap(clojure.lang.IPersistentMap doc, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType type, String namespace)
    Translate the provided Egeria type information into a XTDB document map.
    protected static void
    buildDoc(xtdb.api.XtdbDocument.Builder builder, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah)
    Translate the provided Egeria representation into a XTDB document.
    static Date
    buildDoc(xtdb.api.XtdbDocument.Builder builder, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah, String namespace)
    Translate the provided Egeria representation into a XTDB document.
    protected void
    fromDoc(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah, xtdb.api.XtdbDocument doc)
    Translate the provided XTDB representation into an Egeria representation.
    protected void
    fromDoc(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah, xtdb.api.XtdbDocument doc, String namespace)
    Translate the provided XTDB representation into an Egeria representation.
    protected static void
    fromMap(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah, clojure.lang.IPersistentMap doc, String namespace)
    Translate the provided XTDB representation into an Egeria representation.
    static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType
    getTypeFromInstance(clojure.lang.IPersistentMap doc, String namespace)
    Retrieve the instance type details from the provided XTDB document map.
    static boolean
    Check whether the specified property is a known base-level Instance property.

    Methods inherited from class org.odpi.egeria.connectors.juxt.xtdb.mapping.AbstractMapping

    getDeserializedValue, getDeserializedValue, getEmbeddedSerializedForm, getEmbeddedSerializedForm, getKeyword, getKeyword

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • METADATA_COLLECTION_ID

      public static final String METADATA_COLLECTION_ID
    • METADATA_COLLECTION_NAME

      public static final String METADATA_COLLECTION_NAME
    • CREATE_TIME

      public static final String CREATE_TIME
    • UPDATE_TIME

      public static final String UPDATE_TIME
    • CURRENT_STATUS

      public static final String CURRENT_STATUS
    • STATUS_ON_DELETE

      public static final String STATUS_ON_DELETE
    • TYPE_DEF_GUIDS

      public static final String TYPE_DEF_GUIDS
    • TYPE_DEF_CATEGORY

      public static final String TYPE_DEF_CATEGORY
    • VERSION

      public static final String VERSION
    • MAINTAINED_BY

      public static final String MAINTAINED_BY
    • UPDATED_BY

      public static final String UPDATED_BY
    • REPLICATED_BY

      public static final String REPLICATED_BY
    • INSTANCE_PROVENANCE_TYPE

      public static final String INSTANCE_PROVENANCE_TYPE
  • Constructor Details

    • InstanceAuditHeaderMapping

      protected InstanceAuditHeaderMapping(XtdbOMRSRepositoryConnector xtdbConnector)
      Default constructor.
      Parameters:
      xtdbConnector - connectivity to XTDB
  • Method Details

    • isKnownBaseProperty

      public static boolean isKnownBaseProperty(String property)
      Check whether the specified property is a known base-level Instance property.
      Parameters:
      property - to check
      Returns:
      boolean
    • buildDoc

      protected static void buildDoc(xtdb.api.XtdbDocument.Builder builder, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah) throws IOException
      Translate the provided Egeria representation into a XTDB document.
      Parameters:
      builder - for the XTDB document
      iah - Egeria representation from which to map
      Throws:
      IOException - on any error serializing the provided values
    • buildDoc

      public static Date buildDoc(xtdb.api.XtdbDocument.Builder builder, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah, String namespace) throws IOException
      Translate the provided Egeria representation into a XTDB document.
      Parameters:
      builder - for the XTDB document
      iah - Egeria representation from which to map
      namespace - by which to qualify the properties
      Returns:
      the latest change date in the header (updateTime or if empty createTime)
      Throws:
      IOException - on any error serializing the provided values
    • addToMap

      public static clojure.lang.IPersistentVector addToMap(clojure.lang.IPersistentMap doc, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah, String namespace) throws IOException
      Translate the provided Egeria representation into a XTDB document map.
      Parameters:
      doc - for the XTDB document
      iah - Egeria representation from which to map
      namespace - by which to qualify the properties
      Returns:
      a tuple containing the timestamp of the create / update followed by the updated document map itself
      Throws:
      IOException - on any error serializing the provided values
    • addTypeDetailsToMap

      public static clojure.lang.IPersistentMap addTypeDetailsToMap(clojure.lang.IPersistentMap doc, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType type, String namespace) throws IOException
      Translate the provided Egeria type information into a XTDB document map.
      Parameters:
      doc - for the XTDB document
      type - to update into the document
      namespace - by which to qualify the properties
      Returns:
      IPersistentMap containing the updated XTDB document
      Throws:
      IOException - on any error serializing the provided values
    • getTypeFromInstance

      public static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType getTypeFromInstance(clojure.lang.IPersistentMap doc, String namespace) throws IOException
      Retrieve the instance type details from the provided XTDB document map.
      Parameters:
      doc - for the XTDB document
      namespace - by which the properties are qualified
      Returns:
      InstanceType
      Throws:
      IOException - on any error deserializing the value
    • fromDoc

      protected void fromDoc(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah, xtdb.api.XtdbDocument doc)
      Translate the provided XTDB representation into an Egeria representation.
      Parameters:
      iah - into which to map
      doc - from which to map
    • fromDoc

      protected void fromDoc(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah, xtdb.api.XtdbDocument doc, String namespace)
      Translate the provided XTDB representation into an Egeria representation.
      Parameters:
      iah - into which to map
      doc - from which to map
      namespace - by which the properties are qualified
    • fromMap

      protected static void fromMap(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah, clojure.lang.IPersistentMap doc, String namespace) throws IOException, org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException
      Translate the provided XTDB representation into an Egeria representation.
      Parameters:
      iah - into which to map
      doc - from which to map
      namespace - by which the properties are qualified
      Throws:
      IOException - on any issue deserializing values
      org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - for any unmapped properties