Class RelationshipMapping


  • public class RelationshipMapping
    extends java.lang.Object
    The base class for all mappings between OMRS Relationship instances and SAS relationship instances.
    • Constructor Detail

      • RelationshipMapping

        public RelationshipMapping​(RepositoryConnector SASRepositoryConnector,
                                   TypeDefStore typeDefStore,
                                   AttributeTypeDefStore attributeDefStore,
                                   SASCatalogGuid sasCatalogGuid,
                                   SASCatalogObject relationship,
                                   java.lang.String userId)
        Mapping itself must be initialized with various objects.
        Parameters:
        SASRepositoryConnector - connectivity to an SAS repository
        typeDefStore - the store of mapped TypeDefs for the SAS repository
        attributeDefStore - the store of mapped AttributeTypeDefs for the SAS repository
        sasCatalogGuid - the GUID that was used to retrieve this relationship
        relationship - the SAS relationship to be mapped
        userId - the user through which to do the mapping
    • Method Detail

      • getRelationship

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship getRelationship()
                                                                                                                                             throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
        Retrieve the mapped OMRS Relationship from the SAS relationship used to construct this mapping object.
        Returns:
        Relationship
        Throws:
        org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - when unable to retrieve the Relationship
      • getSelfReferencingRelationship

        public static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship getSelfReferencingRelationship​(RepositoryConnector SASRepositoryConnector,
                                                                                                                                                                          TypeDefStore typeDefStore,
                                                                                                                                                                          SASCatalogGuid relationshipGUID,
                                                                                                                                                                          SASCatalogObject entity)
                                                                                                                                                                   throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
        Setup a self-referencing relationship using the provided prefix and SAS entity.
        Parameters:
        SASRepositoryConnector - connectivity to a SAS environment
        typeDefStore - store of TypeDef mappings
        relationshipGUID - the GUID of the relationship
        entity - the entity for which the self-referencing relationship should be generated
        Returns:
        Relationship
        Throws:
        org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - when unable to map the Relationship
      • getEntityProxyForObject

        public static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy getEntityProxyForObject​(RepositoryConnector SASRepositoryConnector,
                                                                                                                                                                  TypeDefStore typeDefStore,
                                                                                                                                                                  SASCatalogObject SASObj,
                                                                                                                                                                  java.lang.String entityPrefix,
                                                                                                                                                                  java.lang.String userId)
        Retrieves an EntityProxy object for the provided SAS object.
        Parameters:
        SASRepositoryConnector - OMRS connector to the SAS repository
        typeDefStore - store of mapped TypeDefs
        SASObj - the SAS object for which to retrieve an EntityProxy
        entityPrefix - the prefix used for the entity, if it is a generated entity (null if not generated)
        userId - the user through which to retrieve the EntityProxy (unused)
        Returns:
        EntityProxy