Class AssetContextHandler
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.assetlineage.handlers.AssetContextHandler
-
public class AssetContextHandler extends Object
The Asset Context Handler provides methods to build graph context for schema elements.
-
-
Constructor Summary
Constructors Constructor Description AssetContextHandler(OpenMetadataAPIGenericHandler<GenericStub> genericHandler, HandlerHelper handlerHelper, List<String> supportedZones)Construct the handler information needed to interact with the repository services
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,RelationshipsContext>buildAssetContext(String userId, LineageEntity lineageEntity)Builds the asset context for a schema element.RelationshipsContextbuildAssetContext(String userId, EntityDetail entityDetail)Builds the asset context for a schema element.Map<String,RelationshipsContext>buildColumnContext(String userId, LineageEntity lineageEntity)Builds the column context for a schema elementOptional<LineageEntity>buildEntityContext(String userId, String guid, String typeDefName)Returns the asset entity context in lineage formatMap<String,RelationshipsContext>buildSchemaElementContext(String userId, EntityDetail entityDetail)Builds the context for a schema element without the asset context.
-
-
-
Constructor Detail
-
AssetContextHandler
public AssetContextHandler(OpenMetadataAPIGenericHandler<GenericStub> genericHandler, HandlerHelper handlerHelper, List<String> supportedZones)
Construct the handler information needed to interact with the repository services- Parameters:
genericHandler- handler for calling the repository serviceshandlerHelper- helper handlersupportedZones- configurable list of zones that Asset Lineage is allowed to retrieve Assets from
-
-
Method Detail
-
buildSchemaElementContext
public Map<String,RelationshipsContext> buildSchemaElementContext(String userId, EntityDetail entityDetail) throws OCFCheckedExceptionBase
Builds the context for a schema element without the asset context.- Parameters:
userId- the unique identifier for the userentityDetail- the entity for which the context is build- Returns:
- the context of the schema element
- Throws:
OCFCheckedExceptionBase- checked exception for reporting errors found when using OCF connectors
-
buildAssetContext
public Map<String,RelationshipsContext> buildAssetContext(String userId, LineageEntity lineageEntity) throws OCFCheckedExceptionBase
Builds the asset context for a schema element.- Parameters:
userId- the unique identifier for the userlineageEntity- the entity for which the context is build- Returns:
- the asset context of the schema element
- Throws:
OCFCheckedExceptionBase- checked exception for reporting errors found when using OCF connectors
-
buildAssetContext
public RelationshipsContext buildAssetContext(String userId, EntityDetail entityDetail) throws OCFCheckedExceptionBase
Builds the asset context for a schema element.- Parameters:
userId- the unique identifier for the userentityDetail- the entity for which the context is build- Returns:
- the asset context of the schema element
- Throws:
OCFCheckedExceptionBase- checked exception for reporting errors found when using OCF connectors
-
buildColumnContext
public Map<String,RelationshipsContext> buildColumnContext(String userId, LineageEntity lineageEntity) throws OCFCheckedExceptionBase
Builds the column context for a schema element- Parameters:
lineageEntity- column as lineage entity- Returns:
- column context of the schema element
- Throws:
OCFCheckedExceptionBase- checked exception for reporting errors found when using OCF connectors
-
buildEntityContext
public Optional<LineageEntity> buildEntityContext(String userId, String guid, String typeDefName) throws OCFCheckedExceptionBase
Returns the asset entity context in lineage format- Parameters:
userId- the unique identifier for the userguid- the guid of the entity for which the context is buildtypeDefName- the type def name of the entity for which the context is build- Returns:
- the asset entity context in lineage format
- Throws:
OCFCheckedExceptionBase- checked exception for reporting errors found when using OCF connectors
-
-