org.jvoicexml.xml.vxml
Class Filled

java.lang.Object
  extended by org.jvoicexml.xml.AbstractXmlNode
      extended by org.jvoicexml.xml.vxml.Filled
All Implemented Interfaces:
VoiceXmlNode, XmlNode, Node

public final class Filled
extends AbstractXmlNode

An action executed when fields are filled.

The <filled> element specifies an action to perform when some combination of input items are filled. It may occur in two places: as a child of the <form> element, or as a child of an input item.

As a child of a <form> element, the <filled> element can be used to perform actions that occur when a combination of one or more input items is filled.

If the <filled> element appears inside an input item, it specifies an action to perform after that input item is filled in:

After each gathering of the user's input, all the input items mentioned in the input are set, and then the interpreter looks at each <filled> element in document order (no preference is given to ones in input items vs. ones in the form). Those whose conditions are matched by the utterance are then executed in order, until there are no more, or until one transfers control or throws an event.

Version:
$Revision: 2325 $
Author:
Steve Doyle, Dirk Schnelle-Walka
See Also:
Form

Field Summary
static String ATTRIBUTE_MODE
          Either all (the default), or any.
static String ATTRIBUTE_NAMELIST
          The input items to trigger on.
protected static ArrayList<String> ATTRIBUTE_NAMES
          Supported attribute names for this node.
static String TAG_NAME
          Name of the tag.
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
Filled()
          Construct a new filled object without a node.
 
Method Summary
 Text addText(String text)
          Create a new text within this node.
protected  boolean canContainChild(String tagName)
          Can the specified sub-tag be contained within this node?
 Collection<String> getAttributeNames()
          Returns a collection of permitted attribute names for the node.
 String getMode()
          Retrieve the mode attribute.
 FilledMode getModeObject()
          Retrieves the mode attribute object.
 String getNamelist()
          Retrieve the namelist attribute.
 TokenList getNameListObject()
          Retrieve the namelist attribute as a list object.
 String getTagName()
          Get the name of the tag for the derived node.
 XmlNode newInstance(Node n, XmlNodeFactory<? extends XmlNode> factory)
          Create a new instance for the given node.
 void setMode(FilledMode mode)
          Sets the mode attribute.
 void setMode(String mode)
          Sets the mode attribute.
 void setNamelist(String namelist)
          Set the namelist attribute.
 void setNamelist(TokenList list)
          Set the namelist attribute.
 
Methods inherited from class org.jvoicexml.xml.AbstractXmlNode
addChild, addChild, appendChild, appendChild, appendDeepClone, cloneNode, compareDocumentPosition, equals, getAttribute, getAttributes, getBaseURI, getChildNodes, getChildNodes, getChildren, getDefinedAttributeNames, getFeature, getFirstChild, getFirstLevelTextContent, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNode, getNodeFactory, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getOwnerXmlDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, hashCode, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setAttribute, setNodeValue, setPrefix, setTextContent, setUserData, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jvoicexml.xml.XmlNode
addChild, getAttribute, getChildNodes, getChildren, getNode, setAttribute
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 

Field Detail

TAG_NAME

public static final String TAG_NAME
Name of the tag.

See Also:
Constant Field Values

ATTRIBUTE_MODE

public static final String ATTRIBUTE_MODE
Either all (the default), or any. If any, this action is executed when any of the specified input items is filled by the last user input. If all, this action is executed when all of the mentioned input items are filled, and at least one has been filled by the last user input. A <filled> element in an input item cannot specify a mode; if a mode is specified, then an error.badfetch is thrown by the platform upon encountering the document.

See Also:
Constant Field Values

ATTRIBUTE_NAMELIST

public static final String ATTRIBUTE_NAMELIST
The input items to trigger on. For a <filled> in a form, namelist defaults to the names (explicit and implicit) of the form's input items. A <filled> element in an input item cannot specify a namelist (the namelist in this case is the input item name); if a namelist is specified, then an error.badfetch is thrown by the platform upon encountering the document. Note that control items are not permitted in this list; an error.badfetch is thrown when the document contains a <filled> element with a namelist attribute referencing a control item variable.

See Also:
Constant Field Values

ATTRIBUTE_NAMES

protected static final ArrayList<String> ATTRIBUTE_NAMES
Supported attribute names for this node.

Constructor Detail

Filled

public Filled()
Construct a new filled object without a node.

This is necessary for the node factory.

See Also:
VoiceXmlNodeFactory
Method Detail

getTagName

public String getTagName()
Get the name of the tag for the derived node.

Returns:
name of the tag.

newInstance

public XmlNode newInstance(Node n,
                           XmlNodeFactory<? extends XmlNode> factory)
Create a new instance for the given node.

Each XmlNode can serve as a prototype in a XmlNodeFactory to produce a collection of child nodes. Factories can then use the prototype pattern to produce new nodes.

Parameters:
n - The node to encapsulate.
factory - the factroy that calls this method.
Returns:
The new instance.
See Also:
XmlNodeFactory

getMode

public String getMode()
Retrieve the mode attribute.

Returns:
Value of the mode attribute.
See Also:
ATTRIBUTE_MODE

getModeObject

public FilledMode getModeObject()
Retrieves the mode attribute object.

Returns:
the mode attribute
Since:
0.7.3

setMode

public void setMode(String mode)
Sets the mode attribute.

Parameters:
mode - Value of the mode attribute.
See Also:
ATTRIBUTE_MODE

setMode

public void setMode(FilledMode mode)
Sets the mode attribute.

Parameters:
mode - Value of the mode attribute.
See Also:
ATTRIBUTE_MODE

getNamelist

public String getNamelist()
Retrieve the namelist attribute.

Returns:
Value of the namelist attribute.
See Also:
ATTRIBUTE_NAMELIST

getNameListObject

public TokenList getNameListObject()
Retrieve the namelist attribute as a list object.

Returns:
Value of the namelist attribute as a list.
Since:
0.7.3
See Also:
getNamelist()

setNamelist

public void setNamelist(String namelist)
Set the namelist attribute.

Parameters:
namelist - Value of the namelist attribute.
See Also:
ATTRIBUTE_NAMELIST

setNamelist

public void setNamelist(TokenList list)
Set the namelist attribute.

Parameters:
list - Value of the namelist attribute.
See Also:
ATTRIBUTE_NAMELIST, setNamelist(String)

addText

public Text addText(String text)
Create a new text within this node.

Parameters:
text - The text to be added.
Returns:
The new created text.

canContainChild

protected boolean canContainChild(String tagName)
Can the specified sub-tag be contained within this node?

Specified by:
canContainChild in class AbstractXmlNode
Parameters:
tagName - Name of child.
Returns:
True if the sub-tag is allowed on this node.

getAttributeNames

public Collection<String> getAttributeNames()
Returns a collection of permitted attribute names for the node.

Specified by:
getAttributeNames in interface XmlNode
Overrides:
getAttributeNames in class AbstractXmlNode
Returns:
A collection of attribute names that are allowed for the node


Copyright © 2005-2009JVoiceXML group.