public class EntityHistoryAccumulator extends EntitiesAccumulator
EntityHistoryAccumulator accumulates and validates historical versions of entities received from a collection of open metadata repositories. It removes duplicates from the list but preserves one instance of each version. This class may be called simultaneously from different threads, so it must be thread-safe.
  • Constructor Details

    • EntityHistoryAccumulator

      public EntityHistoryAccumulator(String localMetadataCollectionId, AuditLog auditLog, OMRSRepositoryValidator repositoryValidator)
      Construct an entity accumulator. Its base class manages the common variables needed to control the execution of requests across all members of the cohort(s).
      localMetadataCollectionId - collection id of local repository - null means no local repository
      auditLog - audit log provides destination for log messages
      repositoryValidator - validator provides common validation routines
  • Method Details

    • addEntities

      public void addEntities(List<EntityDetail> entities, String metadataCollectionId)
      Add a list of entities to the accumulator. This method is included to save the executors from coding this loop to process each entity.
      addEntities in class EntitiesAccumulator
      entities - list of retrieved entities
      metadataCollectionId - source metadata collection
    • saveClassifications

      public void saveClassifications(String entityGUID, List<Classification> incomingClassifications)
      Add a list of classifications to the accumulator. These are extracted from the retrieved entities, or they are separately retrieved from metadata collections that only have an entity proxy with classifications connected to it that are uniquely stored in the metadata collection.
      saveClassifications in class EntitiesAccumulator
      entityGUID - unique identifier
      incomingClassifications - list of retrieved classifications
    • getContributingMetadataCollections

      public List<String> getContributingMetadataCollections(String entityGUID)
      Return the list of metadata collection ids for the metadata collections that retrieved this entity.
      getContributingMetadataCollections in class EntitiesAccumulator
      entityGUID - unique identifier for entity of interest
      null or list of metadata collection ids
    • getResultsForAugmentation

      public List<String> getResultsForAugmentation()
      Return the list of GUIDs for the entities returned from the query.
      getResultsForAugmentation in class EntitiesAccumulator
      null or list of GUIDs
    • getResults

      public List<EntityDetail> getResults(EnterpriseOMRSRepositoryConnector repositoryConnector, OMRSMetadataCollection metadataCollection)
      Extract the results - this will be a unique list of entities selected from the instances supplied to this accumulator. It should be called once all the executors have completed processing their request(s).
      getResults in class EntitiesAccumulator
      repositoryConnector - enterprise connector
      metadataCollection - enterprise metadata collection
      list of entities