public class EntityProxyMapping extends EntitySummaryMapping
Maps the properties of EntityProxies between persistence and objects.
  • Field Details

    • ENTITY_PROXY_ONLY_MARKER

      public static final String ENTITY_PROXY_ONLY_MARKER
  • Constructor Details

    • EntityProxyMapping

      public EntityProxyMapping(XTDBOMRSRepositoryConnector xtdbConnector, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy entityProxy)
      Construct a mapping from an EntityDetail (to map to a XTDB representation).
      Parameters:
      xtdbConnector - connectivity to XTDB
      entityProxy - from which to map
    • EntityProxyMapping

      public EntityProxyMapping(XTDBOMRSRepositoryConnector xtdbConnector, xtdb.api.XtdbDocument xtdbDoc)
      Construct a mapping from a XTDB map (to map to an Egeria representation).
      Parameters:
      xtdbConnector - connectivity to XTDB
      xtdbDoc - from which to map
  • Method Details

    • toEgeria

      public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy toEgeria()
      Map from XTDB to Egeria. NOTE: This method should ONLY be used when you are certain that you have only a proxy that you are translating. In general, it is better to use the getFromDoc method which will automatically determine whether you have a full entity or only a proxy, and translate either to only the proxy representation as-needed. (This method here should really be treated as an internal method of this class, and is only public given that it overrides another public method in the parent class.)
      Overrides:
      toEgeria in class EntitySummaryMapping
      Returns:
      EntityProxy
      See Also:
    • fromMap

      public static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy fromMap(clojure.lang.IPersistentMap doc) throws IOException, org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException
      Translate the provided XTDB representation into an Egeria representation.
      Parameters:
      doc - from which to map
      Returns:
      EntityProxy the Egeria representation of the XTDB document
      Throws:
      IOException - on any issue deserializing values
      org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - for any unmapped properties
    • getFromDoc

      public static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy getFromDoc(XTDBOMRSRepositoryConnector xtdbConnector, xtdb.api.XtdbDocument doc)
      Translate the provided XTDB representation of an entity into an EntityProxy.
      Parameters:
      xtdbConnector - connectivity to the XTDB environment
      doc - containing the XTDB representation of the entity
      Returns:
      EntityProxy
    • getReference

      public static String getReference(String guid)
      Retrieve the canonical reference to the entity summary with the specified GUID.
      Parameters:
      guid - of the entity summary to reference
      Returns:
      String giving the XTDB reference to this entity summary document
    • isOnlyAProxy

      public static boolean isOnlyAProxy(xtdb.api.XtdbDocument doc)
      Indicates whether the provided map represents only an EntityProxy (true) or a full EntityDetail (false).
      Parameters:
      doc - containing the XTDB representation
      Returns:
      boolean
    • isOnlyAProxy

      public static boolean isOnlyAProxy(clojure.lang.IPersistentMap doc)
      Indicates whether the provided map represents only an EntityProxy (true) or a full EntityDetail (false).
      Parameters:
      doc - containing the XTDB representation
      Returns:
      boolean