Class IdentifierResolver
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.analyticsmodeling.synchronization.IdentifierResolver
-
public class IdentifierResolver extends Object
Class implements mapping algorithm for external assets elements (containers and items) and GUIDs assigned to objects stored in the repository.
-
-
Field Summary
Fields Modifier and Type Field Description static StringNAME_SEPARATOR
-
Constructor Summary
Constructors Constructor Description IdentifierResolver(ExecutionContext ctx, AnalyticsAsset asset)Constructor with initialization of metadata referenced in asset.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddGuidForIdentifier(String guid, String id)Add GUID for identifier that need to be resolved.static StringgetIdFromQName(String qName, String alias)Get compound identifier from qualified name.List<String>getItemGUIDs(AnalyticsMetadata item)Get GUIDs of the identifiers listed as sources of metadata.List<EntityDetail>getSchemaAttributes(String assetQualifiedName, String methodName)Fetch all schema elements of the asset by asset qualified name.booleanrequired()Check when asset identifiers need to be resolved.
-
-
-
Field Detail
-
NAME_SEPARATOR
public static String NAME_SEPARATOR
-
-
Constructor Detail
-
IdentifierResolver
public IdentifierResolver(ExecutionContext ctx, AnalyticsAsset asset)
Constructor with initialization of metadata referenced in asset.- Parameters:
ctx- execution context to access repository.asset- which identifiers to resolve.
-
-
Method Detail
-
addGuidForIdentifier
public boolean addGuidForIdentifier(String guid, String id)
Add GUID for identifier that need to be resolved.- Parameters:
guid- to add.id- of the identifier.- Returns:
- true if GUID was added for known identifier.
-
getIdFromQName
public static String getIdFromQName(String qName, String alias)
Get compound identifier from qualified name.- Parameters:
qName- source of identifier.alias- optional.- Returns:
- identifier.
-
getSchemaAttributes
public List<EntityDetail> getSchemaAttributes(String assetQualifiedName, String methodName)
Fetch all schema elements of the asset by asset qualified name.- Parameters:
assetQualifiedName- of the asset.methodName- for logging.- Returns:
- list of elements
-
required
public boolean required()
Check when asset identifiers need to be resolved.- Returns:
- if asset references something then identifiers need to be resolved.
-
getItemGUIDs
public List<String> getItemGUIDs(AnalyticsMetadata item)
Get GUIDs of the identifiers listed as sources of metadata.- Parameters:
item- referencing metadata- Returns:
- list of GUIDs.
-
-