Class EntityProxyMapping
java.lang.Object
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.mapping.AbstractMapping
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.mapping.InstanceAuditHeaderMapping
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.mapping.InstanceHeaderMapping
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.mapping.EntitySummaryMapping
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.mapping.EntityProxyMapping
Maps the properties of EntityProxies between persistence and objects.
-
Field Summary
FieldsFields inherited from class org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.mapping.EntitySummaryMapping
INSTANCE_REF_PREFIX, N_CLASSIFICATIONSFields inherited from class org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.mapping.InstanceHeaderMapping
RE_IDENTIFIED_FROM_GUIDFields inherited from class org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.mapping.InstanceAuditHeaderMapping
CREATE_TIME, CURRENT_STATUS, INSTANCE_PROVENANCE_TYPE, MAINTAINED_BY, METADATA_COLLECTION_ID, METADATA_COLLECTION_NAME, REPLICATED_BY, STATUS_ON_DELETE, TYPE_DEF_CATEGORY, TYPE_DEF_GUIDS, UPDATE_TIME, UPDATED_BY, VERSION -
Constructor Summary
ConstructorsConstructorDescriptionEntityProxyMapping(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).EntityProxyMapping(XTDBOMRSRepositoryConnector xtdbConnector, xtdb.api.XtdbDocument xtdbDoc) Construct a mapping from a XTDB map (to map to an Egeria representation). -
Method Summary
Modifier and TypeMethodDescriptionstatic org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxyfromMap(clojure.lang.IPersistentMap doc) Translate the provided XTDB representation into an Egeria representation.static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxygetFromDoc(XTDBOMRSRepositoryConnector xtdbConnector, xtdb.api.XtdbDocument doc) Translate the provided XTDB representation of an entity into an EntityProxy.static StringgetReference(String guid) Retrieve the canonical reference to the entity summary with the specified GUID.static booleanisOnlyAProxy(clojure.lang.IPersistentMap doc) Indicates whether the provided map represents only an EntityProxy (true) or a full EntityDetail (false).static booleanisOnlyAProxy(xtdb.api.XtdbDocument doc) Indicates whether the provided map represents only an EntityProxy (true) or a full EntityDetail (false).org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxytoEgeria()Map from XTDB to Egeria.Methods inherited from class org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.mapping.InstanceHeaderMapping
getGuidReference, getGuidReference, toMap, toXTDB, trimGuidFromReferenceMethods inherited from class org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.mapping.InstanceAuditHeaderMapping
addToMap, addTypeDetailsToMap, buildDoc, getTypeFromInstance, isKnownBasePropertyMethods inherited from class org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.mapping.AbstractMapping
getKeyword, getKeyword
-
Field Details
-
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 XTDBentityProxy- from which to map
-
EntityProxyMapping
Construct a mapping from a XTDB map (to map to an Egeria representation).- Parameters:
xtdbConnector- connectivity to XTDBxtdbDoc- 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:
toEgeriain classEntitySummaryMapping- 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 valuesorg.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 environmentdoc- containing the XTDB representation of the entity- Returns:
- EntityProxy
-
getReference
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
-