Class JAXBUnmarshaller

  • All Implemented Interfaces:
    javax.xml.bind.Unmarshaller

    public class JAXBUnmarshaller
    extends Object
    implements javax.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.

    Since:
    Oracle TopLink 11.1.1.0.0
    Author:
    mmacivor
    See Also:
    Unmarshaller, UnmarshallerProperties, XMLUnmarshaller
    • Method Detail

      • unmarshal

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

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

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

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

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

        public Object unmarshal​(Node node)
                         throws javax.xml.bind.JAXBException
        Specified by:
        unmarshal in interface javax.xml.bind.Unmarshaller
        Throws:
        javax.xml.bind.JAXBException
      • unmarshal

        public javax.xml.bind.JAXBElement unmarshal​(Node node,
                                                    Class javaClass)
                                             throws javax.xml.bind.JAXBException
        Specified by:
        unmarshal in interface javax.xml.bind.Unmarshaller
        Throws:
        javax.xml.bind.JAXBException
      • unmarshal

        public Object unmarshal​(Source source)
                         throws javax.xml.bind.JAXBException
        Specified by:
        unmarshal in interface javax.xml.bind.Unmarshaller
        Throws:
        javax.xml.bind.JAXBException
      • unmarshal

        public javax.xml.bind.JAXBElement unmarshal​(Source source,
                                                    Class javaClass)
                                             throws javax.xml.bind.JAXBException
        Specified by:
        unmarshal in interface javax.xml.bind.Unmarshaller
        Throws:
        javax.xml.bind.JAXBException
      • unmarshal

        public javax.xml.bind.JAXBElement unmarshal​(Source source,
                                                    Type type)
                                             throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • unmarshal

        public javax.xml.bind.JAXBElement unmarshal​(Source source,
                                                    TypeMappingInfo type)
                                             throws javax.xml.bind.JAXBException
        Unmarshal the object based on the binding metadata associated with the TypeMappingInfo.
        Throws:
        javax.xml.bind.JAXBException
      • unmarshal

        public javax.xml.bind.JAXBElement unmarshal​(XMLStreamReader streamReader,
                                                    Class javaClass)
                                             throws javax.xml.bind.JAXBException
        Specified by:
        unmarshal in interface javax.xml.bind.Unmarshaller
        Throws:
        javax.xml.bind.JAXBException
      • unmarshal

        public javax.xml.bind.JAXBElement unmarshal​(XMLStreamReader streamReader,
                                                    Type type)
                                             throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • unmarshal

        public javax.xml.bind.JAXBElement unmarshal​(XMLStreamReader streamReader,
                                                    TypeMappingInfo type)
                                             throws javax.xml.bind.JAXBException
        Unmarshal the object based on the binding metadata associated with the TypeMappingInfo.
        Throws:
        javax.xml.bind.JAXBException
      • unmarshal

        public Object unmarshal​(XMLStreamReader streamReader)
                         throws javax.xml.bind.JAXBException
        Specified by:
        unmarshal in interface javax.xml.bind.Unmarshaller
        Throws:
        javax.xml.bind.JAXBException
      • unmarshal

        public javax.xml.bind.JAXBElement unmarshal​(XMLEventReader eventReader,
                                                    Class javaClass)
                                             throws javax.xml.bind.JAXBException
        Specified by:
        unmarshal in interface javax.xml.bind.Unmarshaller
        Throws:
        javax.xml.bind.JAXBException
      • unmarshal

        public javax.xml.bind.JAXBElement unmarshal​(XMLEventReader eventReader,
                                                    Type type)
                                             throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • unmarshal

        public javax.xml.bind.JAXBElement unmarshal​(XMLEventReader eventReader,
                                                    TypeMappingInfo type)
                                             throws javax.xml.bind.JAXBException
        Unmarshal the object based on the binding metadata associated with the TypeMappingInfo.
        Throws:
        javax.xml.bind.JAXBException
      • unmarshal

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

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

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

        public boolean isValidating()
                             throws javax.xml.bind.JAXBException
        Specified by:
        isValidating in interface javax.xml.bind.Unmarshaller
        Throws:
        javax.xml.bind.JAXBException
      • setEventHandler

        public void setEventHandler​(javax.xml.bind.ValidationEventHandler newValidationEventHandler)
                             throws javax.xml.bind.JAXBException
        Specified by:
        setEventHandler in interface javax.xml.bind.Unmarshaller
        Throws:
        javax.xml.bind.JAXBException
      • getEventHandler

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

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

        public Object getProperty​(String key)
                           throws javax.xml.bind.PropertyException
        Get a property from the JAXBMarshaller. Attempting to get any unsupported property will result in a javax.xml.bind.PropertyException See Supported Properties.
        Specified by:
        getProperty in interface javax.xml.bind.Unmarshaller
        Throws:
        javax.xml.bind.PropertyException
        See Also:
        UnmarshallerProperties
      • getListener

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

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

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

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

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

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

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

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

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

        public void setUnmarshalCallbacks​(Map callbacks)
      • getIDResolver

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

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

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