Class EntityHistoryAccumulator
java.lang.Object
org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.accumulators.ExceptionAccumulatorBase
org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.accumulators.QueryAccumulatorBase
org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.accumulators.QueryInstanceAccumulatorBase
org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.accumulators.EntitiesAccumulator
org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.accumulators.EntityHistoryAccumulator
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.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.accumulators.QueryInstanceAccumulatorBase
locallyStoredInstancesGUIDs
Fields inherited from class org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.accumulators.QueryAccumulatorBase
localMetadataCollectionId, repositoryValidator
-
Constructor Summary
ConstructorDescriptionEntityHistoryAccumulator
(String localMetadataCollectionId, AuditLog auditLog, OMRSRepositoryValidator repositoryValidator) Construct an entity accumulator. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEntities
(List<EntityDetail> entities, String metadataCollectionId) Add a list of entities to the accumulator.getContributingMetadataCollections
(String entityGUID) Return the list of metadata collection ids for the metadata collections that retrieved this entity.getResults
(EnterpriseOMRSRepositoryConnector repositoryConnector, OMRSMetadataCollection metadataCollection) Extract the results - this will be a unique list of entities selected from the instances supplied to this accumulator.Return the list of GUIDs for the entities returned from the query.void
saveClassifications
(String entityGUID, List<Classification> incomingClassifications) Add a list of classifications to the accumulator.Methods inherited from class org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.accumulators.QueryAccumulatorBase
areResultsComplete, captureException, captureException, captureException, captureException, captureException, captureException, captureException, captureException, captureException, captureException, captureException, captureGenericException, registerExecutor, resultsReturned
Methods inherited from class org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.accumulators.ExceptionAccumulatorBase
throwCapturedClassificationErrorException, throwCapturedEntityNotDeletedException, throwCapturedEntityNotKnownException, throwCapturedEntityProxyOnlyException, throwCapturedFunctionNotSupportedException, throwCapturedGenericException, throwCapturedInvalidParameterException, throwCapturedInvalidTypeDefException, throwCapturedPagingErrorException, throwCapturedPropertyErrorException, throwCapturedRelationshipNotDeletedException, throwCapturedRelationshipNotKnownException, throwCapturedRepositoryErrorException, throwCapturedStatusNotSupportedException, throwCapturedTypeDefConflictException, throwCapturedTypeDefNotKnownException, throwCapturedTypeDefNotSupportedException, throwCapturedTypeErrorException, throwCapturedUserNotAuthorizedException
-
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).- Parameters:
localMetadataCollectionId
- collection id of local repository - null means no local repositoryauditLog
- audit log provides destination for log messagesrepositoryValidator
- validator provides common validation routines
-
-
Method Details
-
addEntities
Add a list of entities to the accumulator. This method is included to save the executors from coding this loop to process each entity.- Overrides:
addEntities
in classEntitiesAccumulator
- Parameters:
entities
- list of retrieved entitiesmetadataCollectionId
- source metadata collection
-
saveClassifications
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.- Overrides:
saveClassifications
in classEntitiesAccumulator
- Parameters:
entityGUID
- unique identifierincomingClassifications
- list of retrieved classifications
-
getContributingMetadataCollections
Return the list of metadata collection ids for the metadata collections that retrieved this entity.- Overrides:
getContributingMetadataCollections
in classEntitiesAccumulator
- Parameters:
entityGUID
- unique identifier for entity of interest- Returns:
- null or list of metadata collection ids
-
getResultsForAugmentation
Return the list of GUIDs for the entities returned from the query.- Overrides:
getResultsForAugmentation
in classEntitiesAccumulator
- Returns:
- 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).- Overrides:
getResults
in classEntitiesAccumulator
- Parameters:
repositoryConnector
- enterprise connectormetadataCollection
- enterprise metadata collection- Returns:
- list of entities
-