public Node addNode(Role role) {
   Node2 n2 = nodes.getNode2(role);
   if (null == n2) {
     n2 = new Node2(role, this);
     nodes.addNode2(n2);
   }
   boolean f = false;
   for (int i = 0; i < headNum; i++) {
     if (head[i].getFirst().equals(n2)) f = true;
   }
   if (false == f) addHead(n2);
   return n2;
 }
 public Node addNode(ComplexRole cr) {
   Node3 n3 = nodes.getNode3(cr);
   if (null == n3) {
     n3 = new Node3(cr, this);
     nodes.addNode3(n3);
   }
   boolean f = false;
   for (int i = 0; i < headNum; i++) {
     if (head[i].getFirst().equals(n3)) f = true;
   }
   if (false == f) addHead(n3);
   return n3;
 }
 public Node addNode(TMSPrincipal principal) {
   // TODO Auto-generated method stub
   Node1 n1 = nodes.getNode1(principal);
   if (null == n1) {
     n1 = new Node1(principal, this);
     nodes.addNode1(n1);
   }
   boolean f = false;
   for (int i = 0; i < headNum; i++) {
     if (head[i].getFirst().equals(n1)) f = true;
   }
   if (false == f) addHead(n1);
   return n1;
 }