|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.speakright.core.render.FormElement
org.speakright.core.render.Question
public class Question
Represents a single-slot single question, which basically maps to a VoiceXML field tag. A question consists of prompts and grammars. This class implements a single-slot single question. This is the simplest form of directed dialog VUI.
| Field Summary | |
|---|---|
GrammarSet |
m_grammarSet
|
int |
m_maxAttempts
# of times to try before giving up with no-input error 1 means try once, 2 means try + 1 retry, ... |
PromptSet |
m_promptSet
|
| Constructor Summary | |
|---|---|
Question()
|
|
Question(Grammar gram,
Prompt prompt)
|
|
| Method Summary | |
|---|---|
void |
add(PromptType type,
java.lang.String text)
Add a prompt of the given type |
void |
addGrammar(Grammar gram)
adds (or replaces if gram.type already in the grammar set) |
void |
addPrompt(Prompt prompt)
Add a prompt (low-level), but only if not already in prompt set |
Grammar |
grammar()
Get the voice grammar. |
void |
InitPrompts(java.lang.String subject)
Init the error and escalating prompts to something reasonable, using m_subject. |
void |
renderGrammars(GrammarPipeline pipeline)
Render the grammars in this question into GrammarItems, which are used to generated VoiceXML. |
void |
renderPrompts(PromptPipeline pipeline)
Render the prompts in this question into PromptItems, which are used to generate VoiceXML. |
void |
setMaxAttempts(int n)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public PromptSet m_promptSet
public GrammarSet m_grammarSet
public int m_maxAttempts
| Constructor Detail |
|---|
public Question()
public Question(Grammar gram,
Prompt prompt)
| Method Detail |
|---|
public Grammar grammar()
public void addGrammar(Grammar gram)
gram - public void setMaxAttempts(int n)
public void InitPrompts(java.lang.String subject)
subject - the subject of the question, such as "tickets".
public void add(PromptType type,
java.lang.String text)
type - text - public void addPrompt(Prompt prompt)
prompt - public void renderPrompts(PromptPipeline pipeline)
renderPrompts in class FormElementpublic void renderGrammars(GrammarPipeline pipeline)
renderGrammars in class FormElement
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||