org.jvoicexml.xml.vxml
Class Param

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

public final class Param
extends AbstractXmlNode

The <param> element is used to specify values that are passed to <subdialog>s or <object>s.

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

Field Summary
static String ATTRIBUTE_EXPR
          An expression that computes the value associated with name.
static String ATTRIBUTE_NAME
          The name to be associated with this parameter when the object or subdialog is invoked.
protected static ArrayList<String> ATTRIBUTE_NAMES
          Supported attribute names for this node.
static String ATTRIBUTE_TYPE
          The media type of the result provided by a URI if the valuetype is ref; only relevant for uses of <param> in <object>.
static String ATTRIBUTE_VALUE
          Associates a literal string value with name.
static String ATTRIBUTE_VALUETYPE
          One of data or ref, by default data; used to indicate to an object if the value associated with name is data or a URI (ref).
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
Param()
          Construct a new param object without a node.
 
Method Summary
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 getExpr()
          Retrieve the expr 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.
 String getValue()
          Retrieve the value attribute.
 ParamValueType getValuetype()
          Retrieve the valuetype attribute.
 String getValuetypeName()
          Retrieve the valuetype attribute.
 XmlNode newInstance(Node n, XmlNodeFactory<? extends XmlNode> factory)
          Create a new instance for the given node.
 void setExpr(String expr)
          Set the expr attribute.
 void setName(String name)
          Set the name attribute.
 void setType(String type)
          Set the type attribute.
 void setValue(String value)
          Set the value attribute.
 void setValuetype(ParamValueType valuetype)
          Set the valuetype attribute.
 void setValuetype(String valuetype)
          Set the valuetype 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 name to be associated with this parameter when the object or subdialog is invoked.

See Also:
Constant Field Values

ATTRIBUTE_EXPR

public static final String ATTRIBUTE_EXPR
An expression that computes the value associated with name.

See Also:
Constant Field Values

ATTRIBUTE_VALUE

public static final String ATTRIBUTE_VALUE
Associates a literal string value with name.

See Also:
Constant Field Values

ATTRIBUTE_VALUETYPE

public static final String ATTRIBUTE_VALUETYPE
One of data or ref, by default data; used to indicate to an object if the value associated with name is data or a URI (ref). This is not used for <subdialog> since values are always data.

See Also:
Constant Field Values

ATTRIBUTE_TYPE

public static final String ATTRIBUTE_TYPE
The media type of the result provided by a URI if the valuetype is ref; only relevant for uses of <param> in <object>.

See Also:
Constant Field Values

ATTRIBUTE_NAMES

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

Constructor Detail

Param

public Param()
Construct a new param 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

getValue

public String getValue()
Retrieve the value attribute.

Returns:
Value of the value attribute.
See Also:
ATTRIBUTE_VALUE

setValue

public void setValue(String value)
Set the value attribute.

Parameters:
value - Value of the value attribute.
See Also:
ATTRIBUTE_VALUE

getValuetype

public ParamValueType getValuetype()
Retrieve the valuetype attribute.

Returns:
Value of the valuetype attribute.
See Also:
ATTRIBUTE_VALUETYPE

getValuetypeName

public String getValuetypeName()
Retrieve the valuetype attribute.

Returns:
Value of the valuetype attribute.
Since:
0.5
See Also:
ATTRIBUTE_VALUETYPE

setValuetype

public void setValuetype(String valuetype)
Set the valuetype attribute.

Parameters:
valuetype - Value of the valuetype attribute.
See Also:
ATTRIBUTE_VALUETYPE

setValuetype

public void setValuetype(ParamValueType valuetype)
Set the valuetype attribute.

Parameters:
valuetype - Value of the valuetype attribute.
Since:
0.5
See Also:
ATTRIBUTE_VALUETYPE

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

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.