Class BaseXMLEventReader
- java.lang.Object
-
- javax.xml.stream.util.EventReaderDelegate
-
- org.hibernate.boot.jaxb.internal.stax.BaseXMLEventReader
-
- All Implemented Interfaces:
Iterator<Object>
,XMLEventReader
- Direct Known Subclasses:
BufferedXMLEventReader
,FilteringXMLEventReader
public abstract class BaseXMLEventReader extends EventReaderDelegate
Base for XMLEventReader that implements thegetElementText()
andnextTag()
APIs in a way that is agnostic from the rest of the XMLEventReader implementation. Both will use the subclassesinternalNextEvent()
as the exclusive way to read events. Note, copied from the uPortal project by permission of author. See https://github.com/Jasig/uPortal/blob/master/uportal-war/src/main/java/org/jasig/portal/xml/stream/BaseXMLEventReader.java
-
-
Constructor Summary
Constructors Constructor Description BaseXMLEventReader(XMLEventReader reader)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
getElementText()
protected XMLEvent
getPreviousEvent()
protected abstract XMLEvent
internalNextEvent()
Subclass's version ofnextEvent()
, called bynext()
Object
next()
XMLEvent
nextEvent()
XMLEvent
nextTag()
-
Methods inherited from class javax.xml.stream.util.EventReaderDelegate
close, getParent, getProperty, hasNext, peek, remove, setParent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
BaseXMLEventReader
public BaseXMLEventReader(XMLEventReader reader)
-
-
Method Detail
-
internalNextEvent
protected abstract XMLEvent internalNextEvent() throws XMLStreamException
Subclass's version ofnextEvent()
, called bynext()
- Throws:
XMLStreamException
-
getPreviousEvent
protected final XMLEvent getPreviousEvent()
- Returns:
- The XMLEvent returned by the last call to
internalNextEvent()
-
nextEvent
public final XMLEvent nextEvent() throws XMLStreamException
- Specified by:
nextEvent
in interfaceXMLEventReader
- Overrides:
nextEvent
in classEventReaderDelegate
- Throws:
XMLStreamException
-
next
public final Object next()
- Specified by:
next
in interfaceIterator<Object>
- Overrides:
next
in classEventReaderDelegate
-
getElementText
public final String getElementText() throws XMLStreamException
- Specified by:
getElementText
in interfaceXMLEventReader
- Overrides:
getElementText
in classEventReaderDelegate
- Throws:
XMLStreamException
-
nextTag
public final XMLEvent nextTag() throws XMLStreamException
- Specified by:
nextTag
in interfaceXMLEventReader
- Overrides:
nextTag
in classEventReaderDelegate
- Throws:
XMLStreamException
-
-