Class AttributeBase

  • All Implemented Interfaces:
    javax.xml.stream.events.Attribute, javax.xml.stream.events.XMLEvent, javax.xml.stream.XMLStreamConstants
    Direct Known Subclasses:
    NamespaceBase

    public class AttributeBase
    extends EventBase
    implements javax.xml.stream.events.Attribute
    • Field Detail

      • _QName

        private javax.xml.namespace.QName _QName
      • _value

        private java.lang.String _value
      • _attributeType

        private java.lang.String _attributeType
      • _specified

        private boolean _specified
    • Constructor Detail

      • AttributeBase

        public AttributeBase()
      • AttributeBase

        public AttributeBase​(java.lang.String name,
                             java.lang.String value)
      • AttributeBase

        public AttributeBase​(javax.xml.namespace.QName qname,
                             java.lang.String value)
      • AttributeBase

        public AttributeBase​(java.lang.String prefix,
                             java.lang.String localName,
                             java.lang.String value)
      • AttributeBase

        public AttributeBase​(java.lang.String prefix,
                             java.lang.String namespaceURI,
                             java.lang.String localName,
                             java.lang.String value,
                             java.lang.String attributeType)
    • Method Detail

      • setName

        public void setName​(javax.xml.namespace.QName name)
      • getName

        public javax.xml.namespace.QName getName()
        Returns the QName for this attribute
        Specified by:
        getName in interface javax.xml.stream.events.Attribute
      • setValue

        public void setValue​(java.lang.String value)
      • getLocalName

        public java.lang.String getLocalName()
      • getValue

        public java.lang.String getValue()
        Gets the normalized value of this attribute
        Specified by:
        getValue in interface javax.xml.stream.events.Attribute
      • setAttributeType

        public void setAttributeType​(java.lang.String attributeType)
      • getDTDType

        public java.lang.String getDTDType()
        Gets the type of this attribute, default is the String "CDATA"
        Specified by:
        getDTDType in interface javax.xml.stream.events.Attribute
        Returns:
        the type as a String, default is "CDATA"
      • isSpecified

        public boolean isSpecified()
        A flag indicating whether this attribute was actually specified in the start-tag of its element, or was defaulted from the schema.
        Specified by:
        isSpecified in interface javax.xml.stream.events.Attribute
        Returns:
        returns true if this was specified in the start element
      • setSpecified

        public void setSpecified​(boolean isSpecified)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object