org.ascape.ant
Class AllOutputView

java.lang.Object
  extended by org.ascape.model.event.DefaultScapeListener
      extended by org.ascape.view.nonvis.NonGraphicView
          extended by org.ascape.view.nonvis.DataView
              extended by org.ascape.view.nonvis.DataOutputView
                  extended by org.ascape.ant.AllOutputView
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.EventListener, ScapeListener, HasName
Direct Known Subclasses:
AllOutputViewElement

public class AllOutputView
extends DataOutputView

Very similar to DataOutputView, this view outputs all model and member-agent scape data. The other differnce is that data here is written to an XML file. Note: If the RunDataSet is being used, it must be added in the Ant file before the AllOutputView.

See Also:
Serialized Form

Field Summary
protected  org.jdom.Element rootElement
          The root element.
 
Fields inherited from class org.ascape.view.nonvis.DataOutputView
EOLString, periodHeadersWritten, runCount, runDataStream, runFile, runHeadersWritten, startTime, writeHeaders
 
Fields inherited from class org.ascape.view.nonvis.DataView
dataSelection
 
Fields inherited from class org.ascape.model.event.DefaultScapeListener
listeningToScape, name, scape
 
Constructor Summary
AllOutputView()
           
 
Method Summary
 void addOutputData(OutputDataElement element)
          Adds the output data.
 void scapeStarted(ScapeEvent scapeEvent)
          On scape start, record the start time and wirte the file headers.
 void scapeStopped(ScapeEvent scapeEvent)
          On scape stop, writes the run parameters to the file.
 void writePeriodData()
          For now, not writing Period data.
 void writePeriodHeader()
          For now, not writing Period data.
 void writeRunData()
          Writes the current run parameters to the data stream or file.
 void writeRunHeader()
          Writes the headers for the run parameters to the run data stream or file.
 
Methods inherited from class org.ascape.view.nonvis.DataOutputView
getEOLSeparator, getNumCharsInFileName, getPeriodDataStream, getPeriodFile, getRunDataStream, getRunFile, scapeAdded, scapeChanged, scapeClosing, scapeDeserialized, scapeIterated, setEOLSeparator, setNumCharsInFileName, setPeriodDataStream, setPeriodFile, setRunDataStream, setRunFile, stopCondition, toString
 
Methods inherited from class org.ascape.view.nonvis.DataView
getDataSelection
 
Methods inherited from class org.ascape.view.nonvis.NonGraphicView
isGraphic
 
Methods inherited from class org.ascape.model.event.DefaultScapeListener
clone, environmentQuiting, getName, getScape, isLifeOfScape, isNotifyScapeAutomatically, notifyScapeUpdated, scapeInitialized, scapeNotification, scapeRemoved, scapeSetup, setName, setNotifyScapeAutomatically
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rootElement

protected org.jdom.Element rootElement
The root element.

Constructor Detail

AllOutputView

public AllOutputView()
Method Detail

scapeStarted

public void scapeStarted(ScapeEvent scapeEvent)
On scape start, record the start time and wirte the file headers. If any headers need to be written, they are written now. Write first period data.

Specified by:
scapeStarted in interface ScapeListener
Overrides:
scapeStarted in class DataOutputView
Parameters:
scapeEvent - the scape event

writeRunHeader

public void writeRunHeader()
                    throws java.io.IOException
Writes the headers for the run parameters to the run data stream or file. Data is output as tab delimited ASCII text, with the selected "EOLSeparator" separating each period.

Overrides:
writeRunHeader in class DataOutputView
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

writeRunData

public void writeRunData()
                  throws java.io.IOException
Writes the current run parameters to the data stream or file. Data is output as tab delimited ASCII text, with the selected "EOLSeparator" separating each period.

Overrides:
writeRunData in class DataOutputView
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

scapeStopped

public void scapeStopped(ScapeEvent scapeEvent)
On scape stop, writes the run parameters to the file.

Specified by:
scapeStopped in interface ScapeListener
Overrides:
scapeStopped in class DataOutputView
Parameters:
scapeEvent - the scape event
See Also:
DataOutputView.scapeStarted(org.ascape.model.event.ScapeEvent), DataOutputView.scapeStopped(org.ascape.model.event.ScapeEvent)

writePeriodHeader

public void writePeriodHeader()
                       throws java.io.IOException
For now, not writing Period data.

Overrides:
writePeriodHeader in class DataOutputView
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

writePeriodData

public void writePeriodData()
                     throws java.io.IOException
For now, not writing Period data.

Overrides:
writePeriodData in class DataOutputView
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

addOutputData

public void addOutputData(OutputDataElement element)
Adds the output data.

Parameters:
element - the element


Copyright © 1998-2008 The Brookings Institution, NuTech Solutions, Metascape, LLC All Rights Reserved.