eu.semaine.datatypes.stateinfo
Class DialogStateInfo

java.lang.Object
  extended by eu.semaine.datatypes.stateinfo.StateInfo
      extended by eu.semaine.datatypes.stateinfo.DialogStateInfo

public class DialogStateInfo
extends StateInfo

Author:
marc

Nested Class Summary
static class DialogStateInfo.DialogAct
           
 
Nested classes/interfaces inherited from class eu.semaine.datatypes.stateinfo.StateInfo
StateInfo.Type, StateInfo.XPathInfoMapper
 
Field Summary
 
Fields inherited from class eu.semaine.datatypes.stateinfo.StateInfo
APIVersion, doc, info, infosByType, log, stateName, type
 
Constructor Summary
DialogStateInfo(org.w3c.dom.Document doc)
           
DialogStateInfo(java.util.Map<java.lang.String,java.lang.String> infoItems, java.util.Collection<DialogStateInfo.DialogAct> dialogActs)
           
 
Method Summary
protected  void analyseDocument(java.lang.String rootName, java.lang.String rootNamespace)
          Read information from the message document and fill our info as much as possible.
protected  void createDocumentFromInfo()
           
 java.util.SortedSet<DialogStateInfo.DialogAct> getDialogHistory()
          Get read-only access to the dialog history.
 
Methods inherited from class eu.semaine.datatypes.stateinfo.StateInfo
getAPIVersion, getDocument, getInfo, getInfos, getShortNames, getType, getXPathExpressions, hasInfo, setInfo, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DialogStateInfo

public DialogStateInfo(org.w3c.dom.Document doc)
                throws MessageFormatException
Parameters:
doc -
Throws:
MessageFormatException
JMSException

DialogStateInfo

public DialogStateInfo(java.util.Map<java.lang.String,java.lang.String> infoItems,
                       java.util.Collection<DialogStateInfo.DialogAct> dialogActs)
                throws JMSException
Parameters:
infoItems -
dialogActs - a collection of dialog acts for the dialog history, or null.
Throws:
JMSException
Method Detail

createDocumentFromInfo

protected void createDocumentFromInfo()
                               throws SystemConfigurationException
Overrides:
createDocumentFromInfo in class StateInfo
Throws:
SystemConfigurationException
See Also:
StateInfo.createDocumentFromInfo()

analyseDocument

protected void analyseDocument(java.lang.String rootName,
                               java.lang.String rootNamespace)
                        throws MessageFormatException
Description copied from class: StateInfo
Read information from the message document and fill our info as much as possible. If information is found that cannot be interpreted, the code will emit a warning but continue to work.

Overrides:
analyseDocument in class StateInfo
Throws:
MessageFormatException - if the structure of the document is inconsistent, i.e. structure expectations are violated.

getDialogHistory

public java.util.SortedSet<DialogStateInfo.DialogAct> getDialogHistory()
Get read-only access to the dialog history. The iterator of the sorted set will return the dialog acts sorted by time, most recent first.

Returns:
a set of dialog acts, or null if the message doesn't contain a dialog history.