ABLE 2.0.0 07/02/2003 10:25:01

com.ibm.able.conversation
Class ConversationParser

java.lang.Object
  |
  +--com.ibm.able.conversation.ConversationParser
All Implemented Interfaces:
java.io.Serializable

public class ConversationParser
extends java.lang.Object
implements java.io.Serializable

Parses a CP-XML file and extracts the following information and stores them internally

OLD VERSION -- TO BE DELETED Replaced by com.ibm.conversation.base.CpXmlParser.

(1) State information

(2) Transition information

(3) Set of roles

(4) Initial state name

The same ConversationParser can be re-used for different instances of the same conversation. It internally stores the extracted information and returns new copies of the objects whenever it is queried for information. So sharing of information among different instances of conversation using the same ConversationParser does not occur and the parser does not have to go to the XML file for every invocation

See Also:
Serialized Form

Field Summary
protected static long serialVersionUID
          Serialized version identifier in form YYYYMMDDVerRelModxx
 
Constructor Summary
ConversationParser(java.lang.String uri)
          Constructor for the ConversationParser that uses the default parser
ConversationParser(java.lang.String uri, java.lang.String parserWrapperName)
          Constructor for the ConversationParser that uses the specified parser
 
Method Summary
 java.lang.String getInitialStateName()
          Returns the initial state name of the conversation
 java.lang.String getName()
          Returns the name of the conversation
 java.util.Vector getRoles()
          Returns a copy of the roles in the conversation
 java.util.Hashtable getStates(java.util.Hashtable transitionHash)
          Returns a hashtable of state objects in the conversation indexed by the name of the states
static void main(java.lang.String[] argv)
          Main program entry point.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

protected static final long serialVersionUID
Serialized version identifier in form YYYYMMDDVerRelModxx
Constructor Detail

ConversationParser

public ConversationParser(java.lang.String uri)
Constructor for the ConversationParser that uses the default parser

Parameters:
uri - Universal Resource Identifier string representing the conversation policy in XML form

ConversationParser

public ConversationParser(java.lang.String uri,
                          java.lang.String parserWrapperName)
Constructor for the ConversationParser that uses the specified parser

Parameters:
uri - Universal Resource Identifier string representing the conversation policy in XML form (CP-XML)

parserWrapperName - Type of the parser to be used in parsing the CP-XML
Method Detail

getRoles

public java.util.Vector getRoles()
Returns a copy of the roles in the conversation

Returns:
a two element Vector containing string names of the roles

getName

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

Returns:
the name of the conversation

getInitialStateName

public java.lang.String getInitialStateName()
Returns the initial state name of the conversation

Returns:
the initial state name of the conversation

getStates

public java.util.Hashtable getStates(java.util.Hashtable transitionHash)
Returns a hashtable of state objects in the conversation indexed by the name of the states

Returns:
Hashtable of state objects in the conversation

main

public static void main(java.lang.String[] argv)
Main program entry point. - for testing

ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003