Class ClassificationPurposeResolver

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

public class ClassificationPurposeResolver extends Object
ClassificationPurposeResolver works out the purpose of a classification type. The purpose recorded in the ClassificationDef 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

    • ClassificationPurposeResolver

      public ClassificationPurposeResolver()
  • Method Details

    • getClassificationPurpose

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

      public static OpenMetadataClassificationPurpose getClassificationPurpose(String sourceName, ClassificationDef classificationDef, OMRSRepositoryHelper repositoryHelper)
      Return the purpose of the supplied classification type.
      Parameters:
      sourceName - calling service
      classificationDef - classification type
      repositoryHelper - helper for retrieving super types
      Returns:
      purpose, or null if none can be found