Class GlossaryContextHandler

java.lang.Object
org.odpi.openmetadata.accessservices.assetlineage.handlers.GlossaryContextHandler

public class GlossaryContextHandler extends Object
The Glossary Context Handler provides methods to build graph context for glossary terms.
  • Constructor Details

    • GlossaryContextHandler

      public GlossaryContextHandler(InvalidParameterHandler invalidParameterHandler, AssetContextHandler assetContextHandler, HandlerHelper handlerHelper)
      Construct the handler information needed to interact with the repository services
      Parameters:
      invalidParameterHandler - handler for invalid parameters
      handlerHelper - the helper handler
  • Method Details

    • getGlossaryTermDetails

      public EntityDetail getGlossaryTermDetails(String userId, String glossaryTermGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Returns the Glossary Term entity details based on the GlossaryTerm GUID
      Parameters:
      userId - the unique identifier for the user
      glossaryTermGUID - the glossary term GUID
      Returns:
      the entity details for a glossary term based on the glossary term guid
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - problem retrieving the entity.
    • buildGlossaryTermContext

      public com.google.common.collect.Multimap<String,RelationshipsContext> buildGlossaryTermContext(String userId, EntityDetail glossaryTerm) throws OCFCheckedExceptionBase
      Builds the context for a Glossary Term. This context contains the full description for the Schema Elements that have a Semantic Assigment to the GlossaryTerm
      Parameters:
      userId - the unique identifier for the user
      glossaryTerm - the glossary term entity for which the context is built
      Returns:
      a map that contains the Glossary Term relationships and context
      Throws:
      OCFCheckedExceptionBase - checked exception for reporting errors found when using OCF connectors
    • hasGlossaryTermLineageRelationships

      public boolean hasGlossaryTermLineageRelationships(String userId, EntityDetail entityDetail) throws OCFCheckedExceptionBase
      Checks if the glossary term is involved in lineage relationships
      Parameters:
      userId - the unique identifier for the user
      entityDetail - the glossary term entity for which the context is built
      Returns:
      true if there are lineage relationships for the glossary term
      Throws:
      OCFCheckedExceptionBase - checked exception for reporting errors found when using OCF connectors