public class DependencyGraph extends AbstractGraph<DependencyNode,DependencyRelation> implements Annotation
Constructor and Description |
---|
DependencyGraph(AnnotationBase annBase)
Public constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addToBase()
Adds this annotation to an associated annotation base.
|
java.util.Set<DependencyNode> |
getAdjacentVertices(DependencyNode depNode)
Returns vertices adjacent to the given vertex.
|
AnnotationBase |
getAnnotationBase()
Returns the annotation base which this annotation belongs to.
|
java.util.List<DependencyNode> |
getDependencyPath(DependencyNode src,
DependencyNode dest)
Returns the shortest path from the given source node to the given destination node, using
Dijkstra's algorithm.
|
java.lang.String |
getDependencyPathString(DependencyNode src,
DependencyNode dest)
Returns a string representing the shortest path from the given source node to the given
destination node, using Dijkstra's algorithm.
|
java.lang.String |
getDependencyPathString(DependencyNode src,
java.lang.String srcStr,
DependencyNode dest,
java.lang.String destStr)
Returns a string representing the shortest path from the given source node to the given
destination node, using Dijkstra's algorithm.
|
java.util.List<DependencyRelation> |
getDependencyRelationPath(DependencyNode src,
DependencyNode dest)
Returns the shortest path from the given source node to the given destination node, using
Dijkstra's algorithm.
|
java.util.Set<DependencyRelation> |
getEdges(DependencyNode depNode)
Returns a collection of edges that the given vertex has.
|
DependencyNode |
getRoot() |
java.lang.String |
getTypeName()
Returns the type name of this annotation.
|
void |
removeFromBase()
Removes this annotation from an associated annotation base.
|
void |
setRoot(DependencyNode root) |
addEdge, addVertex, getEdges, getVertices, numEdges, numVertices
public DependencyGraph(AnnotationBase annBase)
annBase
- public java.util.List<DependencyNode> getDependencyPath(DependencyNode src, DependencyNode dest)
src
- dest
- public java.util.List<DependencyRelation> getDependencyRelationPath(DependencyNode src, DependencyNode dest)
src
- dest
- public java.lang.String getDependencyPathString(DependencyNode src, DependencyNode dest)
src
- dest
- public java.lang.String getDependencyPathString(DependencyNode src, java.lang.String srcStr, DependencyNode dest, java.lang.String destStr)
src
- srcStr
- dest
- destStr
- public java.lang.String getTypeName()
Annotation
getTypeName
in interface Annotation
public AnnotationBase getAnnotationBase()
Annotation
getAnnotationBase
in interface Annotation
public void addToBase()
Annotation
addToBase
in interface Annotation
public void removeFromBase()
Annotation
removeFromBase
in interface Annotation
public java.util.Set<DependencyNode> getAdjacentVertices(DependencyNode depNode)
AbstractGraph
getAdjacentVertices
in interface Graph<DependencyNode,DependencyRelation>
getAdjacentVertices
in class AbstractGraph<DependencyNode,DependencyRelation>
public java.util.Set<DependencyRelation> getEdges(DependencyNode depNode)
AbstractGraph
getEdges
in interface Graph<DependencyNode,DependencyRelation>
getEdges
in class AbstractGraph<DependencyNode,DependencyRelation>
public DependencyNode getRoot()
public void setRoot(DependencyNode root)