Top Description Fields Constructors Methods
org.dom4j.jaxb

pack-priv abstract Class JAXBSupport

extends Object
Class Inheritance
Known Direct Subclasses
org.dom4j.jaxb.JAXBWriter, org.dom4j.jaxb.JAXBModifier, org.dom4j.jaxb.JAXBReader
Imports
java.io.StringReader, javax.xml.bind.JAXBContext, .JAXBException, .Marshaller, .Unmarshaller, javax.xml.transform.Source, javax.xml.transform.stream.StreamSource, org.dom4j.dom.DOMDocument

DOCUMENT ME!
Author
Wonne Keysers (Realsoftware.be)

Field Summary

Modifier and TypeField and Description
private ClassLoader
private String
private JAXBContext
private Marshaller
private Unmarshaller

Constructor Summary

AccessConstructor and Description
public
JAXBSupport(String contextPath)

public
JAXBSupport(String contextPath, ClassLoader classloader)

Method Summary

Modifier and TypeMethod and Description
private JAXBContext
private Marshaller
private Unmarshaller
protected Element

Returns:

the marshalled DOM4J org.dom4j.Element
marshal
(Element
JAXB Element to be marshalled
element
)

Marshals the given javax.xml.bind.Elementin to its DOM4J counterpart.

protected Element

Returns:

the unmarshalled JAXB object
unmarshal
(Element
the DOM4J element to unmarshall
element
)

Unmarshalls the specified DOM4J org.dom4j.Elementinto a javax.xml.bind.Element

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

classloaderback to summary
private ClassLoader classloader
contextPathback to summary
private String contextPath
jaxbContextback to summary
private JAXBContext jaxbContext
marshallerback to summary
private Marshaller marshaller
unmarshallerback to summary
private Unmarshaller unmarshaller

Constructor Detail

JAXBSupportback to summary
public JAXBSupport(String contextPath)
JAXBSupportback to summary
public JAXBSupport(String contextPath, ClassLoader classloader)

Method Detail

getContextback to summary
private JAXBContext getContext() throws JAXBException
getMarshallerback to summary
private Marshaller getMarshaller() throws JAXBException
getUnmarshallerback to summary
private Unmarshaller getUnmarshaller() throws JAXBException
marshalback to summary
protected Element marshal(Element element) throws JAXBException

Marshals the given javax.xml.bind.Elementin to its DOM4J counterpart.

Parameters
element:Element

JAXB Element to be marshalled

Returns:Element

the marshalled DOM4J org.dom4j.Element

Exceptions
JAXBException:
when an error occurs
unmarshalback to summary
protected Element unmarshal(Element element) throws JAXBException

Unmarshalls the specified DOM4J org.dom4j.Elementinto a javax.xml.bind.Element

Parameters
element:Element

the DOM4J element to unmarshall

Returns:Element

the unmarshalled JAXB object

Exceptions
JAXBException:
when an error occurs