public class DatatypeElement extends DefaultElement implements com.sun.msv.datatype.SerializationContext, org.relaxng.datatype.ValidationContext
DatatypeElement
represents an Element which supports the XML Schema Data Types
specification.
USE_STRINGVALUE_SEPARATOR, VERBOSE_TOSTRING
DEFAULT_CONTENT_LIST_SIZE
NODE_TYPE_NAMES
ANY_NODE, ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, MAX_NODE_TYPE, NAMESPACE_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE, UNKNOWN_NODE
Constructor and Description |
---|
DatatypeElement(QName qname,
int attributeCount,
com.sun.msv.datatype.xsd.XSDatatype type) |
DatatypeElement(QName qname,
com.sun.msv.datatype.xsd.XSDatatype datatype) |
Modifier and Type | Method and Description |
---|---|
Element |
addText(java.lang.String text)
Adds a new
Text node with the given text to this element. |
protected void |
childAdded(Node node)
Override to force lazy recreation of data object
|
protected void |
childRemoved(Node node)
Override to force lazy recreation of data object
|
java.lang.String |
getBaseUri() |
java.lang.Object |
getData()
Accesses the data of this element which may implement data typing
bindings such as XML Schema or Java Bean bindings or will return the same
value as
Element.getText() |
java.lang.String |
getNamespacePrefix(java.lang.String uri) |
com.sun.msv.datatype.xsd.XSDatatype |
getXSDatatype()
Returns the MSV XSDatatype for this node
|
boolean |
isNotation(java.lang.String notationName) |
boolean |
isUnparsedEntity(java.lang.String entityName) |
java.lang.String |
resolveNamespacePrefix(java.lang.String prefix) |
void |
setData(java.lang.Object data)
Sets the data value of this element if this element supports data binding
or calls
Node.setText(java.lang.String) if it doesn't |
void |
setText(java.lang.String text)
Sets the text data of this node or this method will throw an
UnsupportedOperationException if it is read-only. |
java.lang.String |
toString() |
protected void |
validate(java.lang.String text) |
add, additionalNamespaces, additionalNamespaces, addNewNode, attribute, attribute, attribute, attribute, attributeCount, attributeIterator, attributeList, attributeList, attributes, clearContent, clone, contentList, declaredNamespaces, element, element, element, getDocument, getDocumentFactory, getNamespaceForPrefix, getNamespaceForURI, getParent, getQName, getStringValue, getText, indexOf, node, nodeCount, nodeIterator, processingInstruction, processingInstructions, processingInstructions, remove, removeNode, removeProcessingInstruction, setAttributeList, setAttributes, setContent, setDocument, setParent, setQName, supportsParent
accept, add, add, add, add, add, add, add, add, addAttribute, addAttribute, addCDATA, addComment, addElement, addEntity, addNamespace, addNewNode, addNode, addNode, addProcessingInstruction, addProcessingInstruction, appendAttributes, asXML, attributeValue, attributeValue, attributeValue, attributeValue, createAttributeList, createAttributeList, createCopy, createCopy, createCopy, createElement, createElement, createSingleIterator, elementIterator, elementIterator, elementIterator, elementIterator, elements, elements, elements, elements, elementText, elementText, elementTextTrim, elementTextTrim, ensureAttributesCapacity, getName, getNamespace, getNamespacePrefix, getNamespacesForURI, getNamespaceURI, getNodeType, getPath, getQName, getQualifiedName, getUniquePath, getXPathNameStep, getXPathResult, hasMixedContent, isRootElement, isTextOnly, normalize, remove, remove, remove, remove, remove, remove, remove, remove, setAttributes, setAttributeValue, setAttributeValue, setName, setNamespace, write
addElement, addElement, addElement, appendContent, content, contentRemoved, createContentList, createContentList, createEmptyList, createResultList, createSingleResultList, elementByID, elementID, getContentAsStringValue, getContentAsText, getTextTrim, hasContent, invalidNodeTypeAddException, isReadOnly, setProcessingInstructions
asXPathResult, createPattern, createXPath, createXPathFilter, createXPathResult, detach, getNodeTypeName, getPath, getUniquePath, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOf
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getTextTrim
addElement, addElement, appendContent, content, elementByID, setProcessingInstructions
asXPathResult, createXPath, detach, getNodeTypeName, getPath, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOf
public DatatypeElement(QName qname, com.sun.msv.datatype.xsd.XSDatatype datatype)
public DatatypeElement(QName qname, int attributeCount, com.sun.msv.datatype.xsd.XSDatatype type)
public java.lang.String toString()
toString
in class AbstractElement
public com.sun.msv.datatype.xsd.XSDatatype getXSDatatype()
public java.lang.String getNamespacePrefix(java.lang.String uri)
getNamespacePrefix
in interface com.sun.msv.datatype.SerializationContext
public java.lang.String getBaseUri()
getBaseUri
in interface org.relaxng.datatype.ValidationContext
public boolean isNotation(java.lang.String notationName)
isNotation
in interface org.relaxng.datatype.ValidationContext
public boolean isUnparsedEntity(java.lang.String entityName)
isUnparsedEntity
in interface org.relaxng.datatype.ValidationContext
public java.lang.String resolveNamespacePrefix(java.lang.String prefix)
resolveNamespacePrefix
in interface org.relaxng.datatype.ValidationContext
public java.lang.Object getData()
Element
Element.getText()
getData
in interface Element
getData
in class AbstractElement
public void setData(java.lang.Object data)
Element
Node.setText(java.lang.String)
if it doesn'tsetData
in interface Element
setData
in class AbstractElement
data
- DOCUMENT ME!public Element addText(java.lang.String text)
Element
Text
node with the given text to this element.addText
in interface Element
addText
in class AbstractElement
text
- is the text for the Text
node.Element
instance.public void setText(java.lang.String text)
Node
Sets the text data of this node or this method will throw an
UnsupportedOperationException
if it is read-only.
setText
in interface Node
setText
in class AbstractElement
text
- is the new textual value of this nodeprotected void childAdded(Node node)
childAdded
in class AbstractElement
node
- DOCUMENT ME!protected void childRemoved(Node node)
childRemoved
in class AbstractElement
node
- DOCUMENT ME!protected void validate(java.lang.String text) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException