public void saveGraphData(String out,boolean useLayout,ArrayList<Node>nodes, ArrayList<ArrayList<Edge>> edges,ArrayList<String> timeLabels){
    	this.output = parent.createWriter(out+".txt");		 
    	
    	//Save the time line labels     
        this.output.println("timeline");
        int numTimeSlices = timeLabels.size();
        for (int i=0;i<numTimeSlices;i++){        	
        	this.output.print(timeLabels.get(i)+" ");
        }
        this.output.println();
    	//Save the node info
    	for (int i=0;i<nodes.size();i++){	
    		if (useLayout){
    			 this.output.println("node "+i+" "+this.layout.getX(i)+" "+this.layout.getY(i)+" "+nodes.get(i).label);
    		}else{
    			 this.output.println("node "+i+" "+nodes.get(i).x+" "+nodes.get(i).y+" "+nodes.get(i).label);
    		}
    		
    		 for (int j=0;j<this.numTimeSlices;j++){
    			  this.output.println(nodes.get(i).persistence.get(j));
    		 }
    	 }
    	
    	//Save the edge info
    	 Edge currentEdge;   	 
        for (int i=0;i<numTimeSlices;i++){				
    			//System.out.println("time "+i); //Debugging
    			this.output.println("time "+i);
    			for (int j=0;j<edges.get(i).size();j++){
    				currentEdge = edges.get(i).get(j);						
    				this.output.println(currentEdge.node1+" "+currentEdge.node2);
    			}
        }    
        
    	 this.output.flush();
    	 this.output.close();
    }