org.ascape.view.nonvis
Class DataView

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

public class DataView
extends NonGraphicView

A non-graphic view providing output of model data to a file. To use, (assuming you are collecting the statistics you are interested in, see Scape) just add this view to any scape, and set a file or data strem for it. Every period, statistic measurements will be written to the file or data strem. By default, all statistics are selected; get data selection to make different selections. DataOutputView provides an implementation of this class that handles multiple files and runs.

Since:
1.2
Version:
1.2 8/4/99
Author:
Miles Parker
See Also:
DataOutputView, Scape, Serialized Form

Field Summary
protected  DataSelection dataSelection
          The selection of data that is be written.
 
Fields inherited from class org.ascape.model.event.DefaultScapeListener
listeningToScape, name, scape
 
Constructor Summary
DataView()
           
 
Method Summary
 DataSelection getDataSelection()
          Returns the data group selection for this data output view.
 void scapeAdded(ScapeEvent scapeEvent)
          Notifies the listener that the scape has added it.
 
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, scapeClosing, scapeDeserialized, scapeInitialized, scapeIterated, scapeNotification, scapeRemoved, scapeSetup, scapeStarted, scapeStopped, setName, setNotifyScapeAutomatically, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dataSelection

protected DataSelection dataSelection
The selection of data that is be written.

Constructor Detail

DataView

public DataView()
Method Detail

getDataSelection

public DataSelection getDataSelection()
Returns the data group selection for this data output view. Selected data series will be exported to the file. By default, all series are selected.

Returns:
the data selection

scapeAdded

public void scapeAdded(ScapeEvent scapeEvent)
                throws java.util.TooManyListenersException
Notifies the listener that the scape has added it. Creates a new data selection for data output, backed by the Scape's data group.

Specified by:
scapeAdded in interface ScapeListener
Overrides:
scapeAdded in class DefaultScapeListener
Parameters:
scapeEvent - the scape added notification event
Throws:
java.util.TooManyListenersException - the too many listeners exception
java.util.TooManyListenersException - on attempt to add this listener to another scape when one has already been assigned


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