inpro.incremental.unit
Class InstallmentIU

java.lang.Object
  extended by inpro.incremental.unit.IU
      extended by inpro.incremental.unit.InstallmentIU
All Implemented Interfaces:
java.lang.Comparable<IU>
Direct Known Subclasses:
SysInstallmentIU

public class InstallmentIU
extends IU

A simple wrapper for both system and user uttered installments - for user installments references to recognized WordIUs are kept used to infer the spoken text in toPayload() - for system installments a reference to the corresponding dialogueAct is kept and the spoken text is stored in the variable @see{tts}.

Author:
timo

Nested Class Summary
 
Nested classes/interfaces inherited from class inpro.incremental.unit.IU
IU.IUUpdateListener, IU.Progress
 
Field Summary
(package private)  boolean systemProduced
          Variable specifying who produced this installment
protected  java.lang.String tts
          String holding the system reponse
 
Fields inherited from class inpro.incremental.unit.IU
creationTime, FIRST_IU, groundedIn, grounds, nextSameLevelLinks, previousSameLevelLink, updateListeners
 
Constructor Summary
InstallmentIU(IU dialogueAct, java.lang.String tts)
          Constructor for an installment produced by the system, grounded in a dialogueAct.
InstallmentIU(java.util.List<WordIU> currentInstallment)
          Constructor for an installment produced by the user, grounded in a list of spoken words.
 
Method Summary
 boolean systemProduced()
          Determines whether the installment is a 'system' one.
 java.lang.String toPayLoad()
          Returns a string representation of the payload of this IU.
 boolean userProduced()
          Determines whether the installment is a 'user' one.
 
Methods inherited from class inpro.incremental.unit.IU
addNextSameLevelLink, addUpdateListener, commit, compareTo, connectSLL, deepToString, duration, endTime, equals, getAge, getAmongNextSameLevelLinks, getCreationTime, getID, getNextSameLevelLink, getNextSameLevelLinks, getOngoingGroundedIU, getProgress, getSameLevelLink, ground, groundedIn, groundIn, groundIn, grounds, hashCode, isCommitted, isCompleted, isOngoing, isRevoked, isUpcoming, notifyListeners, payloadEquals, removeAllNextSameLevelLinks, removeGrin, removeGrin, reorderNextSameLevelLink, revoke, setAsTopNextSameLevelLink, setSameLevelLink, startTime, toLabelLine, toString, toTEDviewXML, updateOnGrinUpdates
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

tts

protected java.lang.String tts
String holding the system reponse


systemProduced

boolean systemProduced
Variable specifying who produced this installment

Constructor Detail

InstallmentIU

public InstallmentIU(java.util.List<WordIU> currentInstallment)
Constructor for an installment produced by the user, grounded in a list of spoken words.

Parameters:
currentInstallment - the list of wordIUs grounding this installment

InstallmentIU

public InstallmentIU(IU dialogueAct,
                     java.lang.String tts)
Constructor for an installment produced by the system, grounded in a dialogueAct.

Parameters:
dialogueAct - the dialogue act grounding this installment
tts - the spoken string
Method Detail

systemProduced

public boolean systemProduced()
Determines whether the installment is a 'system' one.

Returns:
true if produced by the system, false if by the user.

userProduced

public boolean userProduced()
Determines whether the installment is a 'user' one.

Returns:
true if produced by the user, false if by the system.

toPayLoad

public java.lang.String toPayLoad()
Returns a string representation of the payload of this IU. For user-produced installments, the payload is a String representation of the spoken words grounding this IU. For system-produced installments, it's a string representation of the spoken output grounded in this IU.

Specified by:
toPayLoad in class IU