edu.iu.iv.core
Class IVC

java.lang.Object
  |
  +--edu.iu.iv.core.IVC
Direct Known Subclasses:
BasicIVC

public abstract class IVC
extends java.lang.Object

A singleton central IVC system. This houses most of the registries, the GUI, and other important functions that will be used by new plugins, the GUI, and any other new classes added that need the data the IVC class provides.

Author:
Team IVC

Method Summary
abstract  void addAddModelListener(AddModelListener listener)
          Adds an add model listener to the IVC.
abstract  void addModel(java.lang.Object model)
          Adds a model to the system.
abstract  ConfigFile getConfigFile()
          get the config file for the system.
abstract  java.io.File getErrorLogFile()
          Gets the file object representing the current log file.
abstract  java.util.logging.Logger getErrorLogger()
          Gets the logger associated with the IVC so that messages can be logged.
static IVC getInstance()
          Gets the singleton instance of the IVC system.
abstract  IVCLogManager getIVCLogManager()
           
abstract  IVCUserInterface getIVCUserInterface()
          Gets the IVC User Interface for the system.
abstract  PersistenceRegistry getPersistenceRegistry()
          Gets the persistence registry.
abstract  java.io.File getPluginPath()
          Gets the path to the plugin directory so plugins may access files in there if needed.
abstract  PluginRegistry getPluginRegistry()
          Gets the plugin registry.
abstract  Scheduler getScheduler()
          Gets the scheduler currently in use by the system.
abstract  void removeAddModelListener(AddModelListener listener)
          Removes an add model listener from the list of those that will be notified when a model is added to the IVC.
abstract  void setConfigFile(ConfigFile configFile)
          Set the associated config file for the IVC system.
abstract  void setErrorLogFile(java.io.File logFilePath, boolean append)
          Sets the path to the log file.
abstract  void setPluginPath(java.io.File path)
          Sets the path to the plugin directory so that plugins may access files in the directory if they have some located there.
abstract  void setScheduler(Scheduler scheduler)
          Sets the scheduler to be used by the system.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static IVC getInstance()
Gets the singleton instance of the IVC system.

Returns:
the IVC system.

getPluginRegistry

public abstract PluginRegistry getPluginRegistry()
Gets the plugin registry. This is the global registry where all plugins will be housed for the system.

Returns:
the plugin registry

getPersistenceRegistry

public abstract PersistenceRegistry getPersistenceRegistry()
Gets the persistence registry. This is the global registry where all persisters will be housed for the system.

Returns:
the persistence registry

getIVCUserInterface

public abstract IVCUserInterface getIVCUserInterface()
Gets the IVC User Interface for the system. This is the gui that is currently in use by IVC.

Returns:
the IVC GUI.

addModel

public abstract void addModel(java.lang.Object model)
                       throws UnsupportedModelException
Adds a model to the system. This will usually result in a new model being available through the GUI.

Parameters:
model - the model to add. This can be any object that is supported by the plugins.
Throws:
UnsupportedModelException - if there is no plugin that can handle the model added, then an exception will be thrown.

addAddModelListener

public abstract void addAddModelListener(AddModelListener listener)
Adds an add model listener to the IVC. Every time a model is added to the system, all listeners will be notified.

Parameters:
listener - a listener for models being added to the system.

removeAddModelListener

public abstract void removeAddModelListener(AddModelListener listener)
Removes an add model listener from the list of those that will be notified when a model is added to the IVC.

Parameters:
listener - the listener to remove

getScheduler

public abstract Scheduler getScheduler()
Gets the scheduler currently in use by the system. The scheduler will allow for algorithms to be scheduled however the current scheduler does its scheduling.

Returns:
the scheduler

setScheduler

public abstract void setScheduler(Scheduler scheduler)
Sets the scheduler to be used by the system.

Parameters:
scheduler - the scheduler to be used.

setPluginPath

public abstract void setPluginPath(java.io.File path)
Sets the path to the plugin directory so that plugins may access files in the directory if they have some located there.

Parameters:
path - the plugin directory.

getPluginPath

public abstract java.io.File getPluginPath()
Gets the path to the plugin directory so plugins may access files in there if needed.

Returns:
the path to the plugin directory

setConfigFile

public abstract void setConfigFile(ConfigFile configFile)
Set the associated config file for the IVC system. The config file consists of directories for libs and plugins and any other preferences needed in the system.

Parameters:
configFile - the config file

getConfigFile

public abstract ConfigFile getConfigFile()
get the config file for the system. The config file just keeps a bunch of parameter/value pairs for preferences and lib and plugin directory information. it is advisable to write out the config file after making any changes.

Returns:
the IVC's config file.

getErrorLogger

public abstract java.util.logging.Logger getErrorLogger()
Gets the logger associated with the IVC so that messages can be logged.

Returns:
The IVC's logger.

getErrorLogFile

public abstract java.io.File getErrorLogFile()
Gets the file object representing the current log file.

Returns:
The log file.

setErrorLogFile

public abstract void setErrorLogFile(java.io.File logFilePath,
                                     boolean append)
                              throws java.io.IOException
Sets the path to the log file.

Parameters:
logFilePath - The path to the log file.
append - An optional flag that if true, makes the logger append to the log file rather than over-write it.
Throws:
java.io.IOException - If the logger could not be configured to write to the specified log file.

getIVCLogManager

public abstract IVCLogManager getIVCLogManager()