Package eu.bandm.tools.util.xml
Interface SAXEventStream
- All Known Implementing Classes:
SAXEventQueue
public interface SAXEventStream
Storage for re-ified SAX events supporting look-ahead.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
static class
Raised by calls which expect definitely a certain tag. -
Method Summary
Modifier and TypeMethodDescriptionvoid
consume()
Consumes any event, and makes its successor the new head.Consumes any chararcter data event, and returns the data.void
Returns the local name of the current head, i.e.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.Returns the namespace name of the current head, i.e.Returns the namespace URI of the current head, i.e.Returns the qualified name of the current head, i.e.Returns the conventional textual representation of the current head.boolean
Returns whether the next SAX event represents character data.boolean
Returns whether the next SAX event is the "End of Document" element.boolean
Returns whether the next SAX event is any end element event (= close element tag)boolean
Returns whether the next SAX event is a certain end element event (= close element tag)boolean
lookaheadEndElement
(String name) Returns whether the next SAX event is a certain end element event (= close element tag)boolean
Returns whether the next SAX event is any start element event (= open element tag)boolean
Returns whether the next SAX event is a certain start element event (= open element tag)boolean
lookaheadStartElement
(String name) Returns whether the next SAX event is a certain start element event (= open element tag)void
Consumes the first element (if it is the indicated end document element).void
matchEndElement
(NamespaceName name) Consumes the first element (if it is the indicated end element).void
matchEndElement
(String name) Consumes the first element (if it is the indicated end element).Consumes the first element (if it is the indicated start element) and returns its attribute set.matchStartElement
(String name) Consumes the first element (if it is the indicated start element) and returns its attribute set.
-
Method Details
-
lookaheadCharacters
boolean lookaheadCharacters()Returns whether the next SAX event represents character data. -
lookaheadStartElement
Returns whether the next SAX event is a certain start element event (= open element tag) -
lookaheadStartElement
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
Consumes the first element (if it is the indicated start element) and returns its attribute set.- Throws:
SAXEventStream.MatchException
-
matchStartElement
Consumes the first element (if it is the indicated start element) and returns its attribute set.- Throws:
SAXEventStream.MatchException
-
lookaheadEndElement
Returns whether the next SAX event is a certain end element event (= close element tag) -
lookaheadEndElement
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
Consumes the first element (if it is the indicated end element).- Throws:
SAXEventStream.MatchException
-
matchEndElement
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
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
-
matchedEtherealLocation
Location<XMLDocumentIdentifier> matchedEtherealLocation() -
getLocation
Location<XMLDocumentIdentifier> 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.
-