Interface SAXEventStream

All Known Implementing Classes:
SAXEventQueue

@Runtime public interface SAXEventStream
Storage for re-ified SAX events supporting look-ahead.
  • Method Details

    • lookaheadCharacters

      boolean lookaheadCharacters()
      Returns whether the next SAX event represents character data.
    • lookaheadStartElement

      boolean lookaheadStartElement(NamespaceName name)
      Returns whether the next SAX event is a certain start element event (= open element tag)
    • lookaheadStartElement

      boolean lookaheadStartElement(String name)
      Returns whether the next SAX event is a certain start element event (= open element tag)
    • lookaheadStartElement

      boolean lookaheadStartElement()
      Returns whether the next SAX event is any start element event (= open element tag)
    • matchStartElement

      Attributes matchStartElement(NamespaceName name) throws SAXEventStream.MatchException
      Consumes the first element (if it is the indicated start element) and returns its attribute set.
      Throws:
      SAXEventStream.MatchException
    • matchStartElement

      Attributes matchStartElement(String name) throws SAXEventStream.MatchException
      Consumes the first element (if it is the indicated start element) and returns its attribute set.
      Throws:
      SAXEventStream.MatchException
    • lookaheadEndElement

      boolean lookaheadEndElement(NamespaceName name)
      Returns whether the next SAX event is a certain end element event (= close element tag)
    • lookaheadEndElement

      boolean lookaheadEndElement(String name)
      Returns whether the next SAX event is a certain end element event (= close element tag)
    • lookaheadEndElement

      boolean lookaheadEndElement()
      Returns whether the next SAX event is any end element event (= close element tag)
    • matchEndElement

      void matchEndElement(NamespaceName name) throws SAXEventStream.MatchException
      Consumes the first element (if it is the indicated end element).
      Throws:
      SAXEventStream.MatchException
    • matchEndElement

      void matchEndElement(String name) throws SAXEventStream.MatchException
      Consumes the first element (if it is the indicated end element).
      Throws:
      SAXEventStream.MatchException
    • lookaheadEndDocument

      boolean lookaheadEndDocument()
      Returns whether the next SAX event is the "End of Document" element.
    • matchEndDocument

      void matchEndDocument() throws SAXEventStream.MatchException
      Consumes the first element (if it is the indicated end document element).
      Throws:
      SAXEventStream.MatchException
    • getNamespaceURI

      String getNamespaceURI()
      Returns the namespace URI of the current head, i.e. the next element to consume.
    • getLocalName

      String getLocalName()
      Returns the local name of the current head, i.e. the next element to consume.
    • getQualifiedName

      String getQualifiedName()
      Returns the qualified name of the current head, i.e. the next element to consume.
    • getNamespaceName

      NamespaceName getNamespaceName()
      Returns the namespace name of the current head, i.e. the next element to consume.
    • consume

      void consume()
      Consumes any event, and makes its successor the new head.
    • consumeCharacters

      String consumeCharacters()
      Consumes any chararcter data event, and returns the data.
    • consumedEthereals

      void consumedEthereals(SAXEventStream.EtherealMatcher matcher)
    • matchedEtherealLocation

      Location<XMLDocumentIdentifier> matchedEtherealLocation()
    • getLocation

      Delivers the location related to the next head element (tag or character data), Normally this should be the start of the textual representation of this element in the source text.
    • headToString

      String headToString()
      Returns the conventional textual representation of the current head. Raises Nullpointer Exception if no such exists.