Class EntityProxyMapping


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

      • ENTITY_PROXY_ONLY_MARKER

        public static final String ENTITY_PROXY_ONLY_MARKER
    • Constructor Detail

      • EntityProxyMapping

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

        public EntityProxyMapping​(CruxOMRSRepositoryConnector cruxConnector,
                                  crux.api.CruxDocument cruxDoc)
        Construct a mapping from a Crux map (to map to an Egeria representation).
        Parameters:
        cruxConnector - connectivity to Crux
        cruxDoc - from which to map
    • Method Detail

      • toDoc

        protected crux.api.CruxDocument.Builder toDoc()
        Translate the provided Egeria representation into a Crux map.
        Overrides:
        toDoc in class EntitySummaryMapping
        Returns:
        CruxDocument.Builder from which to build the document
      • fromDoc

        protected void fromDoc()
        Translate the provided Crux representation into an Egeria representation.
        Overrides:
        fromDoc in class EntitySummaryMapping
      • getFromDoc

        public static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy getFromDoc​(CruxOMRSRepositoryConnector cruxConnector,
                                                                                                                                                     crux.api.CruxDocument doc)
        Translate the provided Crux representation of an entity into an EntityProxy.
        Parameters:
        cruxConnector - connectivity to the Crux environment
        doc - containing the Crux 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 Crux reference to this entity summary document
      • isOnlyAProxy

        public static boolean isOnlyAProxy​(crux.api.CruxDocument doc)
        Indicates whether the provided map represents only an EntityProxy (true) or a full EntityDetail (false).
        Parameters:
        doc - containing the Crux representation
        Returns:
        boolean