Enum PullProvider.Event

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ATOMIC_VALUE
      ATOMIC_VALUE is notified when the PullProvider is reading a sequence of items, and one of the items is an atomic value rather than a node.
      ATTRIBUTE
      The ATTRIBUTE event is notified only for an attribute node that appears in its own right as a top-level item in the sequence being read.
      COMMENT
      A COMMENT event is notified for a comment node, which may be either a top-level comment or one nested within an element or document node.
      END_DOCUMENT
      END_DOCUMENT is notified at the end of processing a document node, that is, after all the descendants of the document node have been notified.
      END_ELEMENT
      END_ELEMENT is notified at the end of an element node, that is, after all the children and descendants of the element have either been processed or skipped.
      END_OF_INPUT
      The END_OF_INPUT event is returned to indicate the end of the sequence being read.
      NAMESPACE
      The NAMESPACE event is notified only for a namespace node that appears in its own right as a top-level item in the sequence being read.
      PROCESSING_INSTRUCTION
      A PROCESSING_INSTRUCTION event is notified for a processing instruction node, which may be either a top-level comment or one nested within an element or document node.
      START_DOCUMENT
      START_DOCUMENT is notified when a document node is encountered.
      START_ELEMENT
      START_ELEMENT is notified when an element node is encountered.
      START_OF_INPUT
      START_OF_INPUT is the initial state when the PullProvider is instantiated.
      TEXT
      A TEXT event is notified for a text node.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static PullProvider.Event valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static PullProvider.Event[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • START_OF_INPUT

        public static final PullProvider.Event START_OF_INPUT
        START_OF_INPUT is the initial state when the PullProvider is instantiated. This event is never notified by the next() method, but it is returned from a call of current() prior to the first call on next().
      • ATOMIC_VALUE

        public static final PullProvider.Event ATOMIC_VALUE
        ATOMIC_VALUE is notified when the PullProvider is reading a sequence of items, and one of the items is an atomic value rather than a node. This will always be a top-level event (it will never be nested in Start/End Document or Start/End Element).
      • START_DOCUMENT

        public static final PullProvider.Event START_DOCUMENT
        START_DOCUMENT is notified when a document node is encountered. This will always be a top-level event (it will never be nested in Start/End Document or Start/End Element). Note however that multiple document nodes can occur in a sequence, and the start and end of each one will be notified.
      • END_DOCUMENT

        public static final PullProvider.Event END_DOCUMENT
        END_DOCUMENT is notified at the end of processing a document node, that is, after all the descendants of the document node have been notified. The event will always be preceded by the corresponding START_DOCUMENT event.
      • START_ELEMENT

        public static final PullProvider.Event START_ELEMENT
        START_ELEMENT is notified when an element node is encountered. This may either be a top-level element (an element node that participates in the sequence being read in its own right) or a nested element (reported because it is a descendant of an element or document node that participates in the sequence.)

        Following the notification of START_ELEMENT, the client may obtain information about the element node, such as its name and type annotation. The client may also call getAttributes() to obtain information about the attributes of the element node, and/or getNamespaceDeclarations() to get information about the namespace declarations. The client may then do one of the following:

        • Call skipToMatchingEnd() to move straight to the corresponding END_ELEMENT event (which will then be the current event)
        • Call next(), repeatedly, to be notified of events relating to the children and descendants of this element node
        • Call getStringValue() to obtain the string value of the element node, after which the next event notified will be the corresponding END_ELEMENT event
        • Call getTypedValue() to obtain the typed value of the element node, after which the next event notified will be the corresponding END_ELEMENT event
      • END_ELEMENT

        public static final PullProvider.Event END_ELEMENT
        END_ELEMENT is notified at the end of an element node, that is, after all the children and descendants of the element have either been processed or skipped. It may relate to a top-level element, or to a nested element. For an empty element (one with no children) the END_ELEMENT event will immediately follow the corresponding START_ELEMENT event. No information (such as the element name) is available after an END_ELEMENT event: if the client requires such information, it must remember it, typically on a Stack.
      • ATTRIBUTE

        public static final PullProvider.Event ATTRIBUTE
        The ATTRIBUTE event is notified only for an attribute node that appears in its own right as a top-level item in the sequence being read. ATTRIBUTE events are not notified for the attributes of an element that has been notified: such attributes must be read using the PullProvider.getAttributes() method.
      • NAMESPACE

        public static final PullProvider.Event NAMESPACE
        The NAMESPACE event is notified only for a namespace node that appears in its own right as a top-level item in the sequence being read. NAMESPACE events are not notified for the namespaces of an element that has been notified: such attributes must be read using the PullProvider.getNamespaceDeclarations() method.
      • TEXT

        public static final PullProvider.Event TEXT
        A TEXT event is notified for a text node. This may either be a top-level text node, or a text node nested within an element or document node. At the top level, text nodes may be zero-length and may be consecutive in the sequence being read. Nested within an element or document node, text nodes will never be zero-length, and adjacent text nodes will have been coalesced into one. (This might not always be true when reading third-party data models such as a DOM.) Whitespace-only text nodes will be notified unless something has been done (e.g. xsl:strip-space) to remove them.
      • COMMENT

        public static final PullProvider.Event COMMENT
        A COMMENT event is notified for a comment node, which may be either a top-level comment or one nested within an element or document node.
      • PROCESSING_INSTRUCTION

        public static final PullProvider.Event PROCESSING_INSTRUCTION
        A PROCESSING_INSTRUCTION event is notified for a processing instruction node, which may be either a top-level comment or one nested within an element or document node. As defined in the XPath data model, the "target" of a processing instruction is represented as the node name (which only has a local part, no prefix or URI), and the "data" of the processing instruction is represented as the string-value of the node.
      • END_OF_INPUT

        public static final PullProvider.Event END_OF_INPUT
        The END_OF_INPUT event is returned to indicate the end of the sequence being read. After this event, the result of any further calls on the next() method is undefined.
    • Method Detail

      • values

        public static PullProvider.Event[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (PullProvider.Event c : PullProvider.Event.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PullProvider.Event valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null