org.jvoicexml.xml.vxml
Class Record

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

public final class Record
extends AbstractXmlNode

The <record> element is an input item that collects a recording from the user.

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

Field Summary
static String ATTRIBUTE_BEEP
          If true, a tone is emitted just prior to recording.
static String ATTRIBUTE_COND
          An expression that must evaluate to true after conversion to boolean in order for the form item to be visited.
static String ATTRIBUTE_DTMFTERM
          If true, any DTMF keypress not matched by an active grammar will be treated as a match of an active (anonymous) local DTMF grammar.
static String ATTRIBUTE_EXPR
          The initial value of the form item variable; default is ECMAScript undefined.
static String ATTRIBUTE_FINALSILENCE
          The interval of silence that indicates end of speech.
static String ATTRIBUTE_MAXTIME
          The maximum duration to record.
static String ATTRIBUTE_MODAL
          If this is true (the default) all non-local speech and DTMF grammars are not active while making the recording.
static String ATTRIBUTE_NAME
          The input item variable that will hold the recording.
protected static ArrayList<String> ATTRIBUTE_NAMES
          Supported attribute names for this node.
static String ATTRIBUTE_TYPE
          The media format of the resulting recording.
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
Record()
          Construct a new record 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 getBeep()
          Retrieve the beep attribute.
 String getCond()
          Retrieve the cond attribute.
 String getDtmfterm()
          Retrieve the dtmfterm attribute.
 String getExpr()
          Retrieve the expr attribute.
 String getFinalsilence()
          Retrieve the finalsilence attribute.
 String getMaxtime()
          Retrieve the maxtime attribute.
 long getMaxtimeAsMsec()
          Retrieves the maxtime attribute as msec.
 String getModal()
          Retrieve the modal attribute.
 String getName()
          Retrieve the name attribute.
 String getTagName()
          Get the name of the tag for the derived node.
 String getType()
          Retrieve the type attribute.
 boolean isModal()
          Checks if this record is modal.
 XmlNode newInstance(Node n, XmlNodeFactory<? extends XmlNode> factory)
          Create a new instance for the given node.
 void setBeep(String beep)
          Set the beep attribute.
 void setCond(String cond)
          Set the cond attribute.
 void setDtmfterm(String dtmfterm)
          Set the dtmfterm attribute.
 void setExpr(String expr)
          Set the expr attribute.
 void setFinalsilence(String finalsilence)
          Set the finalsilence attribute.
 void setMaxtime(String maxtime)
          Set the maxtime attribute.
 void setModal(boolean modal)
          Set the modal attribute.
 void setModal(String modal)
          Set the modal attribute.
 void setName(String name)
          Set the name attribute.
 void setType(String type)
          Set the type 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_NAME

public static final String ATTRIBUTE_NAME
The input item variable that will hold the recording.

See Also:
Constant Field Values

ATTRIBUTE_EXPR

public static final String ATTRIBUTE_EXPR
The initial value of the form item variable; default is ECMAScript undefined. If initialized to a value, then the form item will not be visited unless the form item variable is cleared.

See Also:
Constant Field Values

ATTRIBUTE_COND

public static final String ATTRIBUTE_COND
An expression that must evaluate to true after conversion to boolean in order for the form item to be visited.

See Also:
Constant Field Values

ATTRIBUTE_MODAL

public static final String ATTRIBUTE_MODAL
If this is true (the default) all non-local speech and DTMF grammars are not active while making the recording. If this is false, non-local speech and DTMF grammars are active.

See Also:
Constant Field Values

ATTRIBUTE_BEEP

public static final String ATTRIBUTE_BEEP
If true, a tone is emitted just prior to recording. Defaults to false.

See Also:
Constant Field Values

ATTRIBUTE_MAXTIME

public static final String ATTRIBUTE_MAXTIME
The maximum duration to record. The value is a Time Designation. Defaults to a platform-specific value.

See Also:
Constant Field Values

ATTRIBUTE_FINALSILENCE

public static final String ATTRIBUTE_FINALSILENCE
The interval of silence that indicates end of speech. The value is a Time Designation. Defaults to a platform-specific value.

See Also:
Constant Field Values

ATTRIBUTE_DTMFTERM

public static final String ATTRIBUTE_DTMFTERM
If true, any DTMF keypress not matched by an active grammar will be treated as a match of an active (anonymous) local DTMF grammar. Defaults to true.

See Also:
Constant Field Values

ATTRIBUTE_TYPE

public static final String ATTRIBUTE_TYPE
The media format of the resulting recording.

See Also:
Constant Field Values

ATTRIBUTE_NAMES

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

Constructor Detail

Record

public Record()
Construct a new record 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

getName

public String getName()
Retrieve the name attribute.

Returns:
Value of the name attribute.
See Also:
ATTRIBUTE_NAME

setName

public void setName(String name)
Set the name attribute.

Parameters:
name - Value of the name attribute.
See Also:
ATTRIBUTE_NAME

getExpr

public String getExpr()
Retrieve the expr attribute.

Returns:
Value of the expr attribute.
See Also:
ATTRIBUTE_EXPR

setExpr

public void setExpr(String expr)
Set the expr attribute.

Parameters:
expr - Value of the expr attribute.
See Also:
ATTRIBUTE_EXPR

getCond

public String getCond()
Retrieve the cond attribute.

Returns:
Value of the cond attribute.
See Also:
ATTRIBUTE_COND

setCond

public void setCond(String cond)
Set the cond attribute.

Parameters:
cond - Value of the cond attribute.
See Also:
ATTRIBUTE_COND

getModal

public String getModal()
Retrieve the modal attribute.

Returns:
Value of the modal attribute.
See Also:
ATTRIBUTE_MODAL

isModal

public boolean isModal()
Checks if this record is modal.

Returns:
true if the record is modal.
Since:
0.7.2

setModal

public void setModal(String modal)
Set the modal attribute.

Parameters:
modal - Value of the modal attribute.
See Also:
ATTRIBUTE_MODAL

setModal

public void setModal(boolean modal)
Set the modal attribute.

Parameters:
modal - Value of the modal attribute.
Since:
0.7.2
See Also:
ATTRIBUTE_MODAL

getBeep

public String getBeep()
Retrieve the beep attribute.

Returns:
Value of the beep attribute.
See Also:
ATTRIBUTE_BEEP

setBeep

public void setBeep(String beep)
Set the beep attribute.

Parameters:
beep - Value of the beep attribute.
See Also:
ATTRIBUTE_BEEP

getMaxtime

public String getMaxtime()
Retrieve the maxtime attribute.

Returns:
Value of the maxtime attribute.
See Also:
ATTRIBUTE_MAXTIME

getMaxtimeAsMsec

public long getMaxtimeAsMsec()
Retrieves the maxtime attribute as msec.

Returns:
number of milliseconds, -1 if the value can not be converted to a number.
Since:
0.6

setMaxtime

public void setMaxtime(String maxtime)
Set the maxtime attribute.

Parameters:
maxtime - Value of the maxtime attribute.
See Also:
ATTRIBUTE_MAXTIME

getFinalsilence

public String getFinalsilence()
Retrieve the finalsilence attribute.

Returns:
Value of the finalsilence attribute.
See Also:
ATTRIBUTE_FINALSILENCE

setFinalsilence

public void setFinalsilence(String finalsilence)
Set the finalsilence attribute.

Parameters:
finalsilence - Value of the finalsilence attribute.
See Also:
ATTRIBUTE_FINALSILENCE

getDtmfterm

public String getDtmfterm()
Retrieve the dtmfterm attribute.

Returns:
Value of the dtmfterm attribute.
See Also:
ATTRIBUTE_DTMFTERM

setDtmfterm

public void setDtmfterm(String dtmfterm)
Set the dtmfterm attribute.

Parameters:
dtmfterm - Value of the dtmfterm attribute.
See Also:
ATTRIBUTE_DTMFTERM

getType

public String getType()
Retrieve the type attribute.

Returns:
Value of the type attribute.
See Also:
ATTRIBUTE_TYPE

setType

public void setType(String type)
Set the type attribute.

Parameters:
type - Value of the type attribute.
See Also:
ATTRIBUTE_TYPE

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.