Class RelationshipPurposeResolver

java.lang.Object
org.odpi.openmetadata.commonservices.generichandlers.RelationshipPurposeResolver

public class RelationshipPurposeResolver extends Object
RelationshipPurposeResolver works out the purpose of a relationship type. The purpose recorded in the RelationshipDef is used first. If it is missing (for example, the type came from a cohort member running an older types archive), the purpose defined in OpenMetadataType is used. A type that has neither (such as a type added by an extension archive) inherits the purpose of its nearest super type.
  • Constructor Details

    • RelationshipPurposeResolver

      public RelationshipPurposeResolver()
  • Method Details

    • getRelationshipPurpose

      public static OpenMetadataRelationshipPurpose getRelationshipPurpose(String sourceName, String typeName, OMRSRepositoryHelper repositoryHelper)
      Return the purpose of the named relationship type.
      Parameters:
      sourceName - calling service
      typeName - name of the relationship type
      repositoryHelper - helper for retrieving the type definitions
      Returns:
      purpose, or null if none can be found
    • getRelationshipPurpose

      public static OpenMetadataRelationshipPurpose getRelationshipPurpose(String sourceName, RelationshipDef relationshipDef, OMRSRepositoryHelper repositoryHelper)
      Return the purpose of the supplied relationship type.
      Parameters:
      sourceName - calling service
      relationshipDef - relationship type
      repositoryHelper - helper for retrieving super types
      Returns:
      purpose, or null if none can be found