Class LineageGraphStorageService
- java.lang.Object
-
- org.odpi.openmetadata.openconnectors.governancedaemonconnectors.openlineageconnectors.janusconnector.graph.LineageGraphStorageService
-
- All Implemented Interfaces:
LineageGraph
public class LineageGraphStorageService extends Object implements LineageGraph
-
-
Constructor Summary
Constructors Constructor Description LineageGraphStorageService(GraphHelper graphHelper, AuditLog auditLog)
-
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)Optional<Long>getAssetLineageUpdateTime()voidhandleSaveAssetLineageUpdateTimeException(Exception e)BooleanisEntityInGraph(String guid)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(LineageSyncUpdateContext syncUpdateContext)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
-
-
-
Constructor Detail
-
LineageGraphStorageService
public LineageGraphStorageService(GraphHelper graphHelper, AuditLog auditLog)
-
-
Method Detail
-
storeToGraph
public void storeToGraph(Set<GraphContext> graphContext)
Creates vertices and the relationships between them- Specified by:
storeToGraphin interfaceLineageGraph- Parameters:
graphContext- - graph Collection that contains vertices and edges to be stored
-
updateNeighbours
public void updateNeighbours(LineageSyncUpdateContext syncUpdateContext)
Updates the neighbours of a node by removing all the entities that no longer have a relationship with it.SyncUpdateContext contains the context for syncing the relationships of a node after an update.
- Specified by:
updateNeighboursin interfaceLineageGraph
-
updateEntity
public void updateEntity(LineageEntity lineageEntity)
Updates the properties of a vertex- Specified by:
updateEntityin interfaceLineageGraph- 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- Specified by:
upsertRelationshipin interfaceLineageGraph- Parameters:
lineageRelationship- relationship to be updated or created
-
updateRelationship
public void updateRelationship(LineageRelationship lineageRelationship)
Updates the properties of an edge- Specified by:
updateRelationshipin interfaceLineageGraph- Parameters:
lineageRelationship- - lineageRelationship object that has the updated values
-
updateClassification
public void updateClassification(Set<GraphContext> classificationContext)
Updates the classification of a vertex- Specified by:
updateClassificationin interfaceLineageGraph- Parameters:
classificationContext- - LineageEntity object that has the updated values
-
deleteClassification
public void deleteClassification(Set<GraphContext> classificationContext)
Deletes a classification of a vertex- Specified by:
deleteClassificationin interfaceLineageGraph- Parameters:
classificationContext- - any remaining classifications, empty map if none
-
deleteRelationship
public void deleteRelationship(String guid)
- Specified by:
deleteRelationshipin interfaceLineageGraph
-
deleteEntity
public void deleteEntity(String guid, Object version)
- Specified by:
deleteEntityin interfaceLineageGraph
-
saveAssetLineageUpdateTime
public void saveAssetLineageUpdateTime(Long lastUpdateTime)
- Specified by:
saveAssetLineageUpdateTimein interfaceLineageGraph
-
handleSaveAssetLineageUpdateTimeException
public void handleSaveAssetLineageUpdateTimeException(Exception e)
-
getAssetLineageUpdateTime
public Optional<Long> getAssetLineageUpdateTime()
- Specified by:
getAssetLineageUpdateTimein interfaceLineageGraph
-
isEntityInGraph
public Boolean isEntityInGraph(String guid)
- Specified by:
isEntityInGraphin interfaceLineageGraph- Returns:
-
-