public class AegisXMLStreamDataWriter extends AbstractAegisIoImpl implements AegisWriter<XMLStreamWriter>
aegisContext, context, properties, schema
Modifier and Type | Method and Description |
---|---|
void |
write(Object obj,
QName elementName,
boolean optional,
XMLStreamWriter output,
AegisType aegisType)
Write an object to the output.
|
void |
write(Object obj,
QName elementName,
boolean optional,
XMLStreamWriter output,
Type objectType)
Write an object to the sink, providing a
Type to specify
its type. |
getContext, setProperty, setSchema
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setProperty, setSchema
public void write(Object obj, QName elementName, boolean optional, XMLStreamWriter output, AegisType aegisType) throws Exception
write
in interface AegisWriter<XMLStreamWriter>
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 streamaegisType
- 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
.Exception
public void write(Object obj, QName elementName, boolean optional, XMLStreamWriter output, Type objectType) throws Exception
Type
to specify
its type.write
in interface AegisWriter<XMLStreamWriter>
obj
- the objectelementName
- XML element nameoptional
- true if null maps to no output at all.output
- where to put it.objectType
- A description of the type of the object.Exception
Apache CXF