Class 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

    DatatypeElement represents an Element which supports the XML Schema Data Types specification.

    See Also:
    Serialized Form
    • Constructor Detail

      • DatatypeElement

        public DatatypeElement(QName qname,
                               com.sun.msv.datatype.xsd.XSDatatype datatype)
      • DatatypeElement

        public DatatypeElement(QName qname,
                               int attributeCount,
                               com.sun.msv.datatype.xsd.XSDatatype type)
    • Method Detail

      • getXSDatatype

        public com.sun.msv.datatype.xsd.XSDatatype getXSDatatype()
        Returns the MSV XSDatatype for this node
        Returns:
        DOCUMENT ME!
      • getNamespacePrefix

        public java.lang.String getNamespacePrefix(java.lang.String uri)
        Specified by:
        getNamespacePrefix in interface com.sun.msv.datatype.SerializationContext
      • getBaseUri

        public java.lang.String getBaseUri()
        Specified by:
        getBaseUri in interface org.relaxng.datatype.ValidationContext
      • isNotation

        public boolean isNotation(java.lang.String notationName)
        Specified by:
        isNotation in interface org.relaxng.datatype.ValidationContext
      • isUnparsedEntity

        public boolean isUnparsedEntity(java.lang.String entityName)
        Specified by:
        isUnparsedEntity in interface org.relaxng.datatype.ValidationContext
      • resolveNamespacePrefix

        public java.lang.String resolveNamespacePrefix(java.lang.String prefix)
        Specified by:
        resolveNamespacePrefix in interface org.relaxng.datatype.ValidationContext
      • getData

        public java.lang.Object getData()
        Description copied from interface: Element
        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()
        Specified by:
        getData in interface Element
        Overrides:
        getData in class AbstractElement
        Returns:
        DOCUMENT ME!
      • addText

        public Element addText(java.lang.String text)
        Description copied from interface: Element
        Adds a new Text node with the given text to this element.
        Specified by:
        addText in interface Element
        Overrides:
        addText in class AbstractElement
        Parameters:
        text - is the text for the Text node.
        Returns:
        this Element instance.
      • setText

        public void setText(java.lang.String text)
        Description copied from interface: Node

        Sets the text data of this node or this method will throw an UnsupportedOperationException if it is read-only.

        Specified by:
        setText in interface Node
        Overrides:
        setText in class AbstractElement
        Parameters:
        text - is the new textual value of this node
      • childAdded

        protected void childAdded(Node node)
        Override to force lazy recreation of data object
        Overrides:
        childAdded in class AbstractElement
        Parameters:
        node - DOCUMENT ME!
      • childRemoved

        protected void childRemoved(Node node)
        Override to force lazy recreation of data object
        Overrides:
        childRemoved in class AbstractElement
        Parameters:
        node - DOCUMENT ME!
      • validate

        protected void validate(java.lang.String text)
                         throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException