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> 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.util.List<DeleteDependencyCalculator.DeletingNode> children
          Children of the node mean everything that implements this node.
protected  java.lang.String info
          For debug purposes only...
protected  java.util.List<DeleteDependencyCalculator.DeletingNode> parents
          The parents of the node.
 
Constructor Summary
DeleteDependencyCalculator.DeletingNode(org.eclipse.emf.ecore.EObject entity, java.lang.String info)
          The only constructor of the DeletingNode class.
 
Method Summary
protected  void _addEntityDelParentsToList(java.util.List<DeleteDependencyCalculator.DeletingNode> list)
          Helps with the recursion.
protected  void _addEntityDependenciesToList(java.util.List<DeleteDependencyCalculator.DeletingNode> list)
          Helps with the recursion.
 void addEntityDelParentsToSet(java.util.Set<VersionedEntity> list)
          Main function for getting the deletion parents.
 void addEntityDependenciesToSet(java.util.Set<VersionedEntity> list)
          Main function for getting the dependencies.
 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 addToChildren(DeleteDependencyCalculator.DeletingNode newChild)
          Adds newChild to the list of children.
 void addToParents(DeleteDependencyCalculator.DeletingNode parent)
           
protected  void print(DeleteDependencyCalculator.DeletingNode node, int indent)
          Prints the given node to the console at the given indentation.
 void print(int indent)
          Prints the node to the console at the given indentation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parents

protected java.util.List<DeleteDependencyCalculator.DeletingNode> parents
The parents 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(org.eclipse.emf.ecore.EObject entity,
                                               java.lang.String info)
The only constructor of the DeletingNode class.

Parameters:
entity - The entity to be stored and represented by the node.
info - Text info about the entity and node, just for user purposes.
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 -

addEntityDependenciesToSet

public void addEntityDependenciesToSet(java.util.Set<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 -

_addEntityDelParentsToList

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

Parameters:
list -

addEntityDelParentsToSet

public void addEntityDelParentsToSet(java.util.Set<VersionedEntity> list)
Main function for getting the deletion parents. 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)
Prints the given node to the console at the given indentation.


print

public void print(int indent)
Prints the node to the console at the given indentation.