Class RelationshipMapping


  • public class RelationshipMapping
    extends InstanceHeaderMapping
    Maps the properties of Relationships between persistence and objects.
    • 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 XTDB
        relationship - 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 XTDB
        xtdbDoc - from which to map
        db - an open database connection for a point-in-time appropriate to the mapping
    • Method Detail

      • toDoc

        protected xtdb.api.XtdbDocument.Builder toDoc()
        Translate the provided Egeria representation into a XTDB document.
        Overrides:
        toDoc in class InstanceHeaderMapping
        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,
                                                        IOException
        Translate 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 instance
        IOException - on any error serializing the values
      • fromDoc

        protected void fromDoc()
        Translate the provided XTDB representation into an Egeria representation.
        Overrides:
        fromDoc in class InstanceHeaderMapping
      • getReference

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