public final class Script extends AbstractXmlNode
<script> encloses computations written in the ECMAScript
Compact Profile scripting language. The ECMAScript Compact Profile is a
strict subset of the third edition of ECMA-262. It has been designed to meet
the needs of resource-constrained environments. Special attention has been
paid to constraining ECMAScript features that require proportionately large
amounts of system memory, and continuous or proportionately large amounts of
processing power. In particular, it is designed to facilitate prior
compilation for execution in a lightweight environment.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTRIBUTE_CHARSET
A character string that indicates the character encoding type of the
script.
|
static java.lang.String |
ATTRIBUTE_FETCHID
An ECMAScript expression which returns the fetch identifier of a
completed fetch request, acquired either in a fetch with the fetchid
attribute, or from the fetchid attribute of a fetch.done event.
|
static java.lang.String |
ATTRIBUTE_MAXAGE
The character string is interpreted as a time interval.
|
static java.lang.String |
ATTRIBUTE_MAXSTALE
The character string is interpreted as a time interval.
|
protected static java.util.ArrayList<java.lang.String> |
ATTRIBUTE_NAMES
Supported attribute names for this node.
|
static java.lang.String |
ATTRIBUTE_SRC
A URI which references a resource which is the script content, and which
will be resolved when the CCXML document is compiled.
|
static java.lang.String |
ATTRIBUTE_TIMEOUT
The character string is interpreted as a time interval.
|
static java.lang.String |
TAG_NAME
Name of the tag.
|
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 and Description |
|---|
Script()
Construct a new script object without a node.
|
| Modifier and Type | Method and Description |
|---|---|
Text |
addText(java.lang.String text)
Create a new text within this node.
|
protected boolean |
canContainChild(java.lang.String tagName)
Can the specified sub-tag be contained within this node?
|
java.util.Collection<java.lang.String> |
getAttributeNames()
Returns a collection of permitted attribute names for the node.
|
java.lang.String |
getCharset()
Retrieve the charset attribute.
|
java.lang.String |
getFetchid()
Retrieve the fetchid attribute.
|
java.lang.String |
getMaxage()
Retrieve the maxage attribute.
|
java.lang.String |
getMaxstale()
Retrieve the maxstale attribute.
|
java.lang.String |
getSrc()
Retrieve the src attribute.
|
java.lang.String |
getTagName()
Get the name of the tag for the derived node.
|
java.lang.String |
getTimeout()
Retrieve the timeout attribute.
|
XmlNode |
newInstance(org.w3c.dom.Node n,
XmlNodeFactory<? extends XmlNode> factory)
Create a new instance for the given node.
|
void |
setCharset(java.lang.String charset)
Set the charset attribute.
|
void |
setFetchid(java.lang.String fetchid)
Set the fetchid attribute.
|
void |
setMaxage(java.lang.String maxage)
Set the maxage attribute.
|
void |
setMaxstale(java.lang.String maxstale)
Set the maxstale attribute.
|
void |
setSrc(java.lang.String src)
Set the src attribute.
|
void |
setTimeout(java.lang.String timeout)
Set the timeout attribute.
|
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, hasAttribute, hasAttributes, hasChildNodes, hashCode, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setAttribute, setNodeValue, setPrefix, setTextContent, setUserData, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddChild, getAttribute, getChildNodes, getChildren, getNode, setAttributeappendChild, 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, setUserDatapublic static final java.lang.String TAG_NAME
public static final java.lang.String ATTRIBUTE_CHARSET
public static final java.lang.String ATTRIBUTE_FETCHID
public static final java.lang.String ATTRIBUTE_MAXAGE
public static final java.lang.String ATTRIBUTE_MAXSTALE
public static final java.lang.String ATTRIBUTE_SRC
public static final java.lang.String ATTRIBUTE_TIMEOUT
protected static final java.util.ArrayList<java.lang.String> ATTRIBUTE_NAMES
public Script()
This is necessary for the node factory.
CcxmlNodeFactorypublic java.lang.String getTagName()
public XmlNode newInstance(org.w3c.dom.Node n, XmlNodeFactory<? extends XmlNode> factory)
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.
n - The node to encapsulate.factory - the factroy that calls this method.XmlNodeFactorypublic java.lang.String getCharset()
ATTRIBUTE_CHARSETpublic void setCharset(java.lang.String charset)
charset - Value of the charset attribute.ATTRIBUTE_CHARSETpublic java.lang.String getFetchid()
ATTRIBUTE_FETCHIDpublic void setFetchid(java.lang.String fetchid)
fetchid - Value of the fetchid attribute.ATTRIBUTE_FETCHIDpublic java.lang.String getMaxage()
ATTRIBUTE_MAXAGEpublic void setMaxage(java.lang.String maxage)
maxage - Value of the maxage attribute.ATTRIBUTE_MAXAGEpublic java.lang.String getMaxstale()
ATTRIBUTE_MAXSTALEpublic void setMaxstale(java.lang.String maxstale)
maxstale - Value of the maxstale attribute.ATTRIBUTE_MAXSTALEpublic java.lang.String getSrc()
ATTRIBUTE_SRCpublic void setSrc(java.lang.String src)
src - Value of the src attribute.ATTRIBUTE_SRCpublic java.lang.String getTimeout()
ATTRIBUTE_TIMEOUTpublic void setTimeout(java.lang.String timeout)
timeout - Value of the timeout attribute.ATTRIBUTE_TIMEOUTpublic Text addText(java.lang.String text)
text - The text to be added.protected boolean canContainChild(java.lang.String tagName)
canContainChild in class AbstractXmlNodetagName - Name of child.public java.util.Collection<java.lang.String> getAttributeNames()
getAttributeNames in interface XmlNodegetAttributeNames in class AbstractXmlNode