com.metaeffekt.artifact.analysis.spdxbom.hierarchy.HierarchyGraphEdge Maven / Gradle / Ivy
package com.metaeffekt.artifact.analysis.spdxbom.hierarchy;
import lombok.Getter;
import lombok.Setter;
import org.spdx.library.model.enumerations.RelationshipType;
/**
* This class serves as an edge of the HierarchyGraph class and tracks the relationship
* of two nodes.
*/
@Getter
@Setter
public class HierarchyGraphEdge {
private HierarchyGraphNode fromNode;
private HierarchyGraphNode toNode;
private RelationshipType relationshipType;
public HierarchyGraphEdge(HierarchyGraphNode fromNode,
HierarchyGraphNode toNode,
RelationshipType relationshipType){
this.fromNode = fromNode;
this.toNode = toNode;
this.relationshipType = relationshipType;
}
@Override
public String toString() {
return "Relationship: " + fromNode.getId() + " - " + relationshipType.toString() + " - " + toNode.getId();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy