Class DuplicateManagementClient
java.lang.Object
org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.ConnectorContextClientBase
org.odpi.openmetadata.frameworks.governanceaction.connectorcontext.DuplicateManagementClient
Provides the methods to create, query and maintain the open metadata that controls running connectors.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.ConnectorContextClientBase
asOfTimeDefault, auditLog, connectorGUID, connectorUserId, externalSourceGUID, externalSourceIsHome, externalSourceName, forDuplicateProcessing, forLineage, governanceZonesFilterDefault, limitResultsByStatusDefault, localServerName, localServiceName, maxPageSize, parentContext, propertyHelper, sequencingOrderDefault, sequencingPropertyDefault, useCurrentEffectiveTime
-
Constructor Summary
ConstructorsConstructorDescriptionDuplicateManagementClient
(ConnectorContextBase parentContext, String localServerName, String localServiceName, String connectorUserId, String connectorGUID, String externalSourceGUID, String externalSourceName, OpenGovernanceClient duplicateManagementClient, AuditLog auditLog, int maxPageSize) Constructor for connector context client. -
Method Summary
Modifier and TypeMethodDescriptionvoid
linkConsolidatedDuplicate
(String consolidatedElementGUID, int statusIdentifier, String steward, String stewardTypeName, String stewardPropertyName, String source, String notes, List<String> sourceElementGUIDs) Identify an element that acts as a consolidated version for a set of duplicate elements.void
linkElementsAsPeerDuplicates
(String metadataElement1GUID, String metadataElement2GUID, int statusIdentifier, String steward, String stewardTypeName, String stewardPropertyName, String source, String notes, boolean setKnownDuplicate) Link elements as peer duplicates.Methods inherited from class org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.ConnectorContextClientBase
getAdditionalProperties, getDeleteOptions, getDisplayName, getEffectiveTime, getGetOptions, getMaxPagingSize, getMetadataSourceOptions, getNewElementProperties, getQualifiedName, getQueryOptions, getQueryOptions, getQueryOptions, getQueryOptions, getSearchOptions, getSearchOptions, getUpdateOptions, isForDuplicateProcessing, isForLineage, isUseCurrentEffectiveTime, publishElement, setAsOfTimeDefault, setEffectiveTimeDefault, setExternalSourceIsHome, setForDuplicateProcessing, setForLineage, setGovernanceZonesFilterDefault, setLimitResultsByStatusDefault, setSequencingOrderDefault, setUseCurrentEffectiveTime, withdrawElement
-
Constructor Details
-
DuplicateManagementClient
public DuplicateManagementClient(ConnectorContextBase parentContext, String localServerName, String localServiceName, String connectorUserId, String connectorGUID, String externalSourceGUID, String externalSourceName, OpenGovernanceClient duplicateManagementClient, AuditLog auditLog, int maxPageSize) Constructor for connector context client.- Parameters:
parentContext
- connector's contextlocalServerName
- local server where this client is running - used for error handlinglocalServiceName
- local service that his connector is hosted by - used for error handlingconnectorUserId
- the userId to use with all requests for open metadataconnectorGUID
- the unique identifier that represents this connector in open metadataexternalSourceGUID
- unique identifier of the software server capability for the source of metadataexternalSourceName
- unique name of the software server capability for the source of metadataduplicateManagementClient
- client to access open metadataauditLog
- logging destinationmaxPageSize
- max number of elements that can be returned on a query
-
-
Method Details
-
linkElementsAsPeerDuplicates
public void linkElementsAsPeerDuplicates(String metadataElement1GUID, String metadataElement2GUID, int statusIdentifier, String steward, String stewardTypeName, String stewardPropertyName, String source, String notes, boolean setKnownDuplicate) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Link elements as peer duplicates. Create a simple relationship between two elements. If the relationship already exists, the properties are updated.- Parameters:
metadataElement1GUID
- unique identifier of the metadata element at end 1 of the relationshipmetadataElement2GUID
- unique identifier of the metadata element at end 2 of the relationshipstatusIdentifier
- what is the status of this relationship (negative means untrusted, 0 means unverified and positive means trusted)steward
- identifier of the stewardstewardTypeName
- type of element used to identify the stewardstewardPropertyName
- property name used to identify stewardsource
- source of the duplicate detection processingnotes
- notes for the stewardsetKnownDuplicate
- boolean flag indicating whether the KnownDuplicate classification should be set on the linked entities.- Throws:
InvalidParameterException
- the unique identifier's of the metadata elements are null or invalid in some way; the properties are not valid for this type of relationshipUserNotAuthorizedException
- the governance action service is not authorized to create this type of relationshipPropertyServerException
- there is a problem with the metadata store
-
linkConsolidatedDuplicate
public void linkConsolidatedDuplicate(String consolidatedElementGUID, int statusIdentifier, String steward, String stewardTypeName, String stewardPropertyName, String source, String notes, List<String> sourceElementGUIDs) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Identify an element that acts as a consolidated version for a set of duplicate elements. (The consolidated element is created using createMetadataElement.)- Parameters:
consolidatedElementGUID
- unique identifier of the metadata elementstatusIdentifier
- what is the status of this relationship (negative means untrusted, 0 means unverified and positive means trusted)steward
- identifier of the stewardstewardTypeName
- type of element used to identify the stewardstewardPropertyName
- property name used to identify stewardsource
- source of the duplicate detection processingnotes
- notes for the stewardsourceElementGUIDs
- List of the source elements that must be linked to the consolidated element. It is assumed that they already have the KnownDuplicateClassification.- Throws:
InvalidParameterException
- the unique identifier's of the metadata elements are null or invalid in some way; the properties are not valid for this type of relationshipUserNotAuthorizedException
- the governance action service is not authorized to create this type of relationshipPropertyServerException
- there is a problem with the metadata store
-