Package org.dom4j.jaxb
Class JAXBSupport
- java.lang.Object
-
- org.dom4j.jaxb.JAXBSupport
-
- Direct Known Subclasses:
JAXBModifier,JAXBReader,JAXBWriter
abstract class JAXBSupport extends java.lang.ObjectDOCUMENT ME!
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ClassLoaderclassloaderprivate java.lang.StringcontextPathprivate javax.xml.bind.JAXBContextjaxbContextprivate javax.xml.bind.Marshallermarshallerprivate javax.xml.bind.Unmarshallerunmarshaller
-
Constructor Summary
Constructors Constructor Description JAXBSupport(java.lang.String contextPath)JAXBSupport(java.lang.String contextPath, java.lang.ClassLoader classloader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private javax.xml.bind.JAXBContextgetContext()private javax.xml.bind.MarshallergetMarshaller()private javax.xml.bind.UnmarshallergetUnmarshaller()protected Elementmarshal(javax.xml.bind.Element element)Marshals the givenElementin to its DOM4J counterpart.protected javax.xml.bind.Elementunmarshal(Element element)Unmarshalls the specified DOM4JElementinto aElement
-
-
-
Method Detail
-
marshal
protected Element marshal(javax.xml.bind.Element element) throws javax.xml.bind.JAXBException
Marshals the givenElementin to its DOM4J counterpart.- Parameters:
element- JAXB Element to be marshalled- Returns:
- the marshalled DOM4J
Element - Throws:
javax.xml.bind.JAXBException- when an error occurs
-
unmarshal
protected javax.xml.bind.Element unmarshal(Element element) throws javax.xml.bind.JAXBException
Unmarshalls the specified DOM4JElementinto aElement- Parameters:
element- the DOM4J element to unmarshall- Returns:
- the unmarshalled JAXB object
- Throws:
javax.xml.bind.JAXBException- when an error occurs
-
getMarshaller
private javax.xml.bind.Marshaller getMarshaller() throws javax.xml.bind.JAXBException- Throws:
javax.xml.bind.JAXBException
-
getUnmarshaller
private javax.xml.bind.Unmarshaller getUnmarshaller() throws javax.xml.bind.JAXBException- Throws:
javax.xml.bind.JAXBException
-
getContext
private javax.xml.bind.JAXBContext getContext() throws javax.xml.bind.JAXBException- Throws:
javax.xml.bind.JAXBException
-
-