org.jvoicexml.interpreter
Interface Dialog

All Superinterfaces:
Cloneable, DialogConstruct
All Known Implementing Classes:
ExecutableMenuForm, ExecutablePlainForm

public interface Dialog
extends DialogConstruct, Cloneable

There are two kinds of dialogs: forms and menus. Forms define an interaction that collects values for a set of form item variables. Each field may specify a grammar that defines the allowable inputs for that field. If a form-level grammar is present, it can be used to fill several fields from one utterance. A menu presents the user with a choice of options and then transitions to another dialog based on that choice.

Dialogs are either <form> or a <menu> and are interpreted via the FormInterpretationAlgorithm. They can contain FormItems.

The VoiceXML specification mixes the two names form and dialog. In order to avoid confusing the term forms with the <form>-tag the term dialog was chosen.

Since:
0.4
Version:
$Revision: 2612 $
Author:
Dirk Schnelle-Walka
See Also:
FormInterpretationAlgorithm, FormItem, Form, Menu

Method Summary
 Dialog clone()
          Creates a clone of this dialog.
 Collection<AbstractCatchElement> getCatchElements()
          Gets all nested <catch> elements.
 Collection<XmlNode> getChildNodes()
          Retrieves the child nodes of this executable form.
 Collection<Filled> getFilledElements()
          Gets all nested <filled> elements.
 Collection<FormItem> getFormItems(VoiceXmlInterpreterContext context)
          Retrieves all FormItems, defined in this form.
 String getId()
          Retrieves the identifier of this dialog.
 void setNode(XmlNode node)
          Associates the dialog with the given node.
 

Method Detail

clone

Dialog clone()
Creates a clone of this dialog.

Returns:
clone of this dialog
Since:
0.7.5

setNode

void setNode(XmlNode node)
             throws IllegalArgumentException
Associates the dialog with the given node.

Parameters:
node - the node
Throws:
IllegalArgumentException - if the dialog can not be associated with the node
Since:
0.7.5

getId

String getId()
Retrieves the identifier of this dialog. It allows the Dialog to be target of a <goto> or a <submit>.

If the related form or menu does not provide an id a randomly chosen id is returned as the id for this dialog.

Returns:
identifier for this form.

getChildNodes

Collection<XmlNode> getChildNodes()
Retrieves the child nodes of this executable form.

Returns:
Child nodes of this executable form

getFormItems

Collection<FormItem> getFormItems(VoiceXmlInterpreterContext context)
                                  throws BadFetchError
Retrieves all FormItems, defined in this form.

Parameters:
context - The current context.
Returns:
Collection of FormItems.
Throws:
BadFetchError - Error obtaining the form items.

getFilledElements

Collection<Filled> getFilledElements()
Gets all nested <filled> elements.

Returns:
Collection about all nested <filled> tags.
Since:
0.7

getCatchElements

Collection<AbstractCatchElement> getCatchElements()
Gets all nested <catch> elements.

Returns:
Collection of all nested <catch> tags.
Since:
0.7


Copyright © 2005-2010JVoiceXML group.