public class MetadataGraph
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_EDGES |
static int |
DEFAULT_VERTICES |
| Constructor and Description |
|---|
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
|
public static final int DEFAULT_VERTICES
public static final int DEFAULT_EDGES
public MetadataGraph(int nVertices)
public MetadataGraph(int nVertices,
int nEdges)
public MetadataGraph(MetadataGraphVertex entry) throws MetadataResolutionException
MetadataResolutionExceptionpublic MetadataGraph(MetadataTreeNode tree) throws MetadataResolutionException
MetadataResolutionExceptionpublic MetadataGraph(MetadataTreeNode tree, boolean versionedVertices, boolean scopedVertices) throws MetadataResolutionException
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)MetadataResolutionExceptionpublic MetadataGraphVertex findVertex(ArtifactMetadata md)
public MetadataGraphVertex addVertex(ArtifactMetadata md)
public java.util.List<MetadataGraphEdge> getEdgesBetween(MetadataGraphVertex vFrom, MetadataGraphVertex vTo)
public MetadataGraph addEdge(MetadataGraphVertex vFrom, MetadataGraphVertex vTo, MetadataGraphEdge e) throws MetadataResolutionException
MetadataResolutionExceptionpublic MetadataGraph removeVertex(MetadataGraphVertex v)
public MetadataGraphVertex getEntry()
public void setEntry(MetadataGraphVertex entry)
public java.util.TreeSet<MetadataGraphVertex> getVertices()
public java.util.List<MetadataGraphEdge> getIncidentEdges(MetadataGraphVertex vertex)
public java.util.List<MetadataGraphEdge> getExcidentEdges(MetadataGraphVertex vertex)
public boolean isVersionedVertices()
public void setVersionedVertices(boolean versionedVertices)
public boolean isScopedVertices()
public void setScopedVertices(boolean scopedVertices)
public ArtifactScopeEnum getScope()
public void setScope(ArtifactScopeEnum scope)
public boolean isEmpty()
public boolean isEmptyEdges()
public java.lang.String toString()
toString in class java.lang.Object