|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jembi.sdmxhd.util.XMLBuilder
public class XMLBuilder
This class allow Java Bean object that conform to the following specification to be written to XML. It uses reflection to look at the class of the object to be written to XML and find what field are XML attributes and what are XML elements. It uses this information to then write the java bean to XML. Complex object contained within the java bean have their own toXML() methods called to write them to XML.
The bean must be annotated as follow for then to be written to XML:
Constructor Summary | |
---|---|
XMLBuilder()
|
Method Summary | |
---|---|
static void |
writeBeanToXML(XMLWritable bean,
javax.xml.stream.XMLStreamWriter xmlWriter)
Writes the specified object to XML |
static void |
writeBeanToXML(XMLWritable bean,
javax.xml.stream.XMLStreamWriter xmlWriter,
java.lang.String namespace)
Writes the specified object to XML |
static void |
writeBeanToXML(XMLWritable bean,
javax.xml.stream.XMLStreamWriter xmlWriter,
java.lang.String namespace,
java.lang.String name)
Writes the specified object to XML |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLBuilder()
Method Detail |
---|
public static void writeBeanToXML(XMLWritable bean, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException, java.lang.IllegalArgumentException, java.lang.IllegalAccessException
bean
- the object to be writtenxmlWriter
- the xmlWriter to write the XML to.
javax.xml.stream.XMLStreamException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
public static void writeBeanToXML(XMLWritable bean, javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException, java.lang.IllegalArgumentException, java.lang.IllegalAccessException
bean
- the object to be writtenxmlWriter
- the xmlWriter to write the XML to.
javax.xml.stream.XMLStreamException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
public static void writeBeanToXML(XMLWritable bean, javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace, java.lang.String name) throws javax.xml.stream.XMLStreamException, java.lang.IllegalArgumentException, java.lang.IllegalAccessException
bean
- the object to be writtenxmlWriter
- the xmlWriter to write the XML to.
javax.xml.stream.XMLStreamException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |