fi.hut.tml.xsmiles.mlfc.xforms.dialog
Class BaseSpeechWidget

java.lang.Object
  extended byfi.hut.tml.xsmiles.mlfc.xforms.dialog.BaseSpeechWidget
All Implemented Interfaces:
SpeechWidget
Direct Known Subclasses:
DateSpeechWidget, GroupSpeechWidget, IntegerSpeechWidget, SelectSpeechWidget, StringSpeechWidget, TriggerSpeechWidget

public class BaseSpeechWidget
extends java.lang.Object
implements SpeechWidget

Author:
honkkis

Field Summary
static java.lang.String currentSelectionString
           
protected  org.w3c.dom.Element element
           
protected  FocusHandler focusHandler
           
 
Constructor Summary
BaseSpeechWidget(org.w3c.dom.Element e, FocusHandler handler)
           
 
Method Summary
 boolean approximateResponse(Response response)
           
protected static java.lang.String determineHTMLElementLabel(org.w3c.dom.Element e)
           
protected static java.lang.String findLabelHeuristically(org.w3c.dom.Element e)
           
 java.lang.String generateDialogQuestion()
           
 void generateGrammar(Grammar grammar)
           
 java.lang.String getCurrentValue()
           
 org.w3c.dom.Element getElement()
           
 java.lang.String getLabel()
           
static java.lang.String getLabel(org.w3c.dom.Element e)
           
protected static java.lang.String getLabelForRepeatItem(RepeatItem e)
           
 java.lang.String getLabelForSpeaking()
           
static java.lang.String getLabelForSpeaking(org.w3c.dom.Element e, boolean forGrammar)
           
 java.lang.String getPrompt()
          static prompt for this kind of control, for instance, "select a number"
static java.lang.String getValueAsString(org.w3c.dom.Element e)
           
 boolean interpretResponse(Response response)
           
protected  void moveFocusToParent()
           
static java.lang.String removeNonAlphanumeric(java.lang.String str)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

focusHandler

protected FocusHandler focusHandler

element

protected org.w3c.dom.Element element

currentSelectionString

public static final java.lang.String currentSelectionString
See Also:
Constant Field Values
Constructor Detail

BaseSpeechWidget

public BaseSpeechWidget(org.w3c.dom.Element e,
                        FocusHandler handler)
Method Detail

getElement

public org.w3c.dom.Element getElement()
Specified by:
getElement in interface SpeechWidget

getLabel

public java.lang.String getLabel()
Specified by:
getLabel in interface SpeechWidget

getLabelForSpeaking

public java.lang.String getLabelForSpeaking()

getLabel

public static java.lang.String getLabel(org.w3c.dom.Element e)

getLabelForRepeatItem

protected static java.lang.String getLabelForRepeatItem(RepeatItem e)

determineHTMLElementLabel

protected static java.lang.String determineHTMLElementLabel(org.w3c.dom.Element e)

findLabelHeuristically

protected static java.lang.String findLabelHeuristically(org.w3c.dom.Element e)

getLabelForSpeaking

public static java.lang.String getLabelForSpeaking(org.w3c.dom.Element e,
                                                   boolean forGrammar)

getValueAsString

public static java.lang.String getValueAsString(org.w3c.dom.Element e)

getPrompt

public java.lang.String getPrompt()
static prompt for this kind of control, for instance, "select a number"


generateDialogQuestion

public java.lang.String generateDialogQuestion()
Specified by:
generateDialogQuestion in interface SpeechWidget

generateGrammar

public void generateGrammar(Grammar grammar)
Specified by:
generateGrammar in interface SpeechWidget

moveFocusToParent

protected void moveFocusToParent()

interpretResponse

public boolean interpretResponse(Response response)
Specified by:
interpretResponse in interface SpeechWidget

removeNonAlphanumeric

public static java.lang.String removeNonAlphanumeric(java.lang.String str)

getCurrentValue

public java.lang.String getCurrentValue()

approximateResponse

public boolean approximateResponse(Response response)
Specified by:
approximateResponse in interface SpeechWidget


X-Smiles 1.2