Class EntityProxyMapping
- java.lang.Object
-
- org.odpi.egeria.connectors.juxt.xtdb.mapping.AbstractMapping
-
- org.odpi.egeria.connectors.juxt.xtdb.mapping.InstanceAuditHeaderMapping
-
- org.odpi.egeria.connectors.juxt.xtdb.mapping.InstanceHeaderMapping
-
- org.odpi.egeria.connectors.juxt.xtdb.mapping.EntitySummaryMapping
-
- org.odpi.egeria.connectors.juxt.xtdb.mapping.EntityProxyMapping
-
public class EntityProxyMapping extends EntitySummaryMapping
Maps the properties of EntityProxies between persistence and objects.
-
-
Field Summary
Fields Modifier and Type Field Description static StringENTITY_PROXY_ONLY_MARKER-
Fields inherited from class org.odpi.egeria.connectors.juxt.xtdb.mapping.EntitySummaryMapping
INSTANCE_REF_PREFIX, N_CLASSIFICATIONS
-
Fields inherited from class org.odpi.egeria.connectors.juxt.xtdb.mapping.InstanceHeaderMapping
instanceHeader, RE_IDENTIFIED_FROM_GUID, xtdbDoc
-
Fields inherited from class org.odpi.egeria.connectors.juxt.xtdb.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
-
Fields inherited from class org.odpi.egeria.connectors.juxt.xtdb.mapping.AbstractMapping
mapper, xtdbConnector
-
-
Constructor Summary
Constructors Constructor Description 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).EntityProxyMapping(XtdbOMRSRepositoryConnector xtdbConnector, xtdb.api.XtdbDocument xtdbDoc)Construct a mapping from a XTDB map (to map to an Egeria representation).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfromDoc()Translate the provided XTDB representation into an Egeria representation.static 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).protected xtdb.api.XtdbDocument.BuildertoDoc()Translate the provided Egeria representation into a XTDB map.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxytoEgeria()Map from XTDB to Egeria.-
Methods inherited from class org.odpi.egeria.connectors.juxt.xtdb.mapping.EntitySummaryMapping
fromMap
-
Methods inherited from class org.odpi.egeria.connectors.juxt.xtdb.mapping.InstanceHeaderMapping
fromMap, getGuidReference, getGuidReference, getReference, toMap, toXTDB, trimGuidFromReference
-
Methods inherited from class org.odpi.egeria.connectors.juxt.xtdb.mapping.InstanceAuditHeaderMapping
addToMap, addTypeDetailsToMap, buildDoc, buildDoc, fromDoc, fromDoc, fromMap, getTypeFromInstance, isKnownBaseProperty
-
Methods inherited from class org.odpi.egeria.connectors.juxt.xtdb.mapping.AbstractMapping
getDeserializedValue, getDeserializedValue, getEmbeddedSerializedForm, getEmbeddedSerializedForm, getKeyword, getKeyword
-
-
-
-
Field Detail
-
ENTITY_PROXY_ONLY_MARKER
public static final String ENTITY_PROXY_ONLY_MARKER
-
-
Constructor Detail
-
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
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 XTDBxtdbDoc- from which to map
-
-
Method Detail
-
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:
getFromDoc(XtdbOMRSRepositoryConnector, XtdbDocument),EntityProxyMapping(XtdbOMRSRepositoryConnector, XtdbDocument)
-
toDoc
protected xtdb.api.XtdbDocument.Builder toDoc()
Translate the provided Egeria representation into a XTDB map.- Overrides:
toDocin classEntitySummaryMapping- Returns:
- XtdbDocument.Builder from which to build the document
-
fromDoc
protected void fromDoc()
Translate the provided XTDB representation into an Egeria representation.- Overrides:
fromDocin classEntitySummaryMapping
-
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.InvalidParameterExceptionTranslate 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
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
-
-