for (int i = level - 1; i >= 0; i--) { this.localGraphStruct.setLocationContainersAtLevel(i); }
	public void collapse()	{		Object[] nodeList = this.getSuccesors().toArray();		ConnectionSet cs = this.localGraphStruct.getConnectionSet();			this.unhide(); //jgraph.getGraphLayoutCache().setVisible(new Object[]{this}, true);				GEStreamNode firstInPipe = (GEStreamNode) nodeList[0];		GEStreamNode finalInPipe = (GEStreamNode) nodeList[nodeList.length-1];				Iterator initialEdgeIter = localGraphStruct.getGraphModel().edges(firstInPipe.getPort());		Iterator finalEdgeIter = localGraphStruct.getGraphModel().edges(finalInPipe.getPort());				ArrayList edgesToRemove =  new ArrayList();						while (initialEdgeIter.hasNext())		{			DefaultEdge edge = (DefaultEdge) initialEdgeIter.next();							Iterator sourceIter = finalInPipe.getSourceEdges().iterator();			while(sourceIter.hasNext())			{				DefaultEdge target = (DefaultEdge) sourceIter.next();				if(target.equals(edge))				{					System.out.println("source equals edge");					cs.disconnect(edge, true);					cs.connect(edge, this.getPort(), true);					this.addSourceEdge(edge);					edgesToRemove.add(edge);				}			}						Iterator targetIter = firstInPipe.getTargetEdges().iterator();				while(targetIter.hasNext())			{				DefaultEdge source = (DefaultEdge) targetIter.next();				if (source.equals(edge))				{					System.out.println("target equals target");					cs.disconnect(edge,false);					cs.connect(edge, this.getPort(),false);					this.addTargetEdge(edge);					edgesToRemove.add(edge);				}			}		}				while (finalEdgeIter.hasNext())		{			DefaultEdge edge = (DefaultEdge) finalEdgeIter.next();						Iterator sourceIter = finalInPipe.getSourceEdges().iterator();			while(sourceIter.hasNext())			{				DefaultEdge source = (DefaultEdge) sourceIter.next();				if(source.equals(edge))				{					System.out.println("source equals edge");					cs.disconnect(edge, true);					cs.connect(edge, this.getPort(), true);					this.addSourceEdge(edge);					edgesToRemove.add(edge);				}			}						Iterator targetIter = firstInPipe.getTargetEdges().iterator();				while(targetIter.hasNext())			{				DefaultEdge target = (DefaultEdge) targetIter.next();				if (target.equals(edge))				{					System.out.println("target equals target");					cs.disconnect(edge,false);					cs.connect(edge, this.getPort(),false);					this.addTargetEdge(edge);					edgesToRemove.add(edge);				}			}					}						Object[] removeArray = edgesToRemove.toArray();		for(int i = 0; i<removeArray.length;i++)		{			firstInPipe.removeSourceEdge((DefaultEdge)removeArray[i]);			firstInPipe.removeTargetEdge((DefaultEdge)removeArray[i]);			finalInPipe.removeSourceEdge((DefaultEdge)removeArray[i]);			finalInPipe.removeTargetEdge((DefaultEdge)removeArray[i]);		}		GraphConstants.setAutoSize(this.attributes, true);					this.localGraphStruct.getGraphModel().edit(localGraphStruct.getAttributes(), cs, null, null);			System.out.println("THE NODELIST " +nodeList.toString() + " in Pipeline " + this.name);		this.localGraphStruct.getJGraph().getGraphLayoutCache().setVisible(nodeList, false);				for (int i = level - 1; i >= 0; i--)		{			this.localGraphStruct.containerNodes.hideContainersAtLevel(i);		}					//JGraphLayoutManager manager = new JGraphLayoutManager(this.localGraphStruct.getJGraph());		JGraphLayoutManager manager = new JGraphLayoutManager(this.localGraphStruct);		manager.arrange();					for (int i = level - 1; i >= 0; i--)		{			this.localGraphStruct.setLocationContainersAtLevel(i);		}		}