Class JAXBUnmarshaller

java.lang.Object
org.eclipse.persistence.jaxb.JAXBUnmarshaller
All Implemented Interfaces:
jakarta.xml.bind.Unmarshaller

public class JAXBUnmarshaller extends Object implements 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:
Author:
mmacivor
  • Field Details

  • Constructor Details

  • Method Details

    • getXMLUnmarshaller

      public XMLUnmarshaller getXMLUnmarshaller()
    • unmarshal

      public Object unmarshal(File file) throws jakarta.xml.bind.JAXBException
      Specified by:
      unmarshal in interface jakarta.xml.bind.Unmarshaller
      Throws:
      jakarta.xml.bind.JAXBException
    • unmarshal

      public Object unmarshal(InputStream inputStream) throws jakarta.xml.bind.JAXBException
      Specified by:
      unmarshal in interface jakarta.xml.bind.Unmarshaller
      Throws:
      jakarta.xml.bind.JAXBException
    • unmarshal

      public Object unmarshal(URL url) throws jakarta.xml.bind.JAXBException
      Specified by:
      unmarshal in interface jakarta.xml.bind.Unmarshaller
      Throws:
      jakarta.xml.bind.JAXBException
    • unmarshal

      public Object unmarshal(InputSource inputSource) throws jakarta.xml.bind.JAXBException
      Specified by:
      unmarshal in interface jakarta.xml.bind.Unmarshaller
      Throws:
      jakarta.xml.bind.JAXBException
    • unmarshal

      public Object unmarshal(Reader reader) throws jakarta.xml.bind.JAXBException
      Specified by:
      unmarshal in interface jakarta.xml.bind.Unmarshaller
      Throws:
      jakarta.xml.bind.JAXBException
    • unmarshal

      public Object unmarshal(Node node) throws jakarta.xml.bind.JAXBException
      Specified by:
      unmarshal in interface jakarta.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 interface jakarta.xml.bind.Unmarshaller
      Throws:
      jakarta.xml.bind.JAXBException
    • unmarshal

      public Object unmarshal(Source source) throws jakarta.xml.bind.JAXBException
      Specified by:
      unmarshal in interface jakarta.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 interface jakarta.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 interface jakarta.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

      public Object unmarshal(XMLStreamReader streamReader) throws jakarta.xml.bind.JAXBException
      Specified by:
      unmarshal in interface jakarta.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 interface jakarta.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

      public Object unmarshal(XMLEventReader eventReader) throws jakarta.xml.bind.JAXBException
      Specified by:
      unmarshal in interface jakarta.xml.bind.Unmarshaller
      Throws:
      jakarta.xml.bind.JAXBException
    • getUnmarshallerHandler

      public jakarta.xml.bind.UnmarshallerHandler getUnmarshallerHandler()
      Specified by:
      getUnmarshallerHandler in interface jakarta.xml.bind.Unmarshaller
    • setValidating

      public void setValidating(boolean validate) throws jakarta.xml.bind.JAXBException
      Specified by:
      setValidating in interface jakarta.xml.bind.Unmarshaller
      Throws:
      jakarta.xml.bind.JAXBException
    • isValidating

      public boolean isValidating() throws jakarta.xml.bind.JAXBException
      Specified by:
      isValidating in interface jakarta.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 interface jakarta.xml.bind.Unmarshaller
      Throws:
      jakarta.xml.bind.JAXBException
    • getEventHandler

      public jakarta.xml.bind.ValidationEventHandler getEventHandler() throws jakarta.xml.bind.JAXBException
      Specified by:
      getEventHandler in interface jakarta.xml.bind.Unmarshaller
      Throws:
      jakarta.xml.bind.JAXBException
    • setProperty

      public void setProperty(String key, Object value) throws jakarta.xml.bind.PropertyException
      Set a property on the JAXBUnmarshaller. Attempting to set any unsupported property will result in a jakarta.xml.bind.PropertyException.
      Specified by:
      setProperty in interface jakarta.xml.bind.Unmarshaller
      Throws:
      jakarta.xml.bind.PropertyException
      See Also:
    • getProperty

      public Object getProperty(String key) throws jakarta.xml.bind.PropertyException
      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 interface jakarta.xml.bind.Unmarshaller
      Throws:
      jakarta.xml.bind.PropertyException
      See Also:
    • getListener

      public jakarta.xml.bind.Unmarshaller.Listener getListener()
      Specified by:
      getListener in interface jakarta.xml.bind.Unmarshaller
    • setListener

      public void setListener(jakarta.xml.bind.Unmarshaller.Listener listener)
      Specified by:
      setListener in interface jakarta.xml.bind.Unmarshaller
    • getAdapter

      public jakarta.xml.bind.annotation.adapters.XmlAdapter getAdapter(Class javaClass)
      Specified by:
      getAdapter in interface jakarta.xml.bind.Unmarshaller
    • setAdapter

      public void setAdapter(Class javaClass, jakarta.xml.bind.annotation.adapters.XmlAdapter adapter)
      Specified by:
      setAdapter in interface jakarta.xml.bind.Unmarshaller
    • setAdapter

      public void setAdapter(jakarta.xml.bind.annotation.adapters.XmlAdapter adapter)
      Specified by:
      setAdapter in interface jakarta.xml.bind.Unmarshaller
    • setSchema

      public void setSchema(Schema schema)
      Specified by:
      setSchema in interface jakarta.xml.bind.Unmarshaller
    • getSchema

      public Schema getSchema()
      Specified by:
      getSchema in interface jakarta.xml.bind.Unmarshaller
    • getAttachmentUnmarshaller

      public jakarta.xml.bind.attachment.AttachmentUnmarshaller getAttachmentUnmarshaller()
      Specified by:
      getAttachmentUnmarshaller in interface jakarta.xml.bind.Unmarshaller
    • setAttachmentUnmarshaller

      public void setAttachmentUnmarshaller(jakarta.xml.bind.attachment.AttachmentUnmarshaller unmarshaller)
      Specified by:
      setAttachmentUnmarshaller in interface jakarta.xml.bind.Unmarshaller
    • setUnmarshalCallbacks

      public void setUnmarshalCallbacks(Map callbacks)
    • getJaxbContext

      public JAXBContext getJaxbContext()
    • getIDResolver

      public IDResolver getIDResolver()
      Return this Unmarshaller's custom IDResolver.
      Returns:
      the custom IDResolver, or null if one has not been specified.
      See Also:
    • setIDResolver

      public void setIDResolver(IDResolver idResolver)
      Set this Unmarshaller's custom IDResolver.
      See Also:
    • getConstraintViolations

      public Set<ConstraintViolationWrapper<Object>> getConstraintViolations()
      Returns constraint violations stored in the underlying JAXBBeanValidator instance.
      Returns:
      set of constraint violations from last unmarshal