protected void postProcess(NodeContainer nodeContainer) {
   List nodes = nodeContainer.getNodes();
   for (int i = 0; i < nodes.size(); i++) {
     Node node = (Node) nodes.get(i);
     List edges = node.getLeavingEdges();
     for (int j = 0; j < edges.size(); j++) {
       Edge edge = (Edge) edges.get(j);
       SemanticElement destination = findDestination(edge, node);
       Node target = (Node) edge.getFactory().getRegisteredNotationElementFor(destination);
       if (target != null && edge.getTarget() == null) {
         target.addArrivingEdge(edge);
       }
     }
     if (node instanceof NodeContainer) {
       postProcess((NodeContainer) node);
     }
   }
 }
 private void write(String indent, Edge edge, Element element) {
   boolean childAdded = false;
   Point offset = edge.getLabel().getOffset();
   if (offset != null) {
     childAdded = true;
     addText(indent + "  ", element);
     Element label = addElement(element, "label");
     addAttribute(label, "x", String.valueOf(offset.x));
     addAttribute(label, "y", String.valueOf(offset.y));
   }
   Iterator bendpoints = edge.getBendPoints().iterator();
   while (bendpoints.hasNext()) {
     childAdded = true;
     addText(indent + "  ", element);
     Element bendPoint = addElement(element, "bendpoint");
     write(indent + "  ", (BendPoint) bendpoints.next(), bendPoint);
   }
   if (childAdded) {
     addText(indent, element);
   }
 }
 private void processLabel(Edge edge, Element edgeInfo) {
   Element label = null;
   if (edgeInfo != null) {
     label = getLabelElement(edgeInfo);
   }
   if (label != null) {
     Point offset = new Point();
     offset.x = Integer.valueOf(getAttribute(label, "x")).intValue();
     offset.y = Integer.valueOf(getAttribute(label, "y")).intValue();
     edge.getLabel().setOffset(offset);
   }
 }
 protected BendPoint addBendpoint(Edge edge, Element bendpointInfo, int index) {
   BendPoint result = new BendPoint();
   processBendpoint(result, bendpointInfo);
   edge.addBendPoint(result);
   return result;
 }