Class LineageGraphConnector
- java.lang.Object
-
- org.odpi.openmetadata.frameworks.connectors.Connector
-
- org.odpi.openmetadata.frameworks.connectors.ConnectorBase
-
- org.odpi.openmetadata.governanceservers.openlineage.graph.LineageGraphConnectorBase
-
- org.odpi.openmetadata.openconnectors.governancedaemonconnectors.openlineageconnectors.janusconnector.graph.LineageGraphConnector
-
- All Implemented Interfaces:
LineageGraph,OpenLineageGraphConnector
public class LineageGraphConnector extends LineageGraphConnectorBase
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection
-
-
Field Summary
-
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
connectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, securedProperties
-
-
Constructor Summary
Constructors Constructor Description LineageGraphConnector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteClassification(Set<GraphContext> classificationContext)Deletes a classification of a vertexvoiddeleteEntity(String guid, Object version)voiddeleteRelationship(String guid)voiddisconnect()Optional<Long>getAssetLineageUpdateTime()LineageVertexResponsegetEntityDetails(String guid)voidinitializeGraphDB(AuditLog auditLog)Instantiates the graph based on the configuration passed.booleanisEntityInGraph(String guid)LineageResponselineage(Scope scope, String guid, String displayNameMustContain, boolean includeProcesses)voidperformLineageGraphJob()voidsaveAssetLineageUpdateTime(Long lastUpdateTime)voidstoreToGraph(Set<GraphContext> graphContext)Creates vertices and the relationships between themvoidupdateClassification(Set<GraphContext> classificationContext)Updates the classification of a vertexvoidupdateEntity(LineageEntity lineageEntity)Updates the properties of a vertexvoidupdateNeighbours(String nodeGUID, Set<String> neighboursGUIDS)Updates the neighbours of a node by removing all the entities that no longer have a relationship with it.voidupdateRelationship(LineageRelationship lineageRelationship)Updates the properties of an edgevoidupsertRelationship(LineageRelationship lineageRelationship)Create or update the relationship between two edges In case the vertexes are not created, they are firstly created-
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
equals, getConnectedAssetProperties, getConnection, getConnectorInstanceId, hashCode, initialize, initializeConnectedAssetProperties, isActive, start, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.odpi.openmetadata.governanceservers.openlineage.OpenLineageGraphConnector
start
-
-
-
-
Method Detail
-
initializeGraphDB
public void initializeGraphDB(AuditLog auditLog) throws OpenLineageException
Instantiates the graph based on the configuration passed.- Throws:
OpenLineageException
-
disconnect
public void disconnect()
- Specified by:
disconnectin interfaceOpenLineageGraphConnector- Overrides:
disconnectin classConnectorBase
-
performLineageGraphJob
public void performLineageGraphJob()
-
saveAssetLineageUpdateTime
public void saveAssetLineageUpdateTime(Long lastUpdateTime)
-
storeToGraph
public void storeToGraph(Set<GraphContext> graphContext)
Creates vertices and the relationships between them- Parameters:
graphContext- - graph Collection that contains vertices and edges to be stored
-
updateNeighbours
public void updateNeighbours(String nodeGUID, Set<String> neighboursGUIDS)
Updates the neighbours of a node by removing all the entities that no longer have a relationship with it.- Parameters:
nodeGUID- - the identifier of the entity that was updatedneighboursGUIDS- - the identifiers of the nodes that have a direct relationship to the entity
-
updateEntity
public void updateEntity(LineageEntity lineageEntity)
Updates the properties of a vertex- Parameters:
lineageEntity- - LineageEntity object that has the updated values
-
upsertRelationship
public void upsertRelationship(LineageRelationship lineageRelationship)
Create or update the relationship between two edges In case the vertexes are not created, they are firstly created- Parameters:
lineageRelationship- relationship to be updated or created
-
updateRelationship
public void updateRelationship(LineageRelationship lineageRelationship)
Updates the properties of an edge- Parameters:
lineageRelationship- - lineageRelationship object that has the updated values
-
updateClassification
public void updateClassification(Set<GraphContext> classificationContext)
Updates the classification of a vertex- Parameters:
classificationContext- - LineageEntity object that has the updated values
-
deleteClassification
public void deleteClassification(Set<GraphContext> classificationContext)
Deletes a classification of a vertex- Parameters:
classificationContext- - any remaining classifications, empty map if none
-
deleteRelationship
public void deleteRelationship(String guid)
-
lineage
public LineageResponse lineage(Scope scope, String guid, String displayNameMustContain, boolean includeProcesses)
-
getEntityDetails
public LineageVertexResponse getEntityDetails(String guid)
-
isEntityInGraph
public boolean isEntityInGraph(String guid)
-
-