gov.sandia.cognition.framework.lite
Class AbstractCognitiveModelLite

java.lang.Object
  extended by gov.sandia.cognition.framework.AbstractCognitiveModel
      extended by gov.sandia.cognition.framework.lite.AbstractCognitiveModelLite
All Implemented Interfaces:
CognitiveModel, Serializable
Direct Known Subclasses:
CognitiveModelLite, MultithreadedCognitiveModel

public abstract class AbstractCognitiveModelLite
extends AbstractCognitiveModel

The AbstractCognitiveModelLite class is an abstract class that implements common functionality of classes that share general functionality with the CognitiveModelLite - i.e. they use a DefaultSemanticIdentifierMap and store their state in a CognitiveModelLiteState

Since:
2.0
Author:
Zachary Benz
See Also:
Serialized Form

Field Summary
protected  int numModules
          The number of modules.
protected  CognitiveModelLiteState state
          The current state of the model.
 
Constructor Summary
AbstractCognitiveModelLite()
          Creates a new instance of AbstractCognitiveModelLite.
 
Method Summary
 CognitiveModelLiteState getCurrentState()
          Gets the current state of the model.
 SemanticIdentifierMap getSemanticIdentifierMap()
          Gets teh semantic identifier database used by the model.
 void initializeCognitiveState(CognitiveModelLiteState state)
          This method takes a cognitive state and initializes it by initializing all the module states on it.
 void resetCognitiveState()
          Resets the current state of the model.
 void setCognitiveState(CognitiveModelLiteState state)
          Sets the cognitive state to the given state.
protected  void setSemanticIdentifierMap(DefaultSemanticIdentifierMap semanticIdentifierMap)
          Sets the semantic identifier map.
 
Methods inherited from class gov.sandia.cognition.framework.AbstractCognitiveModel
addCognitiveModelListener, fireModelStateChangedEvent, fireModelStateChangedEvent, getModelListeners, removeCognitiveModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.framework.CognitiveModel
getModules, update
 

Field Detail

numModules

protected int numModules
The number of modules.


state

protected CognitiveModelLiteState state
The current state of the model.

Constructor Detail

AbstractCognitiveModelLite

public AbstractCognitiveModelLite()
Creates a new instance of AbstractCognitiveModelLite.

Method Detail

resetCognitiveState

public void resetCognitiveState()
Resets the current state of the model.


setCognitiveState

public void setCognitiveState(CognitiveModelLiteState state)
Sets the cognitive state to the given state. If the state has not been initialized it is now initialized.

Parameters:
state - The state to initialize.
Throws:
IllegalArgumentException - If the given state does not have the proper module states.

initializeCognitiveState

public void initializeCognitiveState(CognitiveModelLiteState state)
This method takes a cognitive state and initializes it by initializing all the module states on it. If the state is already initialized it will clear out the existing module states.

Parameters:
state - The CognitiveModelLiteState to initialize.
Throws:
IllegalArgumentException - If the given state does not have the proper number of module states.

getCurrentState

public CognitiveModelLiteState getCurrentState()
Gets the current state of the model.

Returns:
The current state of the model.

getSemanticIdentifierMap

public SemanticIdentifierMap getSemanticIdentifierMap()
Gets teh semantic identifier database used by the model.

Returns:
The semantic identifier database used by the model.

setSemanticIdentifierMap

protected void setSemanticIdentifierMap(DefaultSemanticIdentifierMap semanticIdentifierMap)
Sets the semantic identifier map. Note: This is declared private because it cannot be changed from its initial value without breaking the model.

Parameters:
semanticIdentifierMap - The new map.