org.eclipse.persistence.jaxb
Class JAXBMarshaller
java.lang.Object
org.eclipse.persistence.jaxb.JAXBMarshaller
- All Implemented Interfaces:
- javax.xml.bind.Marshaller
public class JAXBMarshaller
- extends java.lang.Object
- implements javax.xml.bind.Marshaller
INTERNAL:
Purpose:To Provide an implementation of the JAXB 2.0 Marshaller Interface
Responsibilities:
- Provide a JAXB wrapper on the XMLMarshaller API
- Perform Object to XML Conversions
This implementation of the JAXB 2.0 Marshaller interface provides the required functionality
by acting as a thin wrapper on the existing XMLMarshaller API.
- See Also:
Marshaller
,
XMLMarshaller
- Author:
- mmacivor
- Since:
- Oracle TopLink 11.1.1.0.0
Nested classes/interfaces inherited from interface javax.xml.bind.Marshaller |
javax.xml.bind.Marshaller.Listener |
Fields inherited from interface javax.xml.bind.Marshaller |
JAXB_ENCODING, JAXB_FORMATTED_OUTPUT, JAXB_FRAGMENT, JAXB_NO_NAMESPACE_SCHEMA_LOCATION, JAXB_SCHEMA_LOCATION |
Constructor Summary |
JAXBMarshaller(XMLMarshaller newXMLMarshaller,
JAXBIntrospector newIntrospector)
This constructor initializes various settings on the XML marshaller, and
stores the provided JAXBIntrospector instance for usage in marshal()
calls. |
Method Summary |
javax.xml.bind.annotation.adapters.XmlAdapter |
getAdapter(java.lang.Class javaClass)
|
javax.xml.bind.attachment.AttachmentMarshaller |
getAttachmentMarshaller()
|
javax.xml.bind.ValidationEventHandler |
getEventHandler()
|
javax.xml.bind.Marshaller.Listener |
getListener()
|
org.w3c.dom.Node |
getNode(java.lang.Object object)
|
java.lang.Object |
getProperty(java.lang.String key)
|
javax.xml.validation.Schema |
getSchema()
|
void |
marshal(java.lang.Object object,
org.xml.sax.ContentHandler contentHandler)
|
void |
marshal(java.lang.Object object,
java.io.File file)
|
void |
marshal(java.lang.Object object,
org.w3c.dom.Node node)
|
void |
marshal(java.lang.Object object,
java.io.OutputStream outputStream)
|
void |
marshal(java.lang.Object object,
javax.xml.transform.Result result)
|
void |
marshal(java.lang.Object object,
java.io.Writer writer)
|
void |
marshal(java.lang.Object object,
javax.xml.stream.XMLEventWriter eventWriter)
|
void |
marshal(java.lang.Object object,
javax.xml.stream.XMLStreamWriter streamWriter)
|
void |
setAdapter(java.lang.Class javaClass,
javax.xml.bind.annotation.adapters.XmlAdapter adapter)
|
void |
setAdapter(javax.xml.bind.annotation.adapters.XmlAdapter adapter)
|
void |
setAttachmentMarshaller(javax.xml.bind.attachment.AttachmentMarshaller attachmentMarshaller)
|
void |
setEventHandler(javax.xml.bind.ValidationEventHandler newValidationEventHandler)
|
void |
setListener(javax.xml.bind.Marshaller.Listener listener)
|
void |
setMarshalCallbacks(java.util.HashMap callbacks)
|
void |
setProperty(java.lang.String key,
java.lang.Object value)
|
void |
setSchema(javax.xml.validation.Schema schema)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XML_JAVATYPE_ADAPTERS
public static final java.lang.String XML_JAVATYPE_ADAPTERS
- See Also:
- Constant Field Values
JAXBMarshaller
public JAXBMarshaller(XMLMarshaller newXMLMarshaller,
JAXBIntrospector newIntrospector)
- This constructor initializes various settings on the XML marshaller, and
stores the provided JAXBIntrospector instance for usage in marshal()
calls.
- Parameters:
newXMLMarshaller
- newIntrospector
-
getAdapter
public javax.xml.bind.annotation.adapters.XmlAdapter getAdapter(java.lang.Class javaClass)
- Specified by:
getAdapter
in interface javax.xml.bind.Marshaller
getAttachmentMarshaller
public javax.xml.bind.attachment.AttachmentMarshaller getAttachmentMarshaller()
- Specified by:
getAttachmentMarshaller
in interface javax.xml.bind.Marshaller
getEventHandler
public javax.xml.bind.ValidationEventHandler getEventHandler()
throws javax.xml.bind.JAXBException
- Specified by:
getEventHandler
in interface javax.xml.bind.Marshaller
- Throws:
javax.xml.bind.JAXBException
getListener
public javax.xml.bind.Marshaller.Listener getListener()
- Specified by:
getListener
in interface javax.xml.bind.Marshaller
getNode
public org.w3c.dom.Node getNode(java.lang.Object object)
throws javax.xml.bind.JAXBException
- Specified by:
getNode
in interface javax.xml.bind.Marshaller
- Throws:
javax.xml.bind.JAXBException
getProperty
public java.lang.Object getProperty(java.lang.String key)
throws javax.xml.bind.PropertyException
- Specified by:
getProperty
in interface javax.xml.bind.Marshaller
- Throws:
javax.xml.bind.PropertyException
getSchema
public javax.xml.validation.Schema getSchema()
- Specified by:
getSchema
in interface javax.xml.bind.Marshaller
marshal
public void marshal(java.lang.Object object,
org.xml.sax.ContentHandler contentHandler)
throws javax.xml.bind.JAXBException
- Specified by:
marshal
in interface javax.xml.bind.Marshaller
- Throws:
javax.xml.bind.JAXBException
marshal
public void marshal(java.lang.Object object,
javax.xml.stream.XMLEventWriter eventWriter)
throws javax.xml.bind.JAXBException
- Specified by:
marshal
in interface javax.xml.bind.Marshaller
- Throws:
javax.xml.bind.JAXBException
marshal
public void marshal(java.lang.Object object,
org.w3c.dom.Node node)
throws javax.xml.bind.JAXBException
- Specified by:
marshal
in interface javax.xml.bind.Marshaller
- Throws:
javax.xml.bind.JAXBException
marshal
public void marshal(java.lang.Object object,
java.io.OutputStream outputStream)
throws javax.xml.bind.JAXBException
- Specified by:
marshal
in interface javax.xml.bind.Marshaller
- Throws:
javax.xml.bind.JAXBException
marshal
public void marshal(java.lang.Object object,
java.io.File file)
throws javax.xml.bind.JAXBException
- Specified by:
marshal
in interface javax.xml.bind.Marshaller
- Throws:
javax.xml.bind.JAXBException
marshal
public void marshal(java.lang.Object object,
javax.xml.transform.Result result)
throws javax.xml.bind.JAXBException
- Specified by:
marshal
in interface javax.xml.bind.Marshaller
- Throws:
javax.xml.bind.JAXBException
marshal
public void marshal(java.lang.Object object,
javax.xml.stream.XMLStreamWriter streamWriter)
throws javax.xml.bind.JAXBException
- Specified by:
marshal
in interface javax.xml.bind.Marshaller
- Throws:
javax.xml.bind.JAXBException
marshal
public void marshal(java.lang.Object object,
java.io.Writer writer)
throws javax.xml.bind.JAXBException
- Specified by:
marshal
in interface javax.xml.bind.Marshaller
- Throws:
javax.xml.bind.JAXBException
setAdapter
public void setAdapter(java.lang.Class javaClass,
javax.xml.bind.annotation.adapters.XmlAdapter adapter)
- Specified by:
setAdapter
in interface javax.xml.bind.Marshaller
setAdapter
public void setAdapter(javax.xml.bind.annotation.adapters.XmlAdapter adapter)
- Specified by:
setAdapter
in interface javax.xml.bind.Marshaller
setAttachmentMarshaller
public void setAttachmentMarshaller(javax.xml.bind.attachment.AttachmentMarshaller attachmentMarshaller)
- Specified by:
setAttachmentMarshaller
in interface javax.xml.bind.Marshaller
setEventHandler
public void setEventHandler(javax.xml.bind.ValidationEventHandler newValidationEventHandler)
throws javax.xml.bind.JAXBException
- Specified by:
setEventHandler
in interface javax.xml.bind.Marshaller
- Throws:
javax.xml.bind.JAXBException
setListener
public void setListener(javax.xml.bind.Marshaller.Listener listener)
- Specified by:
setListener
in interface javax.xml.bind.Marshaller
setMarshalCallbacks
public void setMarshalCallbacks(java.util.HashMap callbacks)
setProperty
public void setProperty(java.lang.String key,
java.lang.Object value)
throws javax.xml.bind.PropertyException
- Specified by:
setProperty
in interface javax.xml.bind.Marshaller
- Throws:
javax.xml.bind.PropertyException
setSchema
public void setSchema(javax.xml.validation.Schema schema)
- Specified by:
setSchema
in interface javax.xml.bind.Marshaller