org.apache.maven.repository.metadata
Class MetadataGraph

java.lang.Object
  extended by org.apache.maven.repository.metadata.MetadataGraph

public class MetadataGraph
extends Object

maven dependency metadata graph

Author:
Oleg Gusakov

Field Summary
static int DEFAULT_EDGES
           
static int DEFAULT_VERTICES
           
 
Constructor Summary
MetadataGraph(int nVertices)
          init graph
MetadataGraph(int nVertices, int nEdges)
           
MetadataGraph(MetadataGraphVertex entry)
          construct a single vertex
MetadataGraph(MetadataTreeNode tree)
          construct graph from a "dirty" tree
MetadataGraph(MetadataTreeNode tree, boolean versionedVertices, boolean scopedVertices)
          construct graph from a "dirty" tree
 
Method Summary
 MetadataGraph addEdge(MetadataGraphVertex vFrom, MetadataGraphVertex vTo, MetadataGraphEdge e)
           
 MetadataGraphVertex addVertex(ArtifactMetadata md)
           
 MetadataGraphVertex findVertex(ArtifactMetadata md)
           
 List<MetadataGraphEdge> getEdgesBetween(MetadataGraphVertex vFrom, MetadataGraphVertex vTo)
           
 MetadataGraphVertex getEntry()
           
 List<MetadataGraphEdge> getExcidentEdges(MetadataGraphVertex vertex)
           
 List<MetadataGraphEdge> getIncidentEdges(MetadataGraphVertex vertex)
           
 ArtifactScopeEnum getScope()
           
 TreeSet<MetadataGraphVertex> getVertices()
           
 boolean isEmpty()
           
 boolean isEmptyEdges()
           
 boolean isScopedVertices()
           
 boolean isVersionedVertices()
           
 MetadataGraph removeVertex(MetadataGraphVertex v)
           
 void setEntry(MetadataGraphVertex entry)
           
 void setScope(ArtifactScopeEnum scope)
           
 void setScopedVertices(boolean scopedVertices)
           
 void setVersionedVertices(boolean versionedVertices)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 root
versionedVertices - 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 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 TreeSet<MetadataGraphVertex> getVertices()

getIncidentEdges

public List<MetadataGraphEdge> getIncidentEdges(MetadataGraphVertex vertex)

getExcidentEdges

public 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 String toString()
Overrides:
toString in class Object


Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.