org.gcube.vremanagement.softwarerepository.repository.artifact
Class ArtifactTreeNode

java.lang.Object
  extended by org.gcube.vremanagement.softwarerepository.repository.artifact.ArtifactTreeNode

public class ArtifactTreeNode
extends java.lang.Object

Author:
Luca Frosini (ISTI-CNR)

Constructor Summary
ArtifactTreeNode(ArtifactTreeNode parent, ArtifactCoordinates item, int deep)
          Constructor
 
Method Summary
 void addSon(ArtifactTreeNode son)
          Add a son to this node
 int getDeep()
           
 ArtifactCoordinates getItem()
          Get the Artifact
 ArtifactTreeNode getParent()
           
 void listDependency(java.util.List<java.lang.String> dep)
           
 java.lang.String printTree()
           
 void removeSon(ArtifactTreeNode son)
          Remove a son from this node
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArtifactTreeNode

public ArtifactTreeNode(ArtifactTreeNode parent,
                        ArtifactCoordinates item,
                        int deep)
                 throws java.lang.Exception
Constructor

Parameters:
parent - parent node
item - value
deep - deep
Throws:
java.lang.Exception - if fails
Method Detail

addSon

public void addSon(ArtifactTreeNode son)
            throws java.lang.Exception
Add a son to this node

Parameters:
son - to add
Throws:
java.lang.Exception - if fails

removeSon

public void removeSon(ArtifactTreeNode son)
               throws java.lang.Exception
Remove a son from this node

Parameters:
son - to remove
Throws:
java.lang.Exception - if fails

getItem

public ArtifactCoordinates getItem()
Get the Artifact

Returns:
the Artifact

getDeep

public int getDeep()
Returns:
deep

getParent

public ArtifactTreeNode getParent()
Returns:
parent TreeNode;

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

printTree

public java.lang.String printTree()
Returns:
XML tree representation

listDependency

public void listDependency(java.util.List<java.lang.String> dep)
                    throws java.lang.Exception
Parameters:
dep - dependency List fileld with dependecy information
Throws:
java.lang.Exception - if fails