org.objectweb.dsrg.sofa.repository
Class DeleteDependencyCalculator.DeletingNode

java.lang.Object
  extended by org.objectweb.dsrg.sofa.repository.DeleteDependencyCalculator.DeletingNode
Enclosing class:
DeleteDependencyCalculator

protected class DeleteDependencyCalculator.DeletingNode
extends java.lang.Object

Class for keeping info about the structure of the repository.


Field Summary
protected  java.util.List<DeleteDependencyCalculator.DeletingNode> children
          Children of the node mean everything that implements this node.
protected  java.util.List<DeleteDependencyCalculator.DeletingNode> containedBy
          List of entities which contain this entity.
protected  java.util.List<DeleteDependencyCalculator.DeletingNode> contains
          Everything that is contained by this node.
protected  VersionedEntity entity
          The data which has the possibility of being deleted.
protected  java.lang.String info
          For debug purposes only...
protected  java.util.List<DeleteDependencyCalculator.DeletingNode> parent
          The parent of the node.
 
Constructor Summary
DeleteDependencyCalculator.DeletingNode(VersionedEntity entity, java.lang.String info)
           
 
Method Summary
protected  void _addEntityDependenciesToList(java.util.List<DeleteDependencyCalculator.DeletingNode> list)
          Helps with the recursion.
 void addEntityDependenciesToList(java.util.List<VersionedEntity> list)
          Main function for getting the dependencies.
 void addToChildren(DeleteDependencyCalculator.DeletingNode newChild)
          Adds newChild to the list of children.
 void addToContainedBy(DeleteDependencyCalculator.DeletingNode newContainedBy)
          Adds newContainedBy to the list of children.
 void addToContains(DeleteDependencyCalculator.DeletingNode newContains)
          Adds newContains to the list of children.
 void addToParents(DeleteDependencyCalculator.DeletingNode parent)
           
protected  void print(DeleteDependencyCalculator.DeletingNode node, int indent)
           
 void print(int indent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected java.util.List<DeleteDependencyCalculator.DeletingNode> parent
The parent of the node. The problem is, that when deleting, this structure is constructed from children to parents but the deleting means deleting all the children.


children

protected java.util.List<DeleteDependencyCalculator.DeletingNode> children
Children of the node mean everything that implements this node.


contains

protected java.util.List<DeleteDependencyCalculator.DeletingNode> contains
Everything that is contained by this node.


containedBy

protected java.util.List<DeleteDependencyCalculator.DeletingNode> containedBy
List of entities which contain this entity.


entity

protected VersionedEntity entity
The data which has the possibility of being deleted.


info

protected java.lang.String info
For debug purposes only...

Constructor Detail

DeleteDependencyCalculator.DeletingNode

public DeleteDependencyCalculator.DeletingNode(VersionedEntity entity,
                                               java.lang.String info)
Method Detail

addToParents

public void addToParents(DeleteDependencyCalculator.DeletingNode parent)

addToChildren

public void addToChildren(DeleteDependencyCalculator.DeletingNode newChild)
Adds newChild to the list of children.

Parameters:
newChild -

addToContains

public void addToContains(DeleteDependencyCalculator.DeletingNode newContains)
Adds newContains to the list of children.

Parameters:
newContains -

addToContainedBy

public void addToContainedBy(DeleteDependencyCalculator.DeletingNode newContainedBy)
Adds newContainedBy to the list of children.

Parameters:
newContainedBy -

_addEntityDependenciesToList

protected void _addEntityDependenciesToList(java.util.List<DeleteDependencyCalculator.DeletingNode> list)
Helps with the recursion.

Parameters:
list -

addEntityDependenciesToList

public void addEntityDependenciesToList(java.util.List<VersionedEntity> list)
Main function for getting the dependencies. Starts in a node and then goes through all its children and contained data and adds them into the list.

Parameters:
list -

print

protected void print(DeleteDependencyCalculator.DeletingNode node,
                     int indent)

print

public void print(int indent)