Class EventAttribute

  • All Implemented Interfaces:
    Attribute
    Direct Known Subclasses:
    DocumentReader.Entry, PullReader.Entry, StreamReader.Entry

    abstract class EventAttribute
    extends java.lang.Object
    implements Attribute
    The EventAttribute object represents an attribute that is associated with an event node. An attribute is required to provide the name and value for the attribute, and optionally the namespace reference and prefix. For debugging purposes the source object from the internal XML provider can be acquired.
    • Constructor Summary

      Constructors 
      Constructor Description
      EventAttribute()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getPrefix()
      This is used to acquire the namespace prefix associated with this attribute.
      java.lang.String getReference()
      This is used to acquire the namespace reference that this attribute is in.
      java.lang.Object getSource()
      This is used to return the source of the attribute.
      boolean isReserved()
      This returns true if the attribute is reserved.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EventAttribute

        EventAttribute()
    • Method Detail

      • getPrefix

        public java.lang.String getPrefix()
        This is used to acquire the namespace prefix associated with this attribute. A prefix is used to qualify the attribute within a namespace. So, if this has a prefix then it should have a reference associated with it.
        Specified by:
        getPrefix in interface Attribute
        Returns:
        this returns the namespace prefix for the attribute
      • getReference

        public java.lang.String getReference()
        This is used to acquire the namespace reference that this attribute is in. A namespace is normally associated with an attribute if that attribute is prefixed with a known token. If there is no prefix then this will return null.
        Specified by:
        getReference in interface Attribute
        Returns:
        this provides the associated namespace reference
      • getSource

        public java.lang.Object getSource()
        This is used to return the source of the attribute. Depending on which provider was selected to parse the XML document an object for the internal parsers representation of this will be returned. This is useful for debugging purposes.
        Specified by:
        getSource in interface Attribute
        Returns:
        this will return the source object for this event
      • isReserved

        public boolean isReserved()
        This returns true if the attribute is reserved. An attribute is considered reserved if it begins with "xml" according to the namespaces in XML 1.0 specification. Such attributes are used for namespaces and other such details.
        Specified by:
        isReserved in interface Attribute
        Returns:
        this returns true if the attribute is reserved