java.lang.Object
org.eclipse.persistence.jaxb.JAXBMarshaller
- All Implemented Interfaces:
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.1/2.2 Marshaller interface provides the required functionality by acting as a thin wrapper on the existing XMLMarshaller API.
- Since:
- Oracle TopLink 11.1.1.0.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.xml.bind.Marshaller
Marshaller.Listener
-
Field Summary
Fields inherited from interface jakarta.xml.bind.Marshaller
JAXB_ENCODING, JAXB_FORMATTED_OUTPUT, JAXB_FRAGMENT, JAXB_NO_NAMESPACE_SCHEMA_LOCATION, JAXB_SCHEMA_LOCATION
-
Constructor Summary
ConstructorDescriptionJAXBMarshaller
(XMLMarshaller newXMLMarshaller, JAXBContext jaxbContext) This constructor initializes various settings on the XML marshaller. -
Method Summary
Modifier and TypeMethodDescriptiongetAdapter
(Class javaClass) Returns constraint violations stored in the underlyingJAXBBeanValidator
instance.getProperty
(String key) Get a property from the JAXBMarshaller.void
void
marshal
(Object object, OutputStream outputStream) void
void
marshal
(Object object, XMLEventWriter eventWriter) void
marshal
(Object object, XMLEventWriter eventWriter, TypeMappingInfo type) void
marshal
(Object object, XMLStreamWriter streamWriter) void
marshal
(Object object, XMLStreamWriter streamWriter, TypeMappingInfo type) void
void
marshal
(Object object, Result result, TypeMappingInfo type) void
marshal
(Object object, MarshalRecord record) void
marshal
(Object object, MarshalRecord record, TypeMappingInfo type) void
void
marshal
(Object object, ContentHandler contentHandler) void
setAdapter
(XmlAdapter adapter) void
setAdapter
(Class javaClass, XmlAdapter adapter) void
setAttachmentMarshaller
(AttachmentMarshaller attachmentMarshaller) void
setEventHandler
(ValidationEventHandler newValidationEventHandler) void
setListener
(Marshaller.Listener listener) void
setMarshalCallbacks
(Map callbacks) void
setProperty
(String key, Object value) Set a property on the JAXBMarshaller.void
-
Field Details
-
XML_JAVATYPE_ADAPTERS
- See Also:
-
-
Constructor Details
-
JAXBMarshaller
This constructor initializes various settings on the XML marshaller.- Parameters:
newXMLMarshaller
- xml marshallerjaxbContext
- jaxb context
-
-
Method Details
-
getAdapter
- Specified by:
getAdapter
in interfaceMarshaller
-
getAttachmentMarshaller
- Specified by:
getAttachmentMarshaller
in interfaceMarshaller
-
getEventHandler
- Specified by:
getEventHandler
in interfaceMarshaller
- Throws:
JAXBException
-
getListener
- Specified by:
getListener
in interfaceMarshaller
-
getNode
- Specified by:
getNode
in interfaceMarshaller
- Throws:
JAXBException
-
getProperty
Get a property from the JAXBMarshaller. Attempting to get any unsupported property will result in a jakarta.xml.bind.PropertyException- Specified by:
getProperty
in interfaceMarshaller
- Throws:
PropertyException
- See Also:
-
getSchema
- Specified by:
getSchema
in interfaceMarshaller
-
marshal
- Specified by:
marshal
in interfaceMarshaller
- Throws:
JAXBException
-
marshal
- Specified by:
marshal
in interfaceMarshaller
- Throws:
JAXBException
-
marshal
public void marshal(Object object, XMLEventWriter eventWriter, TypeMappingInfo type) throws JAXBException - Throws:
JAXBException
-
marshal
- Specified by:
marshal
in interfaceMarshaller
- Throws:
JAXBException
-
marshal
- Specified by:
marshal
in interfaceMarshaller
- Throws:
JAXBException
-
marshal
- Specified by:
marshal
in interfaceMarshaller
- Throws:
JAXBException
-
marshal
- Specified by:
marshal
in interfaceMarshaller
- Throws:
JAXBException
-
marshal
- Throws:
JAXBException
-
marshal
- Specified by:
marshal
in interfaceMarshaller
- Throws:
JAXBException
-
marshal
public void marshal(Object object, XMLStreamWriter streamWriter, TypeMappingInfo type) throws JAXBException - Throws:
JAXBException
-
marshal
- Specified by:
marshal
in interfaceMarshaller
- Throws:
JAXBException
-
marshal
- Throws:
JAXBException
-
marshal
- Throws:
JAXBException
-
setAdapter
- Specified by:
setAdapter
in interfaceMarshaller
-
setAdapter
- Specified by:
setAdapter
in interfaceMarshaller
-
setAttachmentMarshaller
- Specified by:
setAttachmentMarshaller
in interfaceMarshaller
-
setEventHandler
- Specified by:
setEventHandler
in interfaceMarshaller
- Throws:
JAXBException
-
setListener
- Specified by:
setListener
in interfaceMarshaller
-
setMarshalCallbacks
-
setProperty
Set a property on the JAXBMarshaller. Attempting to set any unsupported property will result in a jakarta.xml.bind.PropertyException- Specified by:
setProperty
in interfaceMarshaller
- Throws:
PropertyException
- See Also:
-
setSchema
- Specified by:
setSchema
in interfaceMarshaller
-
getJaxbContext
-
getXMLMarshaller
-
getConstraintViolations
Returns constraint violations stored in the underlyingJAXBBeanValidator
instance.- Returns:
- set of constraint violations from last unmarshal
-