Apache CXF API

org.apache.cxf.aegis
Class AegisXMLStreamDataWriter

java.lang.Object
  extended by org.apache.cxf.aegis.AbstractAegisIoImpl
      extended by org.apache.cxf.aegis.AegisXMLStreamDataWriter
All Implemented Interfaces:
AegisIo, AegisWriter<javax.xml.stream.XMLStreamWriter>

public class AegisXMLStreamDataWriter
extends AbstractAegisIoImpl
implements AegisWriter<javax.xml.stream.XMLStreamWriter>


Field Summary
 
Fields inherited from class org.apache.cxf.aegis.AbstractAegisIoImpl
aegisContext, context, properties, schema
 
Method Summary
 void write(Object obj, QName elementName, boolean optional, javax.xml.stream.XMLStreamWriter output, AegisType aegisType)
          Write an object to the output.
 void write(Object obj, QName elementName, boolean optional, javax.xml.stream.XMLStreamWriter output, Type objectType)
          Write an object to the sink, providing a Type to specify its type.
 
Methods inherited from class org.apache.cxf.aegis.AbstractAegisIoImpl
getContext, setProperty, setSchema
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cxf.aegis.AegisIo
setProperty, setSchema
 

Method Detail

write

public void write(Object obj,
                  QName elementName,
                  boolean optional,
                  javax.xml.stream.XMLStreamWriter output,
                  AegisType aegisType)
           throws Exception
Write an object to the output. This method always writes xsi:type attributes.

Specified by:
write in interface AegisWriter<javax.xml.stream.XMLStreamWriter>
Parameters:
obj - The object to write.
elementName - the QName of the XML Element.
optional - set this for minOccurs = 0. It omits null elements.
output - the output stream
aegisType - the aegis type. This may be null if the object is non-null and the type of the object is covered in the mapping. Warning, for collections this will not do what you want, you must call the alternative version of write that takes a Type.
Throws:
Exception

write

public void write(Object obj,
                  QName elementName,
                  boolean optional,
                  javax.xml.stream.XMLStreamWriter output,
                  Type objectType)
           throws Exception
Write an object to the sink, providing a Type to specify its type.

Specified by:
write in interface AegisWriter<javax.xml.stream.XMLStreamWriter>
Parameters:
obj - the object
elementName - XML element name
optional - true if null maps to no output at all.
output - where to put it.
objectType - A description of the type of the object.
Throws:
Exception

Apache CXF API

Apache CXF