Direct Known Subclasses:

public class EntitiesAccumulator extends QueryInstanceAccumulatorBase
EntitiesAccumulator accumulates and validates entities received from a collection of open metadata repositories. It removes duplicates from the list by choosing the latest entity details object. This class may be called simultaneously from different threads, so it must be thread-safe.
  • Constructor Details

    • EntitiesAccumulator

      public EntitiesAccumulator(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.
      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.
      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.
      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.
      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).
      repositoryConnector - enterprise connector
      metadataCollection - enterprise metadata collection
      list of entities