org.dellroad.stuff.pobj
Class UpdatesXMLEventWriter

java.lang.Object
  extended by org.dellroad.stuff.xml.AnnotatedXMLEventWriter
      extended by org.dellroad.stuff.pobj.UpdatesXMLEventWriter
All Implemented Interfaces:
XMLEventConsumer, XMLEventWriter

public class UpdatesXMLEventWriter
extends AnnotatedXMLEventWriter

AnnotatedXMLEventWriter that inserts the schema update list into the document using an PersistentObjectSchemaUpdater.UPDATES_ELEMENT_NAME annotation element. Used by PersistentObjectSchemaUpdater.


Field Summary
 
Fields inherited from class org.dellroad.stuff.xml.AnnotatedXMLEventWriter
xmlEventFactory
 
Constructor Summary
UpdatesXMLEventWriter(XMLEventWriter inner, List<String> updates)
          Constructor.
 
Method Summary
protected  void addAnnotationElement()
          Add the annotation element.
 
Methods inherited from class org.dellroad.stuff.xml.AnnotatedXMLEventWriter
add, add, close, flush, getNamespaceContext, getPrefix, getTrailingSpace, setDefaultNamespace, setNamespaceContext, setPrefix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdatesXMLEventWriter

public UpdatesXMLEventWriter(XMLEventWriter inner,
                             List<String> updates)
Constructor.

Parameters:
inner - nested output
updates - list of updates to add
Throws:
IllegalArgumentException - if updates is null
Method Detail

addAnnotationElement

protected void addAnnotationElement()
                             throws XMLStreamException
Description copied from class: AnnotatedXMLEventWriter
Add the annotation element.

This method should add() the StartElement for the annotation element, followed by any nested content, and then lastly the EndElement for the annotation element.

Specified by:
addAnnotationElement in class AnnotatedXMLEventWriter
Throws:
XMLStreamException