Package org.dellroad.stuff.pobj
Class UpdatesXMLStreamReader
java.lang.Object
javax.xml.stream.util.StreamReaderDelegate
org.dellroad.stuff.xml.AnnotatedXMLStreamReader
org.dellroad.stuff.pobj.UpdatesXMLStreamReader
- All Implemented Interfaces:
XMLStreamConstants
,XMLStreamReader
AnnotatedXMLStreamReader
that reads the nested schema update list. Used by PersistentObjectSchemaUpdater
.-
Field Summary
Fields inherited from interface javax.xml.stream.XMLStreamConstants
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the updates gleaned from the scan.protected boolean
readAnnotationElement
(XMLStreamReader reader) Determine if the givenXMLStreamReader
is positioned at the annotation element, and if so, read it.Methods inherited from class org.dellroad.stuff.xml.AnnotatedXMLStreamReader
next, nextTag
Methods inherited from class javax.xml.stream.util.StreamReaderDelegate
close, getAttributeCount, getAttributeLocalName, getAttributeName, getAttributeNamespace, getAttributePrefix, getAttributeType, getAttributeValue, getAttributeValue, getCharacterEncodingScheme, getElementText, getEncoding, getEventType, getLocalName, getLocation, getName, getNamespaceContext, getNamespaceCount, getNamespacePrefix, getNamespaceURI, getNamespaceURI, getNamespaceURI, getParent, getPIData, getPITarget, getPrefix, getProperty, getText, getTextCharacters, getTextCharacters, getTextLength, getTextStart, getVersion, hasName, hasNext, hasText, isAttributeSpecified, isCharacters, isEndElement, isStandalone, isStartElement, isWhiteSpace, require, setParent, standaloneSet
-
Constructor Details
-
UpdatesXMLStreamReader
-
-
Method Details
-
getUpdates
Get the updates gleaned from the scan.- Returns:
- list of updates, or null if the document didn't contain an updates element
-
readAnnotationElement
Description copied from class:AnnotatedXMLStreamReader
Determine if the givenXMLStreamReader
is positioned at the annotation element, and if so, read it.When this method is invoked, the
reader
's current event has typeXMLStreamConstants.START_ELEMENT
and may represent the start of the annotation element. If it doesn't, this method should not read any events and immediately return false. Otherwise, this method should read subsequent events up through the correspondingXMLStreamConstants.END_ELEMENT
event and return true. Upon return, thereader
's current event will have typeXMLStreamConstants.END_ELEMENT
.- Specified by:
readAnnotationElement
in classAnnotatedXMLStreamReader
- Parameters:
reader
- source from which the the annotation element is to be read, if found- Returns:
- true if the current event is the start of the annotation element and has been read, false otherwise
- Throws:
XMLStreamException
- if an XML parse error occurs
-