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,Serializable,Cloneable,Branch,Element,Node,org.relaxng.datatype.ValidationContext
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.
- Version:
- $Revision: 1.9 $
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ObjectThe data (Object) value of theAttributeprivate com.sun.msv.datatype.xsd.XSDatatypeTheXSDatatypeof theAttributeFields inherited from class org.dom4j.tree.AbstractElement
USE_STRINGVALUE_SEPARATOR, VERBOSE_TOSTRINGFields inherited from class org.dom4j.tree.AbstractBranch
DEFAULT_CONTENT_LIST_SIZEFields inherited from class org.dom4j.tree.AbstractNode
NODE_TYPE_NAMESFields inherited from interface org.dom4j.Node
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 Summary
ConstructorsConstructorDescriptionDatatypeElement(QName qname, int attributeCount, com.sun.msv.datatype.xsd.XSDatatype type) DatatypeElement(QName qname, com.sun.msv.datatype.xsd.XSDatatype datatype) -
Method Summary
Modifier and TypeMethodDescriptionAdds a newTextnode with the given text to this element.protected voidchildAdded(Node node) Override to force lazy recreation of data objectprotected voidchildRemoved(Node node) Override to force lazy recreation of data 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()getNamespacePrefix(String uri) com.sun.msv.datatype.xsd.XSDatatypeReturns the MSV XSDatatype for this nodebooleanisNotation(String notationName) booleanisUnparsedEntity(String entityName) resolveNamespacePrefix(String prefix) voidSets the data value of this element if this element supports data binding or callsNode.setText(java.lang.String)if it doesn'tvoidSets the text data of this node or this method will throw anUnsupportedOperationExceptionif it is read-only.toString()protected voidMethods inherited from class org.dom4j.tree.DefaultElement
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, supportsParentMethods inherited from class org.dom4j.tree.AbstractElement
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, writeMethods inherited from class org.dom4j.tree.AbstractBranch
addElement, addElement, addElement, appendContent, content, contentRemoved, createContentList, createContentList, createEmptyList, createResultList, createSingleResultList, elementByID, elementID, getContentAsStringValue, getContentAsText, getTextTrim, hasContent, invalidNodeTypeAddException, isReadOnly, setProcessingInstructionsMethods inherited from class org.dom4j.tree.AbstractNode
asXPathResult, createPattern, createXPath, createXPathFilter, createXPathResult, detach, getNodeTypeName, getPath, getUniquePath, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOfMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.dom4j.Branch
addElement, addElement, appendContent, content, elementByID, setProcessingInstructionsMethods inherited from interface org.dom4j.Element
getTextTrimMethods inherited from interface org.dom4j.Node
asXPathResult, createXPath, detach, getNodeTypeName, getPath, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOf
-
Field Details
-
datatype
private com.sun.msv.datatype.xsd.XSDatatype datatypeTheXSDatatypeof theAttribute -
data
The data (Object) value of theAttribute
-
-
Constructor Details
-
DatatypeElement
-
DatatypeElement
-
-
Method Details
-
toString
- Overrides:
toStringin classAbstractElement
-
getXSDatatype
public com.sun.msv.datatype.xsd.XSDatatype getXSDatatype()Returns the MSV XSDatatype for this node- Returns:
- DOCUMENT ME!
-
getNamespacePrefix
- Specified by:
getNamespacePrefixin interfacecom.sun.msv.datatype.SerializationContext
-
getBaseUri
- Specified by:
getBaseUriin interfaceorg.relaxng.datatype.ValidationContext
-
isNotation
- Specified by:
isNotationin interfaceorg.relaxng.datatype.ValidationContext
-
isUnparsedEntity
- Specified by:
isUnparsedEntityin interfaceorg.relaxng.datatype.ValidationContext
-
resolveNamespacePrefix
- Specified by:
resolveNamespacePrefixin interfaceorg.relaxng.datatype.ValidationContext
-
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 interfaceElement- Overrides:
getDatain classAbstractElement- Returns:
- DOCUMENT ME!
-
setData
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 interfaceElement- Overrides:
setDatain classAbstractElement- Parameters:
data- DOCUMENT ME!
-
addText
Description copied from interface:ElementAdds a newTextnode with the given text to this element.- Specified by:
addTextin interfaceElement- Overrides:
addTextin classAbstractElement- Parameters:
text- is the text for theTextnode.- Returns:
- this
Elementinstance.
-
setText
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 interfaceNode- Overrides:
setTextin classAbstractElement- Parameters:
text- is the new textual value of this node
-
childAdded
Override to force lazy recreation of data object- Overrides:
childAddedin classAbstractElement- Parameters:
node- DOCUMENT ME!
-
childRemoved
Override to force lazy recreation of data object- Overrides:
childRemovedin classAbstractElement- Parameters:
node- DOCUMENT ME!
-
validate
- Throws:
IllegalArgumentException
-