org.opencyc.conversation
Class Conversation

java.lang.Object
  |
  +--org.opencyc.conversation.Conversation

public class Conversation
extends java.lang.Object

Contains the attributes and behavior of a chat conversation.

The chat conversation is in the form of a text conversation using asynchronous receiving and sending of messages.

Author:
Stephen L. Reed

Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.

the license

www.opencyc.org

OpenCyc at SourceForge

THIS SOFTWARE AND KNOWLEDGE BASE CONTENT ARE PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENCYC ORGANIZATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND KNOWLEDGE BASE CONTENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Field Summary
protected  java.util.HashMap conversationFsmStates
          dictionary of conversation states, stateName --> State
protected  State initialState
          inital conversation state
protected  java.lang.String name
          name of the conversation
 
Constructor Summary
protected Conversation(java.lang.String name)
          Constructs a new Conversation object given the conversation name
 
Method Summary
 void addState(State conversationFsmState)
          Records the stateId and associated State
 void addState(java.lang.String stateId, State conversationFsmState)
          Records the stateId and associated State
 State getInitialState()
          Returns the initial conversation state.
 java.lang.String getName()
          Returns the conversation name
 void setInitialState(State initialState)
          Sets the initial conversation state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
name of the conversation

initialState

protected State initialState
inital conversation state

conversationFsmStates

protected java.util.HashMap conversationFsmStates
dictionary of conversation states, stateName --> State
Constructor Detail

Conversation

protected Conversation(java.lang.String name)
Constructs a new Conversation object given the conversation name
Parameters:
name - the conversation name
Method Detail

getName

public java.lang.String getName()
Returns the conversation name
Returns:
the conversation name

setInitialState

public void setInitialState(State initialState)
Sets the initial conversation state.
Parameters:
initialState - the initial conversation state

getInitialState

public State getInitialState()
Returns the initial conversation state.
Returns:
the initial conversation state

addState

public void addState(State conversationFsmState)
Records the stateId and associated State
Parameters:
conversationFsmState - the FSM node identified by its stateId

addState

public void addState(java.lang.String stateId,
                     State conversationFsmState)
Records the stateId and associated State
Parameters:
stateId - the given stateId
conversationFsmState - the FSM node identified by the stateId