public class MetadataTreeNode extends Object
Constructor and Description |
---|
MetadataTreeNode() |
MetadataTreeNode(ArtifactMetadata md,
MetadataTreeNode parent,
ArtifactMetadata query)
pointers to parent and query are a must.
|
Modifier and Type | Method and Description |
---|---|
MetadataTreeNode |
addChild(MetadataTreeNode kid)
dependencies are ordered in the POM - they should be added in the POM order
|
MetadataTreeNode |
addQuery(ArtifactMetadata query)
dependencies are ordered in the POM - they should be added in the POM order
|
int |
countDistinctNodes() |
int |
countNodes() |
static int |
countNodes(MetadataTreeNode node) |
void |
createNames(int level,
int seq) |
static MetadataTreeNode |
deepCopy(MetadataTreeNode node) |
List<MetadataTreeNode> |
getChildren() |
int |
getDepth() |
static void |
getDistinctNodes(MetadataTreeNode node,
TreeSet<String> nodes) |
int |
getId() |
int |
getMaxDepth(int depth) |
ArtifactMetadata |
getMd() |
String |
getName() |
MetadataTreeNode |
getParent() |
List<ArtifactMetadata> |
getQueries() |
ArtifactMetadata |
getQuery() |
boolean |
hasChildren() |
boolean |
isOptional() |
boolean |
isReal() |
static void |
reNumber(MetadataTreeNode node,
int startNum) |
void |
setId(int id) |
void |
setParent(MetadataTreeNode parent) |
void |
setReal(boolean real) |
static void |
showNode(MetadataTreeNode n,
int level)
helper method to print the tree into sysout
|
static void |
showNode(MetadataTreeNode n,
int level,
Writer wr)
helper method to print the tree into a Writer
|
String |
toString() |
public MetadataTreeNode()
public MetadataTreeNode(ArtifactMetadata md, MetadataTreeNode parent, ArtifactMetadata query)
public int countNodes()
public static int countNodes(MetadataTreeNode node)
public int countDistinctNodes()
public static void getDistinctNodes(MetadataTreeNode node, TreeSet<String> nodes)
public MetadataTreeNode addChild(MetadataTreeNode kid)
public MetadataTreeNode addQuery(ArtifactMetadata query)
public boolean hasChildren()
public ArtifactMetadata getMd()
public MetadataTreeNode getParent()
public int getDepth()
public int getMaxDepth(int depth)
public void setParent(MetadataTreeNode parent)
public List<MetadataTreeNode> getChildren()
public boolean isOptional()
public boolean isReal()
public void setReal(boolean real)
public ArtifactMetadata getQuery()
public List<ArtifactMetadata> getQueries()
public static final MetadataTreeNode deepCopy(MetadataTreeNode node)
public static final void showNode(MetadataTreeNode n, int level, Writer wr) throws IOException
IOException
public static final void showNode(MetadataTreeNode n, int level) throws IOException
IOException
public int getId()
public void setId(int id)
public static void reNumber(MetadataTreeNode node, int startNum)
public String getName()
public void createNames(int level, int seq)
Copyright © 2002–2014 The Apache Software Foundation. All rights reserved.