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.Object
DOCUMENT ME!
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ClassLoader
classloader
private java.lang.String
contextPath
private javax.xml.bind.JAXBContext
jaxbContext
private javax.xml.bind.Marshaller
marshaller
private javax.xml.bind.Unmarshaller
unmarshaller
-
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.JAXBContext
getContext()
private javax.xml.bind.Marshaller
getMarshaller()
private javax.xml.bind.Unmarshaller
getUnmarshaller()
protected Element
marshal(javax.xml.bind.Element element)
Marshals the givenElement
in to its DOM4J counterpart.protected javax.xml.bind.Element
unmarshal(Element element)
Unmarshalls the specified DOM4JElement
into aElement
-
-
-
Method Detail
-
marshal
protected Element marshal(javax.xml.bind.Element element) throws javax.xml.bind.JAXBException
Marshals the givenElement
in 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 DOM4JElement
into 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
-
-