massim.gridsimulations
Class SimulationXMLObserver
java.lang.Object
java.util.Observable
massim.framework.XMLOutputObserver
massim.gridsimulations.SimulationXMLObserver
- All Implemented Interfaces:
- Component, Observer
- Direct Known Subclasses:
- GridSimulationXMLObserver, GridSimulationXMLObserver, GridSimulationXMLObserver, GridSimulationXMLObserver, GridSimulationXMLObserver
public abstract class SimulationXMLObserver
- extends XMLOutputObserver
This XMLObserver provides the simulation statistics and save it into a file.
Field Summary |
protected org.w3c.dom.Document |
doc
|
protected org.w3c.dom.Element |
el_root
|
Method Summary |
protected org.w3c.dom.Element |
createItem(org.w3c.dom.Document doc,
java.lang.String string,
java.lang.Integer k,
java.lang.Integer j)
|
void |
notifySimulationEnd()
|
void |
notifySimulationStart()
|
protected void |
saveInfile(java.lang.String filename)
|
void |
start()
Tell the component to start activity. |
void |
stop()
Tell the component to cease activity. |
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
el_root
protected org.w3c.dom.Element el_root
doc
protected org.w3c.dom.Document doc
SimulationXMLObserver
public SimulationXMLObserver()
- This constructor creates the document.
notifySimulationStart
public void notifySimulationStart()
- Specified by:
notifySimulationStart
in interface Observer
- Overrides:
notifySimulationStart
in class XMLOutputObserver
notifySimulationEnd
public void notifySimulationEnd()
- Specified by:
notifySimulationEnd
in interface Observer
- Overrides:
notifySimulationEnd
in class XMLOutputObserver
saveInfile
protected void saveInfile(java.lang.String filename)
createItem
protected org.w3c.dom.Element createItem(org.w3c.dom.Document doc,
java.lang.String string,
java.lang.Integer k,
java.lang.Integer j)
start
public void start()
- Description copied from interface:
Component
- Tell the component to start activity.
stop
public void stop()
- Description copied from interface:
Component
- Tell the component to cease activity.
Copyright © 2011. All Rights Reserved.