|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.placidus.jaxb.JaxbHelper
public class JaxbHelper
| Field Summary | |
|---|---|
static javax.xml.bind.JAXBContext |
cvJAXBContext
|
static java.lang.String |
PACKAGE_PATH
package path for jaxb |
| Constructor Summary | |
|---|---|
JaxbHelper()
|
|
| Method Summary | |
|---|---|
static java.lang.Object |
cloneObject(java.lang.Object obj)
clones a given jaxb object by marshalling and unmarshalling |
static java.util.List |
cloneObjectList(java.util.List objList)
clones a given jaxb object list |
static javax.xml.bind.JAXBContext |
getJAXBContext()
To getJAXBContext, it will be initialized if it isnt already |
static java.lang.String |
marshall(java.lang.Object obj)
Converts obj to a string using JAXB. |
static java.lang.Object |
unmarshallFromFile(java.lang.String fileName)
calls unmarshallFromFile(String, boolean) with validate = false |
static java.lang.Object |
unmarshallFromFile(java.lang.String fileName,
boolean validate)
Unmarshalls inputfilename to a jaxb object. |
static java.lang.Object |
unmarshallFromInputSource(org.xml.sax.InputSource inputSource)
calls unmarshallFromInputSource(InputSource, boolean) with validate = false |
static java.lang.Object |
unmarshallFromInputSource(org.xml.sax.InputSource inputSource,
boolean validate)
Unmarshalls inputSource to a jaxb object. |
static java.lang.Object |
unmarshallFromInputStream(java.io.InputStream inputStream)
calls unmarshallFromInputStream(InputStream, boolean) with validate = false |
static java.lang.Object |
unmarshallFromInputStream(java.io.InputStream inputStream,
boolean validate)
Unmarshalls inputStream to a jaxb object. |
static java.lang.Object |
unmarshallFromSource(javax.xml.transform.Source source)
calls unmarshallFromSource(Source, boolean) with validate = false |
static java.lang.Object |
unmarshallFromSource(javax.xml.transform.Source source,
boolean validate)
Unmarshalls source to a jaxb object. |
static java.lang.Object |
unmarshallFromString(java.lang.String xmlString)
calls unmarshallFromString(String, boolean) with validate = false |
static java.lang.Object |
unmarshallFromString(java.lang.String xmlString,
boolean validate)
Unmarshalls XML input to a jaxb object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static javax.xml.bind.JAXBContext cvJAXBContext
public static java.lang.String PACKAGE_PATH
| Constructor Detail |
|---|
public JaxbHelper()
| Method Detail |
|---|
public static java.lang.String marshall(java.lang.Object obj)
throws javax.xml.bind.JAXBException
obj to a string using JAXB.
obj - the object to convert.
javax.xml.bind.JAXBException
public static java.lang.Object unmarshallFromString(java.lang.String xmlString)
throws javax.xml.bind.JAXBException
unmarshallFromString(String, boolean) with validate = false
javax.xml.bind.JAXBException
public static java.lang.Object unmarshallFromString(java.lang.String xmlString,
boolean validate)
throws javax.xml.bind.JAXBException
xmlString - An XML input
javax.xml.bind.JAXBException
public static java.lang.Object unmarshallFromFile(java.lang.String fileName)
throws javax.xml.bind.JAXBException,
java.io.FileNotFoundException
unmarshallFromFile(String, boolean) with validate = false
javax.xml.bind.JAXBException
java.io.FileNotFoundException
public static java.lang.Object unmarshallFromFile(java.lang.String fileName,
boolean validate)
throws javax.xml.bind.JAXBException,
java.io.FileNotFoundException
fileName - for input XML
javax.xml.bind.JAXBException
java.io.FileNotFoundException
public static java.lang.Object unmarshallFromSource(javax.xml.transform.Source source)
throws javax.xml.bind.JAXBException,
java.io.FileNotFoundException
unmarshallFromSource(Source, boolean) with validate = false
javax.xml.bind.JAXBException
java.io.FileNotFoundException
public static java.lang.Object unmarshallFromSource(javax.xml.transform.Source source,
boolean validate)
throws javax.xml.bind.JAXBException
source - for input XML
javax.xml.bind.JAXBException
public static java.lang.Object unmarshallFromInputStream(java.io.InputStream inputStream)
throws javax.xml.bind.JAXBException,
java.io.FileNotFoundException
unmarshallFromInputStream(InputStream, boolean) with validate = false
javax.xml.bind.JAXBException
java.io.FileNotFoundException
public static java.lang.Object unmarshallFromInputStream(java.io.InputStream inputStream,
boolean validate)
throws javax.xml.bind.JAXBException,
java.io.FileNotFoundException
inputStream - for input XML
javax.xml.bind.JAXBException
java.io.FileNotFoundException
public static java.lang.Object unmarshallFromInputSource(org.xml.sax.InputSource inputSource)
throws javax.xml.bind.JAXBException,
java.io.FileNotFoundException
unmarshallFromInputSource(InputSource, boolean) with validate = false
javax.xml.bind.JAXBException
java.io.FileNotFoundException
public static java.lang.Object unmarshallFromInputSource(org.xml.sax.InputSource inputSource,
boolean validate)
throws javax.xml.bind.JAXBException,
java.io.FileNotFoundException
inputSource - for input XML
javax.xml.bind.JAXBException
java.io.FileNotFoundExceptionpublic static javax.xml.bind.JAXBContext getJAXBContext()
public static java.util.List cloneObjectList(java.util.List objList)
throws javax.xml.bind.JAXBException
objList - to clone
javax.xml.bind.JAXBException - if marshall/unmarshall fails
public static java.lang.Object cloneObject(java.lang.Object obj)
throws javax.xml.bind.JAXBException
obj - to clone
javax.xml.bind.JAXBException - if marshall/unmarshall fails
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||