Class AssetLineagePublisher

java.lang.Object
org.odpi.openmetadata.accessservices.assetlineage.outtopic.AssetLineagePublisher

public class AssetLineagePublisher extends Object
AssetLineagePublisher is the connector responsible for publishing lineage context information about new and changed assets.
  • Constructor Summary

    Constructors
    Constructor
    Description
    AssetLineagePublisher(org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConnector outTopicConnector, String serverName, String serverUserName, int batchSize)
    The constructor is given the connection to the out topic for Asset Lineage OMAS along with classes for testing and manipulating instances.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isEntityEligibleForPublishing(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entityDetail)
    Checks if the entity is eligible to be send in a lineage event.
    void
    publishAssetContextEvent(org.odpi.openmetadata.accessservices.assetlineage.model.RelationshipsContext assetContext)
    Publishes a LineageRelationshipsEvent containing a LineageRelationship
    void
    publishClassificationContext(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entityDetail, org.odpi.openmetadata.accessservices.assetlineage.event.AssetLineageEventType assetLineageEventType)
     
    void
    publishDataFlowRelationshipEvent(org.odpi.openmetadata.accessservices.assetlineage.model.LineageRelationship lineageRelationship, org.odpi.openmetadata.accessservices.assetlineage.event.AssetLineageEventType eventType)
    Publishes a LineageRelationshipEvent containing a LineageRelationship.
    void
    publishEvent(org.odpi.openmetadata.accessservices.assetlineage.event.AssetLineageEventHeader event)
    Output a new asset event.
    void
    publishGlossaryContext(String glossaryTermGUID)
    Build the context for a Glossary Term based on the glossary term GUID and publishes the event to the out topic
    com.google.common.collect.Multimap<String,org.odpi.openmetadata.accessservices.assetlineage.model.RelationshipsContext>
    publishGlossaryContext(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entityDetail)
    Build the context for a Glossary Term and publishes the event to the out topic
    void
    publishLineageEntityEvent(org.odpi.openmetadata.accessservices.assetlineage.model.LineageEntity lineageEntity, org.odpi.openmetadata.accessservices.assetlineage.event.AssetLineageEventType lineageEventType)
    Publish lineage entity event
    void
    publishLineageRelationshipEvent(org.odpi.openmetadata.accessservices.assetlineage.model.LineageRelationship lineageRelationship, org.odpi.openmetadata.accessservices.assetlineage.event.AssetLineageEventType eventType)
    Publishes a LineageRelationshipEvent containing a LineageRelationship
    void
    publishLineageSummaryEvent(org.odpi.openmetadata.accessservices.assetlineage.model.LineagePublishSummary summary)
    Publish LineageSyncEvent that contains LineagePublishSummary details.
    com.google.common.collect.Multimap<String,org.odpi.openmetadata.accessservices.assetlineage.model.RelationshipsContext>
    publishProcessContext(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entityDetail)
    Takes the context for a Process and publishes the event to the output topic

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AssetLineagePublisher

      public AssetLineagePublisher(org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConnector outTopicConnector, String serverName, String serverUserName, int batchSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase
      The constructor is given the connection to the out topic for Asset Lineage OMAS along with classes for testing and manipulating instances.
      Parameters:
      outTopicConnector - connection to the out topic
      serverName - name of the user of the server instance
      serverUserName - name of this server instance
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase
  • Method Details

    • publishProcessContext

      public com.google.common.collect.Multimap<String,org.odpi.openmetadata.accessservices.assetlineage.model.RelationshipsContext> publishProcessContext(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entityDetail) throws org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase, com.fasterxml.jackson.core.JsonProcessingException
      Takes the context for a Process and publishes the event to the output topic
      Parameters:
      entityDetail - entity to get context
      Returns:
      the Process context
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase - checked exception for reporting errors found when using OCF connectors
      com.fasterxml.jackson.core.JsonProcessingException - exception parsing the event json
    • publishGlossaryContext

      public void publishGlossaryContext(String glossaryTermGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase, com.fasterxml.jackson.core.JsonProcessingException
      Build the context for a Glossary Term based on the glossary term GUID and publishes the event to the out topic
      Parameters:
      glossaryTermGUID - glossary term GUID to get context
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase - checked exception for reporting errors found when using OCF connectors
      com.fasterxml.jackson.core.JsonProcessingException - exception parsing the event json
    • publishGlossaryContext

      public com.google.common.collect.Multimap<String,org.odpi.openmetadata.accessservices.assetlineage.model.RelationshipsContext> publishGlossaryContext(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entityDetail) throws org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase, com.fasterxml.jackson.core.JsonProcessingException
      Build the context for a Glossary Term and publishes the event to the out topic
      Parameters:
      entityDetail - glossary term to get context
      Returns:
      the Glossary Term context
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase - checked exception for reporting errors found when using OCF connectors
      com.fasterxml.jackson.core.JsonProcessingException - exception parsing the event json
    • publishClassificationContext

      public void publishClassificationContext(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entityDetail, org.odpi.openmetadata.accessservices.assetlineage.event.AssetLineageEventType assetLineageEventType) throws org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase, com.fasterxml.jackson.core.JsonProcessingException
      Parameters:
      entityDetail - entity to get context
      assetLineageEventType - event type to get published
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase - checked exception for reporting errors found when using OCF connectors
      com.fasterxml.jackson.core.JsonProcessingException - exception parsing the event json
    • publishLineageRelationshipEvent

      public void publishLineageRelationshipEvent(org.odpi.openmetadata.accessservices.assetlineage.model.LineageRelationship lineageRelationship, org.odpi.openmetadata.accessservices.assetlineage.event.AssetLineageEventType eventType) throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException, com.fasterxml.jackson.core.JsonProcessingException
      Publishes a LineageRelationshipEvent containing a LineageRelationship
      Parameters:
      lineageRelationship - the LineageRelationship to be published
      eventType - the type on the event
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - unable to send the event due to connectivity issue
      com.fasterxml.jackson.core.JsonProcessingException - exception parsing the event json
    • publishAssetContextEvent

      public void publishAssetContextEvent(org.odpi.openmetadata.accessservices.assetlineage.model.RelationshipsContext assetContext) throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException, com.fasterxml.jackson.core.JsonProcessingException
      Publishes a LineageRelationshipsEvent containing a LineageRelationship
      Parameters:
      assetContext - the LineageRelationship to be published
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - unable to send the event due to connectivity issue
      com.fasterxml.jackson.core.JsonProcessingException - exception parsing the event json
    • publishEvent

      public void publishEvent(org.odpi.openmetadata.accessservices.assetlineage.event.AssetLineageEventHeader event) throws com.fasterxml.jackson.core.JsonProcessingException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
      Output a new asset event.
      Parameters:
      event - event to send
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - unable to send the event due to connectivity issue
      com.fasterxml.jackson.core.JsonProcessingException - exception parsing the event json
    • publishLineageSummaryEvent

      public void publishLineageSummaryEvent(org.odpi.openmetadata.accessservices.assetlineage.model.LineagePublishSummary summary) throws com.fasterxml.jackson.core.JsonProcessingException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
      Publish LineageSyncEvent that contains LineagePublishSummary details.
      Parameters:
      summary - details about lineage processing and publish activity completed by Asset Lineage OMAS.
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - unable to send the event due to connectivity issue
      com.fasterxml.jackson.core.JsonProcessingException - exception parsing the event json
    • publishLineageEntityEvent

      public void publishLineageEntityEvent(org.odpi.openmetadata.accessservices.assetlineage.model.LineageEntity lineageEntity, org.odpi.openmetadata.accessservices.assetlineage.event.AssetLineageEventType lineageEventType) throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException, com.fasterxml.jackson.core.JsonProcessingException
      Publish lineage entity event
      Parameters:
      lineageEntity - - lineage entity
      lineageEventType - - lineage event type
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - unable to send the event due to connectivity issue
      com.fasterxml.jackson.core.JsonProcessingException - exception parsing the event json
    • publishDataFlowRelationshipEvent

      public void publishDataFlowRelationshipEvent(org.odpi.openmetadata.accessservices.assetlineage.model.LineageRelationship lineageRelationship, org.odpi.openmetadata.accessservices.assetlineage.event.AssetLineageEventType eventType) throws org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase, com.fasterxml.jackson.core.JsonProcessingException
      Publishes a LineageRelationshipEvent containing a LineageRelationship. For each end of the relationship it publishes a LineageRelationshipsEvent containing the column context if available
      Parameters:
      lineageRelationship - the LineageRelationship to be published
      eventType - the type on the event
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - unable to send the event due to connectivity issue
      com.fasterxml.jackson.core.JsonProcessingException - exception parsing the event json
      org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase
    • isEntityEligibleForPublishing

      public boolean isEntityEligibleForPublishing(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entityDetail) throws org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase
      Checks if the entity is eligible to be send in a lineage event. The GlossaryTerm and GlossaryCategory entities are send out if has SemanticAssignment and/or TermCategorization relationships
      Parameters:
      entityDetail - entity to be checked
      Returns:
      true if the entity has the lineage relationships created
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase