uchicago.src.sim.analysis
Class ChartArchiver

java.lang.Object
  extended by uchicago.src.sim.analysis.ChartArchiver

public class ChartArchiver
extends java.lang.Object

Saves and loads custom charts via their XML descriptions. The data required to create such charts is persisted between application instances via an xml file. The file is stored in $HOME/fully_qualified_model_name_as _dir/charts.xml. So, for example, if the home directory is /home/nick and the fully qualified model name is uchicago.src.sim.heatBugs, then the file path is
/home/nick/.repast/uchicago/src/sim/heatBugs/charts.xml.
The xml itself is human readable, but is liable to change. An example follows:



 
 
 
 

 
 


 

Version:
$Revision: 1.8 $ $Date: 2004/11/03 19:51:00 $

Constructor Summary
ChartArchiver()
           
 
Method Summary
static java.util.ArrayList loadCharts(SimModel model)
          Creates chart models from their XML descriptions and returns these models in an ArrayList.
static void saveCharts(java.lang.String fqModelName, java.util.ArrayList charts)
          Saves the list of AbstractChartModels.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartArchiver

public ChartArchiver()
Method Detail

loadCharts

public static java.util.ArrayList loadCharts(SimModel model)
Creates chart models from their XML descriptions and returns these models in an ArrayList.

Parameters:
model - the SimModel associated with the chart models
Returns:
a list of AbstractChartModel-s

saveCharts

public static void saveCharts(java.lang.String fqModelName,
                              java.util.ArrayList charts)
Saves the list of AbstractChartModels. The data required to create such charts is persisted between application instances via an xml file. The file is stored in $HOME/fully_qualified_model_name_as _dir/charts.xml. So, for example, if the home directory is /home/nick and the fully qualified model name is uchicago.src.sim.heatBugs, then the file path is
/home/nick/.repast/uchicago/src/sim/heatBugs/charts.xml.
The xml itself is human readable, but is liable to change. An example follows:


 
 
 
 
 

 
 
 

Parameters:
fqModelName - the fully qualified name of the model associated with the AbstractChartModels
charts - the list of AbstractChartModels to save