Class RelationshipMapping
- 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.RelationshipMapping
-
public class RelationshipMapping extends InstanceHeaderMapping
Maps the properties of Relationships between persistence and objects.
-
-
Field Summary
Fields Modifier and Type Field Description static StringENTITY_PROXIESstatic StringINSTANCE_REF_PREFIXstatic StringRELATIONSHIP_PROPERTIES_NS-
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 RelationshipMapping(XtdbOMRSRepositoryConnector xtdbConnector, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship)Construct a mapping from a Relationship (to map to a XTDB representation).RelationshipMapping(XtdbOMRSRepositoryConnector xtdbConnector, xtdb.api.XtdbDocument xtdbDoc, xtdb.api.IXtdbDatasource db)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 StringgetReference(String guid)Retrieve the canonical reference to the relationship with the specified GUID.protected xtdb.api.XtdbDocument.BuildertoDoc()Translate the provided Egeria representation into a XTDB document.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.RelationshiptoEgeria()Map from XTDB to Egeria.static clojure.lang.IPersistentMaptoMap(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship)Translate the provided Egeria representation into a XTDB document map.-
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
-
INSTANCE_REF_PREFIX
public static final String INSTANCE_REF_PREFIX
- See Also:
- Constant Field Values
-
RELATIONSHIP_PROPERTIES_NS
public static final String RELATIONSHIP_PROPERTIES_NS
- See Also:
- Constant Field Values
-
ENTITY_PROXIES
public static final String ENTITY_PROXIES
-
-
Constructor Detail
-
RelationshipMapping
public RelationshipMapping(XtdbOMRSRepositoryConnector xtdbConnector, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship)
Construct a mapping from a Relationship (to map to a XTDB representation).- Parameters:
xtdbConnector- connectivity to XTDBrelationship- from which to map
-
RelationshipMapping
public RelationshipMapping(XtdbOMRSRepositoryConnector xtdbConnector, xtdb.api.XtdbDocument xtdbDoc, xtdb.api.IXtdbDatasource db)
Construct a mapping from a XTDB map (to map to an Egeria representation).- Parameters:
xtdbConnector- connectivity to XTDBxtdbDoc- from which to mapdb- an open database connection for a point-in-time appropriate to the mapping
-
-
Method Detail
-
toEgeria
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship toEgeria()
Map from XTDB to Egeria.- Returns:
- EntityDetail
- See Also:
RelationshipMapping(XtdbOMRSRepositoryConnector, XtdbDocument, IXtdbDatasource)
-
toDoc
protected xtdb.api.XtdbDocument.Builder toDoc()
Translate the provided Egeria representation into a XTDB document.- Overrides:
toDocin classInstanceHeaderMapping- Returns:
- XtdbDocument.Builder from which to build the document
-
toMap
public static clojure.lang.IPersistentMap toMap(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, IOExceptionTranslate the provided Egeria representation into a XTDB document map.- Parameters:
relationship- to translate- Returns:
- IPersistentMap representing the XTDB document
- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException- on any errors identified within the metadata instanceIOException- on any error serializing the values
-
fromDoc
protected void fromDoc()
Translate the provided XTDB representation into an Egeria representation.- Overrides:
fromDocin classInstanceHeaderMapping
-
-