edu.usc.cse.desi.model
Class DESIDataModel

java.lang.Object
  extended byedu.usc.cse.desi.model.AbstractDESIModel
      extended byedu.usc.cse.desi.model.AbstractDataModel
          extended byedu.usc.cse.desi.model.DESIDataModel
All Implemented Interfaces:
java.util.EventListener, IObjectWithProperties, java.beans.PropertyChangeListener, java.io.Serializable

public class DESIDataModel
extends AbstractDataModel

This highest-level class is a starting point that could be used to access every other object in one system. It contains the hosts in a system, and these can be accessed to in turn get the components or links. One instance of this class is one system, more or less.

Author:
Nels Started Feb 15, 2004
See Also:
Serialized Form

Field Summary
private  java.util.List myHosts
           
 
Fields inherited from class edu.usc.cse.desi.model.AbstractDataModel
myPropertyHolder, myPropetyInitializer
 
Fields inherited from class edu.usc.cse.desi.model.AbstractDESIModel
listeners
 
Constructor Summary
DESIDataModel()
           
DESIDataModel(PropertyInitializer initializer)
           
 
Method Summary
 void addHost(HostDataModel host)
          Adds new host and then updates all listeners.
 java.lang.String debugOutput()
          This method will output a string that you can use to see the structure of the view model.
 java.util.List getHosts()
          Returns list of hosts.
 void reinitialize()
          Must call reinitialize on all host data models.
 void removeAllHosts()
          This method will simply remove all the hosts that are in the systen It's the equivalent of calling DESIDataModel.removeHost() for every host.
 void removeHost(HostDataModel host)
          Removes the given host and updates all listeners.
 
Methods inherited from class edu.usc.cse.desi.model.AbstractDataModel
getMyPropertyInitializer, getProperties, getPropertyDisplayName, getPropertyValue, hasProperty, setPropertyValue
 
Methods inherited from class edu.usc.cse.desi.model.AbstractDESIModel
addPropertyChangeListener, firePropertyChange, propertyChange, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myHosts

private java.util.List myHosts
Constructor Detail

DESIDataModel

public DESIDataModel()

DESIDataModel

public DESIDataModel(PropertyInitializer initializer)
Parameters:
initializer -
Method Detail

getHosts

public java.util.List getHosts()
Returns list of hosts.

Returns:
List

reinitialize

public void reinitialize()
Must call reinitialize on all host data models.

Overrides:
reinitialize in class AbstractDESIModel

addHost

public void addHost(HostDataModel host)
Adds new host and then updates all listeners. If this host is already contained, nothing happens.

Parameters:
host - HostDataModel

removeHost

public void removeHost(HostDataModel host)
Removes the given host and updates all listeners.

Parameters:
host - HostDataModel

removeAllHosts

public void removeAllHosts()
This method will simply remove all the hosts that are in the systen It's the equivalent of calling DESIDataModel.removeHost() for every host.


debugOutput

public java.lang.String debugOutput()
This method will output a string that you can use to see the structure of the view model. I overrode this method:

See Also:
Object.toString()