Class MetadataGraph
- java.lang.Object
-
- org.apache.maven.repository.metadata.MetadataGraph
-
public class MetadataGraph extends java.lang.Object
maven dependency metadata graph- Author:
- Oleg Gusakov
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_EDGES
static int
DEFAULT_VERTICES
-
Constructor Summary
Constructors Constructor Description MetadataGraph(int nVertices)
init graphMetadataGraph(int nVertices, int nEdges)
MetadataGraph(MetadataGraphVertex entry)
construct a single vertexMetadataGraph(MetadataTreeNode tree)
construct graph from a "dirty" treeMetadataGraph(MetadataTreeNode tree, boolean versionedVertices, boolean scopedVertices)
construct graph from a "dirty" tree
-
Method Summary
-
-
-
Field Detail
-
DEFAULT_VERTICES
public static final int DEFAULT_VERTICES
- See Also:
- Constant Field Values
-
DEFAULT_EDGES
public static final int DEFAULT_EDGES
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MetadataGraph
public MetadataGraph(int nVertices)
init graph
-
MetadataGraph
public MetadataGraph(int nVertices, int nEdges)
-
MetadataGraph
public MetadataGraph(MetadataGraphVertex entry) throws MetadataResolutionException
construct a single vertex- Throws:
MetadataResolutionException
-
MetadataGraph
public MetadataGraph(MetadataTreeNode tree) throws MetadataResolutionException
construct graph from a "dirty" tree- Throws:
MetadataResolutionException
-
MetadataGraph
public MetadataGraph(MetadataTreeNode tree, boolean versionedVertices, boolean scopedVertices) throws MetadataResolutionException
construct graph from a "dirty" tree- Parameters:
tree
- "dirty" tree rootversionedVertices
- true if graph nodes should be versioned (different versions -> different nodes)scopedVertices
- true if graph nodes should be versioned and scoped (different versions and/or scopes -> different nodes)- Throws:
MetadataResolutionException
-
-
Method Detail
-
findVertex
public MetadataGraphVertex findVertex(ArtifactMetadata md)
-
addVertex
public MetadataGraphVertex addVertex(ArtifactMetadata md)
-
getEdgesBetween
public java.util.List<MetadataGraphEdge> getEdgesBetween(MetadataGraphVertex vFrom, MetadataGraphVertex vTo)
-
addEdge
public MetadataGraph addEdge(MetadataGraphVertex vFrom, MetadataGraphVertex vTo, MetadataGraphEdge e) throws MetadataResolutionException
- Throws:
MetadataResolutionException
-
removeVertex
public MetadataGraph removeVertex(MetadataGraphVertex v)
-
getEntry
public MetadataGraphVertex getEntry()
-
setEntry
public void setEntry(MetadataGraphVertex entry)
-
getVertices
public java.util.TreeSet<MetadataGraphVertex> getVertices()
-
getIncidentEdges
public java.util.List<MetadataGraphEdge> getIncidentEdges(MetadataGraphVertex vertex)
-
getExcidentEdges
public java.util.List<MetadataGraphEdge> getExcidentEdges(MetadataGraphVertex vertex)
-
isVersionedVertices
public boolean isVersionedVertices()
-
setVersionedVertices
public void setVersionedVertices(boolean versionedVertices)
-
isScopedVertices
public boolean isScopedVertices()
-
setScopedVertices
public void setScopedVertices(boolean scopedVertices)
-
getScope
public ArtifactScopeEnum getScope()
-
setScope
public void setScope(ArtifactScopeEnum scope)
-
isEmpty
public boolean isEmpty()
-
isEmptyEdges
public boolean isEmptyEdges()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-