Class MendelDuplicateConsolidator
java.lang.Object
org.odpi.openmetadata.adapters.connectors.mendel.MendelDuplicateConsolidator
MendelDuplicateConsolidator combines a cluster of validated peer duplicates into a single consolidated element,
using survivorship rules to decide what the consolidated element contains.
The consolidated element carries the ConsolidatedDuplicate classification with a status of VALIDATED, and is linked to each of its members with a ConsolidatedDuplicateLink relationship. That combination causes the retrieval processing to return the consolidated element in place of the members.
- The properties come from the latest version of the cluster's members. A property that only an earlier version supplies is added, so nothing that a member knows about is lost.
- The qualified name is derived rather than inherited - the original with the ISO-8601 time of the merge appended - because a qualified name is unique and the members still hold theirs.
- The classifications of all of the members are combined. Where more than one member carries the same classification, the one from the latest member wins.
- The relationships of all of the members are combined. A relationship is skipped when adding it would break the cardinality rules of its type - and where two members conflict on a relationship that the type only permits one of, the one from the latest member wins.
The consolidated element carries the ConsolidatedDuplicate classification with a status of VALIDATED, and is linked to each of its members with a ConsolidatedDuplicateLink relationship. That combination causes the retrieval processing to return the consolidated element in place of the members.
-
Constructor Summary
ConstructorsConstructorDescriptionMendelDuplicateConsolidator(IntegrationContext integrationContext, PropertyHelper propertyHelper, String connectorName, AuditLog auditLog) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidconsolidateCluster(List<OpenMetadataElementStub> members) Consolidate a cluster of validated peer duplicates into a single element.
-
Constructor Details
-
MendelDuplicateConsolidator
public MendelDuplicateConsolidator(IntegrationContext integrationContext, PropertyHelper propertyHelper, String connectorName, AuditLog auditLog) Constructor.- Parameters:
integrationContext- context giving access to open metadatapropertyHelper- helper for working with element propertiesconnectorName- name of the calling connector - used in messagesauditLog- logging destination
-
-
Method Details
-
consolidateCluster
Consolidate a cluster of validated peer duplicates into a single element. Nothing happens if the cluster has already been consolidated.- Parameters:
members- the elements in the cluster- Throws:
Exception- the consolidation failed - reported by the caller
-