Class RelationshipMapping


  • public class RelationshipMapping
    extends InstanceHeaderMapping
    Maps the properties of Relationships between persistence and objects.
    • Constructor Detail

      • RelationshipMapping

        public RelationshipMapping​(CruxOMRSRepositoryConnector cruxConnector,
                                   org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship)
        Construct a mapping from a Relationship (to map to a Crux representation).
        Parameters:
        cruxConnector - connectivity to Crux
        relationship - from which to map
      • RelationshipMapping

        public RelationshipMapping​(CruxOMRSRepositoryConnector cruxConnector,
                                   crux.api.CruxDocument cruxDoc,
                                   crux.api.ICruxDatasource db)
        Construct a mapping from a Crux map (to map to an Egeria representation).
        Parameters:
        cruxConnector - connectivity to Crux
        cruxDoc - from which to map
        db - an open database connection for a point-in-time appropriate to the mapping
    • Method Detail

      • toDoc

        protected crux.api.CruxDocument.Builder toDoc()
        Translate the provided Egeria representation into a Crux document.
        Overrides:
        toDoc in class InstanceHeaderMapping
        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 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 Crux reference to this relationship document