Package org.eclipse.persistence.jaxb
Class JAXBUnmarshaller
java.lang.Object
org.eclipse.persistence.jaxb.JAXBUnmarshaller
- All Implemented Interfaces:
jakarta.xml.bind.Unmarshaller
INTERNAL:
Purpose:To Provide an implementation of the JAXB 2.0 Unmarshaller Interface
Responsibilities:
- Provide a JAXB wrapper on the XMLUnmarshaller API
- Perform XML to Object Conversions
This implementation of the JAXB 2.1/2.2 Unmarshaller interface provides the required functionality by acting as a thin wrapper on the existing XMLMarshaller API.
- See Also:
-
Unmarshaller
UnmarshallerProperties
XMLUnmarshaller
- Author:
- mmacivor
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.xml.bind.Unmarshaller
jakarta.xml.bind.Unmarshaller.Listener
-
Field Summary
-
Constructor Summary
ConstructorDescriptionJAXBUnmarshaller
(XMLUnmarshaller newXMLUnmarshaller, JAXBContext jaxbContext) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.xml.bind.annotation.adapters.XmlAdapter
getAdapter
(Class javaClass) jakarta.xml.bind.attachment.AttachmentUnmarshaller
Returns constraint violations stored in the underlyingJAXBBeanValidator
instance.jakarta.xml.bind.ValidationEventHandler
Return this Unmarshaller's custom IDResolver.jakarta.xml.bind.Unmarshaller.Listener
getProperty
(String key) Get a property from the JAXBMarshaller.jakarta.xml.bind.UnmarshallerHandler
boolean
void
setAdapter
(jakarta.xml.bind.annotation.adapters.XmlAdapter adapter) void
setAdapter
(Class javaClass, jakarta.xml.bind.annotation.adapters.XmlAdapter adapter) void
setAttachmentUnmarshaller
(jakarta.xml.bind.attachment.AttachmentUnmarshaller unmarshaller) void
setEventHandler
(jakarta.xml.bind.ValidationEventHandler newValidationEventHandler) void
setIDResolver
(IDResolver idResolver) Set this Unmarshaller's custom IDResolver.void
setListener
(jakarta.xml.bind.Unmarshaller.Listener listener) void
setProperty
(String key, Object value) Set a property on the JAXBUnmarshaller.void
void
setUnmarshalCallbacks
(Map callbacks) void
setValidating
(boolean validate) unmarshal
(InputStream inputStream) unmarshal
(XMLEventReader eventReader) jakarta.xml.bind.JAXBElement
unmarshal
(XMLEventReader eventReader, Class javaClass) jakarta.xml.bind.JAXBElement
unmarshal
(XMLEventReader eventReader, Type type) jakarta.xml.bind.JAXBElement
unmarshal
(XMLEventReader eventReader, TypeMappingInfo type) Unmarshal the object based on the binding metadata associated with the TypeMappingInfo.unmarshal
(XMLStreamReader streamReader) jakarta.xml.bind.JAXBElement
unmarshal
(XMLStreamReader streamReader, Class javaClass) jakarta.xml.bind.JAXBElement
unmarshal
(XMLStreamReader streamReader, Type type) jakarta.xml.bind.JAXBElement
unmarshal
(XMLStreamReader streamReader, TypeMappingInfo type) Unmarshal the object based on the binding metadata associated with the TypeMappingInfo.jakarta.xml.bind.JAXBElement
jakarta.xml.bind.JAXBElement
jakarta.xml.bind.JAXBElement
unmarshal
(Source source, TypeMappingInfo type) Unmarshal the object based on the binding metadata associated with the TypeMappingInfo.jakarta.xml.bind.JAXBElement
unmarshal
(InputSource inputSource)
-
Field Details
-
XML_JAVATYPE_ADAPTERS
- See Also:
-
STAX_SOURCE_CLASS_NAME
- See Also:
-
-
Constructor Details
-
JAXBUnmarshaller
-
-
Method Details
-
getXMLUnmarshaller
-
unmarshal
- Specified by:
unmarshal
in interfacejakarta.xml.bind.Unmarshaller
- Throws:
jakarta.xml.bind.JAXBException
-
unmarshal
- Specified by:
unmarshal
in interfacejakarta.xml.bind.Unmarshaller
- Throws:
jakarta.xml.bind.JAXBException
-
unmarshal
- Specified by:
unmarshal
in interfacejakarta.xml.bind.Unmarshaller
- Throws:
jakarta.xml.bind.JAXBException
-
unmarshal
- Specified by:
unmarshal
in interfacejakarta.xml.bind.Unmarshaller
- Throws:
jakarta.xml.bind.JAXBException
-
unmarshal
- Specified by:
unmarshal
in interfacejakarta.xml.bind.Unmarshaller
- Throws:
jakarta.xml.bind.JAXBException
-
unmarshal
- Specified by:
unmarshal
in interfacejakarta.xml.bind.Unmarshaller
- Throws:
jakarta.xml.bind.JAXBException
-
unmarshal
public jakarta.xml.bind.JAXBElement unmarshal(Node node, Class javaClass) throws jakarta.xml.bind.JAXBException - Specified by:
unmarshal
in interfacejakarta.xml.bind.Unmarshaller
- Throws:
jakarta.xml.bind.JAXBException
-
unmarshal
- Specified by:
unmarshal
in interfacejakarta.xml.bind.Unmarshaller
- Throws:
jakarta.xml.bind.JAXBException
-
unmarshal
public jakarta.xml.bind.JAXBElement unmarshal(Source source, Class javaClass) throws jakarta.xml.bind.JAXBException - Specified by:
unmarshal
in interfacejakarta.xml.bind.Unmarshaller
- Throws:
jakarta.xml.bind.JAXBException
-
unmarshal
public jakarta.xml.bind.JAXBElement unmarshal(Source source, Type type) throws jakarta.xml.bind.JAXBException - Throws:
jakarta.xml.bind.JAXBException
-
unmarshal
public jakarta.xml.bind.JAXBElement unmarshal(Source source, TypeMappingInfo type) throws jakarta.xml.bind.JAXBException Unmarshal the object based on the binding metadata associated with the TypeMappingInfo.- Throws:
jakarta.xml.bind.JAXBException
-
unmarshal
public jakarta.xml.bind.JAXBElement unmarshal(XMLStreamReader streamReader, Class javaClass) throws jakarta.xml.bind.JAXBException - Specified by:
unmarshal
in interfacejakarta.xml.bind.Unmarshaller
- Throws:
jakarta.xml.bind.JAXBException
-
unmarshal
public jakarta.xml.bind.JAXBElement unmarshal(XMLStreamReader streamReader, Type type) throws jakarta.xml.bind.JAXBException - Throws:
jakarta.xml.bind.JAXBException
-
unmarshal
public jakarta.xml.bind.JAXBElement unmarshal(XMLStreamReader streamReader, TypeMappingInfo type) throws jakarta.xml.bind.JAXBException Unmarshal the object based on the binding metadata associated with the TypeMappingInfo.- Throws:
jakarta.xml.bind.JAXBException
-
unmarshal
- Specified by:
unmarshal
in interfacejakarta.xml.bind.Unmarshaller
- Throws:
jakarta.xml.bind.JAXBException
-
unmarshal
public jakarta.xml.bind.JAXBElement unmarshal(XMLEventReader eventReader, Class javaClass) throws jakarta.xml.bind.JAXBException - Specified by:
unmarshal
in interfacejakarta.xml.bind.Unmarshaller
- Throws:
jakarta.xml.bind.JAXBException
-
unmarshal
public jakarta.xml.bind.JAXBElement unmarshal(XMLEventReader eventReader, Type type) throws jakarta.xml.bind.JAXBException - Throws:
jakarta.xml.bind.JAXBException
-
unmarshal
public jakarta.xml.bind.JAXBElement unmarshal(XMLEventReader eventReader, TypeMappingInfo type) throws jakarta.xml.bind.JAXBException Unmarshal the object based on the binding metadata associated with the TypeMappingInfo.- Throws:
jakarta.xml.bind.JAXBException
-
unmarshal
- Specified by:
unmarshal
in interfacejakarta.xml.bind.Unmarshaller
- Throws:
jakarta.xml.bind.JAXBException
-
getUnmarshallerHandler
public jakarta.xml.bind.UnmarshallerHandler getUnmarshallerHandler()- Specified by:
getUnmarshallerHandler
in interfacejakarta.xml.bind.Unmarshaller
-
setValidating
public void setValidating(boolean validate) throws jakarta.xml.bind.JAXBException - Specified by:
setValidating
in interfacejakarta.xml.bind.Unmarshaller
- Throws:
jakarta.xml.bind.JAXBException
-
isValidating
public boolean isValidating() throws jakarta.xml.bind.JAXBException- Specified by:
isValidating
in interfacejakarta.xml.bind.Unmarshaller
- Throws:
jakarta.xml.bind.JAXBException
-
setEventHandler
public void setEventHandler(jakarta.xml.bind.ValidationEventHandler newValidationEventHandler) throws jakarta.xml.bind.JAXBException - Specified by:
setEventHandler
in interfacejakarta.xml.bind.Unmarshaller
- Throws:
jakarta.xml.bind.JAXBException
-
getEventHandler
public jakarta.xml.bind.ValidationEventHandler getEventHandler() throws jakarta.xml.bind.JAXBException- Specified by:
getEventHandler
in interfacejakarta.xml.bind.Unmarshaller
- Throws:
jakarta.xml.bind.JAXBException
-
setProperty
Set a property on the JAXBUnmarshaller. Attempting to set any unsupported property will result in a jakarta.xml.bind.PropertyException.- Specified by:
setProperty
in interfacejakarta.xml.bind.Unmarshaller
- Throws:
jakarta.xml.bind.PropertyException
- See Also:
-
getProperty
Get a property from the JAXBMarshaller. Attempting to get any unsupported property will result in a jakarta.xml.bind.PropertyException See Supported Properties.- Specified by:
getProperty
in interfacejakarta.xml.bind.Unmarshaller
- Throws:
jakarta.xml.bind.PropertyException
- See Also:
-
getListener
public jakarta.xml.bind.Unmarshaller.Listener getListener()- Specified by:
getListener
in interfacejakarta.xml.bind.Unmarshaller
-
setListener
public void setListener(jakarta.xml.bind.Unmarshaller.Listener listener) - Specified by:
setListener
in interfacejakarta.xml.bind.Unmarshaller
-
getAdapter
- Specified by:
getAdapter
in interfacejakarta.xml.bind.Unmarshaller
-
setAdapter
- Specified by:
setAdapter
in interfacejakarta.xml.bind.Unmarshaller
-
setAdapter
public void setAdapter(jakarta.xml.bind.annotation.adapters.XmlAdapter adapter) - Specified by:
setAdapter
in interfacejakarta.xml.bind.Unmarshaller
-
setSchema
- Specified by:
setSchema
in interfacejakarta.xml.bind.Unmarshaller
-
getSchema
- Specified by:
getSchema
in interfacejakarta.xml.bind.Unmarshaller
-
getAttachmentUnmarshaller
public jakarta.xml.bind.attachment.AttachmentUnmarshaller getAttachmentUnmarshaller()- Specified by:
getAttachmentUnmarshaller
in interfacejakarta.xml.bind.Unmarshaller
-
setAttachmentUnmarshaller
public void setAttachmentUnmarshaller(jakarta.xml.bind.attachment.AttachmentUnmarshaller unmarshaller) - Specified by:
setAttachmentUnmarshaller
in interfacejakarta.xml.bind.Unmarshaller
-
setUnmarshalCallbacks
-
getJaxbContext
-
getIDResolver
Return this Unmarshaller's custom IDResolver.- Returns:
- the custom IDResolver, or null if one has not been specified.
- See Also:
-
setIDResolver
Set this Unmarshaller's custom IDResolver.- See Also:
-
getConstraintViolations
Returns constraint violations stored in the underlyingJAXBBeanValidator
instance.- Returns:
- set of constraint violations from last unmarshal
-