Enum SMEvent

java.lang.Object
java.lang.Enum<SMEvent>
org.codehaus.staxmate.in.SMEvent
All Implemented Interfaces:
Serializable, Comparable<SMEvent>, java.lang.constant.Constable

public enum SMEvent extends Enum<SMEvent>
  • Enum Constant Details

    • START_DOCUMENT

      public static final SMEvent START_DOCUMENT
    • END_DOCUMENT

      public static final SMEvent END_DOCUMENT
    • START_ELEMENT

      public static final SMEvent START_ELEMENT
    • END_ELEMENT

      public static final SMEvent END_ELEMENT
    • TEXT

      public static final SMEvent TEXT
    • CDATA

      public static final SMEvent CDATA
    • IGNORABLE_WS

      public static final SMEvent IGNORABLE_WS
    • COMMENT

      public static final SMEvent COMMENT
    • PROCESSING_INSTR

      public static final SMEvent PROCESSING_INSTR
    • DOCTYPE_DECL

      public static final SMEvent DOCTYPE_DECL
    • ENTITY_DECL

      public static final SMEvent ENTITY_DECL
    • ENTITY_REF

      public static final SMEvent ENTITY_REF
    • NOTATION_DECL

      public static final SMEvent NOTATION_DECL
    • ATTRIBUTE

      public static final SMEvent ATTRIBUTE
    • NAMESPACE_DECL

      public static final SMEvent NAMESPACE_DECL
    • UNKNOWN

      public static final SMEvent UNKNOWN
      This is a placeholder event which should never be encountered during normal operation. It is only used if an underlying event is of unrecognized type, ie. application-specific extension StaxMate is not aware of.
  • Method Details

    • values

      public static SMEvent[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static SMEvent valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getEventCode

      public int getEventCode()
      Returns:
      Underlying Stax 1.0 event code (int) that matches this event enumeration object.
    • isElementEvent

      public boolean isElementEvent()
      Returns:
      True, if the event is a start or end element event; false otherwise.
    • isTextualEvent

      public boolean isTextualEvent()
      Textual events are events that consist of regular document text content: ignorable white space, CDATA segments, and other text. For these types, XMLStreamReader.getText() methods can be called, and they can also be output using regular text output methods.

      Note that set of events for which this returns true is less than that of hasText(); since this only includes "true" textual events, not just events that have some associated text.

    • hasText

      public boolean hasText()
      This method returns true if it would be ok to call SMInputCursor.getText() of the iterator object, when it is positioned over this event.

      Note that set of events for which this returns true is bigger than for which XMLStreamReader.hasText() returns true; this because StaxMate has looser definition of contained text. For example, true will be returned for Processing Instructions, since the 'data' part of the processing instruction is considered to be text by StaxMate.

    • hasLocalName

      public boolean hasLocalName()
      This method returns true if it would be ok to call SMInputCursor.getLocalName() of the iterator object, when it is positioned over this event.
    • hasQName

      public boolean hasQName()
      This method returns true if it would be ok to call SMInputCursor.getQName() of the iterator object, when it is positioned over this event.