Class MetadataGraph
java.lang.Object
org.apache.maven.repository.metadata.MetadataGraph
maven dependency metadata graph
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
(package private) MetadataGraphVertex
the entry point we started building the graph from(package private) Map<MetadataGraphVertex,
List<MetadataGraphEdge>> (package private) Map<MetadataGraphVertex,
List<MetadataGraphEdge>> incident and excident edges per node(package private) ArtifactScopeEnum
null in dirty graph, actual scope for conflict-resolved graphprivate boolean
private boolean
(package private) TreeSet<MetadataGraphVertex>
-
Constructor Summary
ConstructorsConstructorDescriptionMetadataGraph
(int nVertices) init graphMetadataGraph
(int nVertices, int nEdges) MetadataGraph
(MetadataGraphVertex entry) construct a single vertexconstruct graph from a "dirty" treeMetadataGraph
(MetadataTreeNode tree, boolean versionedVertices, boolean scopedVertices) construct graph from a "dirty" tree -
Method Summary
Modifier and TypeMethodDescriptionaddEdge
(MetadataGraphVertex vFrom, MetadataGraphVertex vTo, MetadataGraphEdge e) private static void
private void
private void
checkEdges
(int nEdges) private static void
private void
private void
checkVertices
(int nVertices) private static int
countNodes
(MetadataTreeNode tree) getEdgesBetween
(MetadataGraphVertex vFrom, MetadataGraphVertex vTo) getEntry()
getExcidentEdges
(MetadataGraphVertex vertex) getIncidentEdges
(MetadataGraphVertex vertex) getScope()
private void
init
(int nVertices, int nEdges) init graphboolean
isEmpty()
boolean
boolean
boolean
private void
processTreeNodes
(MetadataGraphVertex parentVertex, MetadataTreeNode node, int depth, int pomOrder) void
setEntry
(MetadataGraphVertex entry) void
setScope
(ArtifactScopeEnum scope) void
setScopedVertices
(boolean scopedVertices) void
setVersionedVertices
(boolean versionedVertices) toString()
-
Field Details
-
DEFAULT_VERTICES
public static final int DEFAULT_VERTICES- See Also:
-
DEFAULT_EDGES
public static final int DEFAULT_EDGES- See Also:
-
versionedVertices
private boolean versionedVertices -
scopedVertices
private boolean scopedVertices -
entry
MetadataGraphVertex entrythe entry point we started building the graph from -
vertices
TreeSet<MetadataGraphVertex> vertices -
incidentEdges
Map<MetadataGraphVertex,List<MetadataGraphEdge>> incidentEdgesincident and excident edges per node -
excidentEdges
Map<MetadataGraphVertex,List<MetadataGraphEdge>> excidentEdges -
scope
ArtifactScopeEnum scopenull in dirty graph, actual scope for conflict-resolved graph
-
-
Constructor Details
-
MetadataGraph
public MetadataGraph(int nVertices) init graph -
MetadataGraph
public MetadataGraph(int nVertices, int nEdges) -
MetadataGraph
construct a single vertex- Throws:
MetadataResolutionException
-
MetadataGraph
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 Details
-
processTreeNodes
private void processTreeNodes(MetadataGraphVertex parentVertex, MetadataTreeNode node, int depth, int pomOrder) throws MetadataResolutionException - Throws:
MetadataResolutionException
-
findVertex
-
addVertex
-
init
private void init(int nVertices, int nEdges) init graph -
checkVertices
private void checkVertices() -
checkVertices
private void checkVertices(int nVertices) -
checkEdges
private void checkEdges() -
checkEdges
private void checkEdges(int nEdges) -
checkVertex
- Throws:
MetadataResolutionException
-
checkEdge
- Throws:
MetadataResolutionException
-
getEdgesBetween
-
addEdge
public MetadataGraph addEdge(MetadataGraphVertex vFrom, MetadataGraphVertex vTo, MetadataGraphEdge e) throws MetadataResolutionException - Throws:
MetadataResolutionException
-
removeVertex
-
countNodes
-
getEntry
-
setEntry
-
getVertices
-
getIncidentEdges
-
getExcidentEdges
-
isVersionedVertices
public boolean isVersionedVertices() -
setVersionedVertices
public void setVersionedVertices(boolean versionedVertices) -
isScopedVertices
public boolean isScopedVertices() -
setScopedVertices
public void setScopedVertices(boolean scopedVertices) -
getScope
-
setScope
-
isEmpty
public boolean isEmpty() -
isEmptyEdges
public boolean isEmptyEdges() -
toString
-