Package org.dom4j.datatype
Class DatatypeElement
- java.lang.Object
- 
- org.dom4j.tree.AbstractNode
- 
- org.dom4j.tree.AbstractBranch
- 
- org.dom4j.tree.AbstractElement
- 
- org.dom4j.tree.DefaultElement
- 
- org.dom4j.datatype.DatatypeElement
 
 
 
 
 
- 
- All Implemented Interfaces:
- com.sun.msv.datatype.SerializationContext,- java.io.Serializable,- java.lang.Cloneable,- Branch,- Element,- Node,- org.relaxng.datatype.ValidationContext
 
 public class DatatypeElement extends DefaultElement implements com.sun.msv.datatype.SerializationContext, org.relaxng.datatype.ValidationContext DatatypeElementrepresents an Element which supports the XML Schema Data Types specification.- See Also:
- Serialized Form
 
- 
- 
Field Summary- 
Fields inherited from class org.dom4j.tree.AbstractElementUSE_STRINGVALUE_SEPARATOR, VERBOSE_TOSTRING
 - 
Fields inherited from class org.dom4j.tree.AbstractBranchDEFAULT_CONTENT_LIST_SIZE
 - 
Fields inherited from class org.dom4j.tree.AbstractNodeNODE_TYPE_NAMES
 - 
Fields inherited from interface org.dom4j.NodeANY_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 SummaryConstructors Constructor Description DatatypeElement(QName qname, int attributeCount, com.sun.msv.datatype.xsd.XSDatatype type)DatatypeElement(QName qname, com.sun.msv.datatype.xsd.XSDatatype datatype)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ElementaddText(java.lang.String text)Adds a newTextnode with the given text to this element.java.lang.StringgetBaseUri()java.lang.ObjectgetData()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 asElement.getText()java.lang.StringgetNamespacePrefix(java.lang.String uri)com.sun.msv.datatype.xsd.XSDatatypegetXSDatatype()Returns the MSV XSDatatype for this nodeprotected voidchildAdded(Node node)Override to force lazy recreation of data objectprotected voidchildRemoved(Node node)Override to force lazy recreation of data objectbooleanisNotation(java.lang.String notationName)booleanisUnparsedEntity(java.lang.String entityName)java.lang.StringresolveNamespacePrefix(java.lang.String prefix)voidsetData(java.lang.Object data)Sets the data value of this element if this element supports data binding or callsNode.setText(java.lang.String)if it doesn'tvoidsetText(java.lang.String text)Sets the text data of this node or this method will throw anUnsupportedOperationExceptionif it is read-only.java.lang.StringtoString()protected voidvalidate(java.lang.String text)- 
Methods inherited from class org.dom4j.tree.DefaultElementadd, 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
 - 
Methods inherited from class org.dom4j.tree.AbstractElementaccept, 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
 - 
Methods inherited from class org.dom4j.tree.AbstractBranchaddElement, addElement, addElement, appendContent, content, contentRemoved, createContentList, createContentList, createEmptyList, createResultList, createSingleResultList, elementByID, elementID, getContentAsStringValue, getContentAsText, getTextTrim, hasContent, invalidNodeTypeAddException, isReadOnly, setProcessingInstructions
 - 
Methods inherited from class org.dom4j.tree.AbstractNodeasXPathResult, createPattern, createXPath, createXPathFilter, createXPathResult, detach, getNodeTypeName, getPath, getUniquePath, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOf
 - 
Methods inherited from class java.lang.Objectequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.dom4j.BranchaddElement, addElement, appendContent, content, elementByID, setProcessingInstructions
 - 
Methods inherited from interface org.dom4j.ElementgetTextTrim
 - 
Methods inherited from interface org.dom4j.NodeasXPathResult, createXPath, detach, getNodeTypeName, getPath, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOf
 
- 
 
- 
- 
- 
Method Detail- 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- AbstractElement
 
 - 
getXSDatatypepublic com.sun.msv.datatype.xsd.XSDatatype getXSDatatype() Returns the MSV XSDatatype for this node- Returns:
- DOCUMENT ME!
 
 - 
getNamespacePrefixpublic java.lang.String getNamespacePrefix(java.lang.String uri) - Specified by:
- getNamespacePrefixin interface- com.sun.msv.datatype.SerializationContext
 
 - 
getBaseUripublic java.lang.String getBaseUri() - Specified by:
- getBaseUriin interface- org.relaxng.datatype.ValidationContext
 
 - 
isNotationpublic boolean isNotation(java.lang.String notationName) - Specified by:
- isNotationin interface- org.relaxng.datatype.ValidationContext
 
 - 
isUnparsedEntitypublic boolean isUnparsedEntity(java.lang.String entityName) - Specified by:
- isUnparsedEntityin interface- org.relaxng.datatype.ValidationContext
 
 - 
resolveNamespacePrefixpublic java.lang.String resolveNamespacePrefix(java.lang.String prefix) - Specified by:
- resolveNamespacePrefixin interface- org.relaxng.datatype.ValidationContext
 
 - 
getDatapublic java.lang.Object getData() Description copied from interface:ElementAccesses 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 asElement.getText()- Specified by:
- getDatain interface- Element
- Overrides:
- getDatain class- AbstractElement
- Returns:
- DOCUMENT ME!
 
 - 
setDatapublic void setData(java.lang.Object data) Description copied from interface:ElementSets the data value of this element if this element supports data binding or callsNode.setText(java.lang.String)if it doesn't- Specified by:
- setDatain interface- Element
- Overrides:
- setDatain class- AbstractElement
- Parameters:
- data- DOCUMENT ME!
 
 - 
addTextpublic Element addText(java.lang.String text) Description copied from interface:ElementAdds a newTextnode with the given text to this element.- Specified by:
- addTextin interface- Element
- Overrides:
- addTextin class- AbstractElement
- Parameters:
- text- is the text for the- Textnode.
- Returns:
- this Elementinstance.
 
 - 
setTextpublic void setText(java.lang.String text) Description copied from interface:NodeSets the text data of this node or this method will throw an UnsupportedOperationExceptionif it is read-only.- Specified by:
- setTextin interface- Node
- Overrides:
- setTextin class- AbstractElement
- Parameters:
- text- is the new textual value of this node
 
 - 
childAddedprotected void childAdded(Node node) Override to force lazy recreation of data object- Overrides:
- childAddedin class- AbstractElement
- Parameters:
- node- DOCUMENT ME!
 
 - 
childRemovedprotected void childRemoved(Node node) Override to force lazy recreation of data object- Overrides:
- childRemovedin class- AbstractElement
- Parameters:
- node- DOCUMENT ME!
 
 - 
validateprotected void validate(java.lang.String text) throws java.lang.IllegalArgumentException- Throws:
- java.lang.IllegalArgumentException
 
 
- 
 
-