| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!--NewPage--> |
| <HTML> |
| <HEAD> |
| <!-- Generated by javadoc (build 1.6.0) on Fri Oct 16 14:57:21 EDT 2009 --> |
| <TITLE> |
| Unmarshaller (EclipseLink 1.2.0, build 'v20091016-r5565' API Reference) |
| </TITLE> |
| |
| <META NAME="date" CONTENT="2009-10-16"> |
| |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> |
| |
| <SCRIPT type="text/javascript"> |
| function windowTitle() |
| { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Unmarshaller (EclipseLink 1.2.0, build 'v20091016-r5565' API Reference)"; |
| } |
| } |
| </SCRIPT> |
| <NOSCRIPT> |
| </NOSCRIPT> |
| |
| </HEAD> |
| |
| <BODY BGCOLOR="white" onload="windowTitle();"> |
| <HR> |
| |
| |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <A NAME="navbar_top"><!-- --></A> |
| <A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../serialized-form.html"><FONT CLASS="NavBarFont1"><B>Serialized</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| EclipseLink 1.2.0, build 'v20091016-r5565' API Reference</EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind"><B>PREV CLASS</B></A> |
| <A HREF="../../../javax/xml/bind/Unmarshaller.Listener.html" title="class in javax.xml.bind"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../index.html?javax/xml/bind/Unmarshaller.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="Unmarshaller.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_top"></A> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| |
| <HR> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <H2> |
| <FONT SIZE="-1"> |
| javax.xml.bind</FONT> |
| <BR> |
| Interface Unmarshaller</H2> |
| <DL> |
| <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html" title="class in javax.xml.bind.helpers">AbstractUnmarshallerImpl</A>, <A HREF="../../../org/eclipse/persistence/jaxb/JAXBUnmarshaller.html" title="class in org.eclipse.persistence.jaxb">JAXBUnmarshaller</A></DD> |
| </DL> |
| <HR> |
| <DL> |
| <DT><PRE>public interface <B>Unmarshaller</B></DL> |
| </PRE> |
| |
| <P> |
| The <tt>Unmarshaller</tt> class governs the process of deserializing XML |
| data into newly created Java content trees, optionally validating the XML |
| data as it is unmarshalled. It provides an overloading of unmarshal methods |
| for many different input kinds. |
| |
| <p> |
| Unmarshalling from a File: |
| <blockquote> |
| <pre> |
| JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" ); |
| Unmarshaller u = jc.createUnmarshaller(); |
| Object o = u.unmarshal( new File( "nosferatu.xml" ) ); |
| </pre> |
| </blockquote> |
| |
| |
| <p> |
| Unmarshalling from an InputStream: |
| <blockquote> |
| <pre> |
| InputStream is = new FileInputStream( "nosferatu.xml" ); |
| JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" ); |
| Unmarshaller u = jc.createUnmarshaller(); |
| Object o = u.unmarshal( is ); |
| </pre> |
| </blockquote> |
| |
| <p> |
| Unmarshalling from a URL: |
| <blockquote> |
| <pre> |
| JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" ); |
| Unmarshaller u = jc.createUnmarshaller(); |
| URL url = new URL( "http://beaker.east/nosferatu.xml" ); |
| Object o = u.unmarshal( url ); |
| </pre> |
| </blockquote> |
| |
| <p> |
| Unmarshalling from a StringBuffer using a |
| <tt>javax.xml.transform.stream.StreamSource</tt>: |
| <blockquote> |
| <pre> |
| JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" ); |
| Unmarshaller u = jc.createUnmarshaller(); |
| StringBuffer xmlStr = new StringBuffer( "<?xml version="1.0"?>..." ); |
| Object o = u.unmarshal( new StreamSource( new StringReader( xmlStr.toString() ) ) ); |
| </pre> |
| </blockquote> |
| |
| <p> |
| Unmarshalling from a <tt>org.w3c.dom.Node</tt>: |
| <blockquote> |
| <pre> |
| JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" ); |
| Unmarshaller u = jc.createUnmarshaller(); |
| |
| DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); |
| dbf.setNamespaceAware(true); |
| DocumentBuilder db = dbf.newDocumentBuilder(); |
| Document doc = db.parse(new File( "nosferatu.xml")); |
| |
| Object o = u.unmarshal( doc ); |
| </pre> |
| </blockquote> |
| |
| <p> |
| Unmarshalling from a <tt>javax.xml.transform.sax.SAXSource</tt> using a |
| client specified validating SAX2.0 parser: |
| <blockquote> |
| <pre> |
| // configure a validating SAX2.0 parser (Xerces2) |
| static final String JAXP_SCHEMA_LANGUAGE = |
| "http://java.sun.com/xml/jaxp/properties/schemaLanguage"; |
| static final String JAXP_SCHEMA_LOCATION = |
| "http://java.sun.com/xml/jaxp/properties/schemaSource"; |
| static final String W3C_XML_SCHEMA = |
| "http://www.w3.org/2001/XMLSchema"; |
| |
| System.setProperty( "javax.xml.parsers.SAXParserFactory", |
| "org.apache.xerces.jaxp.SAXParserFactoryImpl" ); |
| |
| SAXParserFactory spf = SAXParserFactory.newInstance(); |
| spf.setNamespaceAware(true); |
| spf.setValidating(true); |
| SAXParser saxParser = spf.newSAXParser(); |
| |
| try { |
| saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA); |
| saxParser.setProperty(JAXP_SCHEMA_LOCATION, "http://...."); |
| } catch (SAXNotRecognizedException x) { |
| // exception handling omitted |
| } |
| |
| XMLReader xmlReader = saxParser.getXMLReader(); |
| SAXSource source = |
| new SAXSource( xmlReader, new InputSource( "http://..." ) ); |
| |
| // Setup JAXB to unmarshal |
| JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" ); |
| Unmarshaller u = jc.createUnmarshaller(); |
| ValidationEventCollector vec = new ValidationEventCollector(); |
| u.setEventHandler( vec ); |
| |
| // turn off the JAXB provider's default validation mechanism to |
| // avoid duplicate validation |
| u.setValidating( false ) |
| |
| // unmarshal |
| Object o = u.unmarshal( source ); |
| |
| // check for events |
| if( vec.hasEvents() ) { |
| // iterate over events |
| } |
| </pre> |
| </blockquote> |
| |
| <p> |
| Unmarshalling from a StAX XMLStreamReader: |
| <blockquote> |
| <pre> |
| JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" ); |
| Unmarshaller u = jc.createUnmarshaller(); |
| |
| javax.xml.stream.XMLStreamReader xmlStreamReader = |
| javax.xml.stream.XMLInputFactory().newInstance().createXMLStreamReader( ... ); |
| |
| Object o = u.unmarshal( xmlStreamReader ); |
| </pre> |
| </blockquote> |
| |
| <p> |
| Unmarshalling from a StAX XMLEventReader: |
| <blockquote> |
| <pre> |
| JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" ); |
| Unmarshaller u = jc.createUnmarshaller(); |
| |
| javax.xml.stream.XMLEventReader xmlEventReader = |
| javax.xml.stream.XMLInputFactory().newInstance().createXMLEventReader( ... ); |
| |
| Object o = u.unmarshal( xmlEventReader ); |
| </pre> |
| </blockquote> |
| |
| <p> |
| <a name="unmarshalEx"></a> |
| <b>Unmarshalling XML Data</b><br> |
| <blockquote> |
| Unmarshalling can deserialize XML data that represents either an entire XML document |
| or a subtree of an XML document. Typically, it is sufficient to use the |
| unmarshalling methods described by |
| <a href="#unmarshalGlobal">Unmarshal root element that is declared globally</a>. |
| These unmarshal methods utilize <A HREF="../../../javax/xml/bind/JAXBContext.html" title="class in javax.xml.bind"><CODE>JAXBContext</CODE></A>'s mapping of global XML element |
| declarations and type definitions to JAXB mapped classes to initiate the |
| unmarshalling of the root element of XML data. When the <A HREF="../../../javax/xml/bind/JAXBContext.html" title="class in javax.xml.bind"><CODE>JAXBContext</CODE></A>'s |
| mappings are not sufficient to unmarshal the root element of XML data, |
| the application can assist the unmarshalling process by using the |
| <a href="#unmarshalByDeclaredType">unmarshal by declaredType methods</a>. |
| These methods are useful for unmarshalling XML data where |
| the root element corresponds to a local element declaration in the schema. |
| </blockquote> |
| |
| <blockquote> |
| An unmarshal method never returns null. If the unmarshal process is unable to unmarshal |
| the root of XML content to a JAXB mapped object, a fatal error is reported that |
| terminates processing by throwing JAXBException. |
| </blockquote> |
| |
| <p> |
| <a name="unmarshalGlobal"></a> |
| <b>Unmarshal a root element that is globally declared</b><br> |
| <blockquote> |
| The unmarshal methods that do not have an <tt>declaredType</tt> parameter use |
| <A HREF="../../../javax/xml/bind/JAXBContext.html" title="class in javax.xml.bind"><CODE>JAXBContext</CODE></A> to unmarshal the root element of an XML data. The <A HREF="../../../javax/xml/bind/JAXBContext.html" title="class in javax.xml.bind"><CODE>JAXBContext</CODE></A> |
| instance is the one that was used to create this <tt>Unmarshaller</tt>. The <A HREF="../../../javax/xml/bind/JAXBContext.html" title="class in javax.xml.bind"><CODE>JAXBContext</CODE></A> |
| instance maintains a mapping of globally declared XML element and type definition names to |
| JAXB mapped classes. The unmarshal method checks if <A HREF="../../../javax/xml/bind/JAXBContext.html" title="class in javax.xml.bind"><CODE>JAXBContext</CODE></A> has a mapping |
| from the root element's XML name and/or <tt>@xsi:type</tt> to a JAXB mapped class. If it does, it umarshalls the |
| XML data using the appropriate JAXB mapped class. Note that when the root element name is unknown and the root |
| element has an <tt>@xsi:type</tt>, the XML data is unmarshalled |
| using that JAXB mapped class as the value of a <A HREF="../../../javax/xml/bind/JAXBElement.html" title="class in javax.xml.bind"><CODE>JAXBElement</CODE></A>. |
| When the <A HREF="../../../javax/xml/bind/JAXBContext.html" title="class in javax.xml.bind"><CODE>JAXBContext</CODE></A> object does not have a mapping for the root element's name |
| nor its <tt>@xsi:type</tt>, if it exists, |
| then the unmarshal operation will abort immediately by throwing a <A HREF="../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind"><CODE>UnmarshalException</CODE></A>. This exception scenario can be worked around by using the unmarshal by |
| declaredType methods described in the next subsection. |
| </blockquote> |
| |
| <p> |
| <a name="unmarshalByDeclaredType"></a> |
| <b>Unmarshal by Declared Type</b><br> |
| <blockquote> |
| The unmarshal methods with a <code>declaredType</code> parameter enable an |
| application to deserialize a root element of XML data, even when |
| there is no mapping in <A HREF="../../../javax/xml/bind/JAXBContext.html" title="class in javax.xml.bind"><CODE>JAXBContext</CODE></A> of the root element's XML name. |
| The unmarshaller unmarshals the root element using the application provided |
| mapping specified as the <tt>declaredType</tt> parameter. |
| Note that even when the root element's element name is mapped by <A HREF="../../../javax/xml/bind/JAXBContext.html" title="class in javax.xml.bind"><CODE>JAXBContext</CODE></A>, |
| the <code>declaredType</code> parameter overrides that mapping for |
| deserializing the root element when using these unmarshal methods. |
| Additionally, when the root element of XML data has an <tt>xsi:type</tt> attribute and |
| that attribute's value references a type definition that is mapped |
| to a JAXB mapped class by <A HREF="../../../javax/xml/bind/JAXBContext.html" title="class in javax.xml.bind"><CODE>JAXBContext</CODE></A>, that the root |
| element's <tt>xsi:type</tt> attribute takes |
| precedence over the unmarshal methods <tt>declaredType</tt> parameter. |
| These methods always return a <tt>JAXBElement<declaredType></tt> |
| instance. The table below shows how the properties of the returned JAXBElement |
| instance are set. |
| |
| <a name="unmarshalDeclaredTypeReturn"></a> |
| <p> |
| <table border="2" rules="all" cellpadding="4"> |
| <thead> |
| <tr> |
| <th align="center" colspan="2"> |
| Unmarshal By Declared Type returned JAXBElement |
| </tr> |
| <tr> |
| <th>JAXBElement Property</th> |
| <th>Value</th> |
| </tr> |
| </tr> |
| <tr> |
| <td>name</td> |
| <td><code>xml element name</code></td> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td>value</td> |
| <td><code>instanceof declaredType</code></td> |
| </tr> |
| <tr> |
| <td>declaredType</td> |
| <td>unmarshal method <code>declaredType</code> parameter</td> |
| </tr> |
| <tr> |
| <td>scope</td> |
| <td><code>null</code> <i>(actual scope is unknown)</td> |
| </tr> |
| </tbody> |
| </table> |
| </blockquote> |
| |
| <p> |
| The following is an example of |
| <a href="#unmarshalByDeclaredType">unmarshal by declaredType method</a>. |
| <p> |
| Unmarshal by declaredType from a <tt>org.w3c.dom.Node</tt>: |
| <blockquote> |
| <pre> |
| Schema fragment for example |
| <xs:schema> |
| <xs:complexType name="FooType">...<\xs:complexType> |
| <!-- global element declaration "PurchaseOrder" --> |
| <xs:element name="PurchaseOrder"> |
| <xs:complexType> |
| <xs:sequence> |
| <!-- local element declaration "foo" --> |
| <xs:element name="foo" type="FooType"/> |
| ... |
| </xs:sequence> |
| </xs:complexType> |
| </xs:element> |
| </xs:schema> |
| |
| JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" ); |
| Unmarshaller u = jc.createUnmarshaller(); |
| |
| DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); |
| dbf.setNamespaceAware(true); |
| DocumentBuilder db = dbf.newDocumentBuilder(); |
| Document doc = db.parse(new File( "nosferatu.xml")); |
| Element fooSubtree = ...; // traverse DOM till reach xml element foo, constrained by a |
| // local element declaration in schema. |
| |
| // FooType is the JAXB mapping of the type of local element declaration foo. |
| JAXBElement<FooType> foo = u.unmarshal( fooSubtree, FooType.class); |
| </pre> |
| </blockquote> |
| |
| <p> |
| <b>Support for SAX2.0 Compliant Parsers</b><br> |
| <blockquote> |
| A client application has the ability to select the SAX2.0 compliant parser |
| of their choice. If a SAX parser is not selected, then the JAXB Provider's |
| default parser will be used. Even though the JAXB Provider's default parser |
| is not required to be SAX2.0 compliant, all providers are required to allow |
| a client application to specify their own SAX2.0 parser. Some providers may |
| require the client application to specify the SAX2.0 parser at schema compile |
| time. See <A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(javax.xml.transform.Source)"><CODE>unmarshal(Source)</CODE></A> |
| for more detail. |
| </blockquote> |
| |
| <p> |
| <b>Validation and Well-Formedness</b><br> |
| <blockquote> |
| <p> |
| A client application can enable or disable JAXP 1.3 validation |
| mechanism via the <tt>setSchema(javax.xml.validation.Schema)</tt> API. |
| Sophisticated clients can specify their own validating SAX 2.0 compliant |
| parser and bypass the JAXP 1.3 validation mechanism using the |
| <A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(javax.xml.transform.Source)"><CODE>unmarshal(Source)</CODE></A> API. |
| |
| <p> |
| Since unmarshalling invalid XML content is defined in JAXB 2.0, |
| the Unmarshaller default validation event handler was made more lenient |
| than in JAXB 1.0. When schema-derived code generated |
| by JAXB 1.0 binding compiler is registered with <A HREF="../../../javax/xml/bind/JAXBContext.html" title="class in javax.xml.bind"><CODE>JAXBContext</CODE></A>, |
| the default unmarshal validation handler is |
| <A HREF="../../../javax/xml/bind/helpers/DefaultValidationEventHandler.html" title="class in javax.xml.bind.helpers"><CODE>DefaultValidationEventHandler</CODE></A> and it |
| terminates the marshal operation after encountering either a fatal error or an error. |
| For a JAXB 2.0 client application, there is no explicitly defined default |
| validation handler and the default event handling only |
| terminates the marshal operation after encountering a fatal error. |
| |
| </blockquote> |
| |
| <p> |
| <a name="supportedProps"></a> |
| <b>Supported Properties</b><br> |
| <blockquote> |
| <p> |
| There currently are not any properties required to be supported by all |
| JAXB Providers on Unmarshaller. However, some providers may support |
| their own set of provider specific properties. |
| </blockquote> |
| |
| <p> |
| <a name="unmarshalEventCallback"></a> |
| <b>Unmarshal Event Callbacks</b><br> |
| <blockquote> |
| The <A HREF="../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind"><CODE>Unmarshaller</CODE></A> provides two styles of callback mechanisms |
| that allow application specific processing during key points in the |
| unmarshalling process. In 'class defined' event callbacks, application |
| specific code placed in JAXB mapped classes is triggered during |
| unmarshalling. 'External listeners' allow for centralized processing |
| of unmarshal events in one callback method rather than by type event callbacks. |
| <p> |
| 'Class defined' event callback methods allow any JAXB mapped class to specify |
| its own specific callback methods by defining methods with the following method signature: |
| <blockquote> |
| <pre> |
| // This method is called immediately after the object is created and before the unmarshalling of this |
| // object begins. The callback provides an opportunity to initialize JavaBean properties prior to unmarshalling. |
| void beforeUnmarshal(Unmarshaller, Object parent); |
| |
| //This method is called after all the properties (except IDREF) are unmarshalled for this object, |
| //but before this object is set to the parent object. |
| void afterUnmarshal(Unmarshaller, Object parent); |
| </pre> |
| </blockquote> |
| The class defined callback methods should be used when the callback method requires |
| access to non-public methods and/or fields of the class. |
| <p> |
| The external listener callback mechanism enables the registration of a <A HREF="../../../javax/xml/bind/Unmarshaller.Listener.html" title="class in javax.xml.bind"><CODE>Unmarshaller.Listener</CODE></A> |
| instance with an <A HREF="../../../javax/xml/bind/Unmarshaller.html#setListener(javax.xml.bind.Unmarshaller.Listener)"><CODE>setListener(Listener)</CODE></A>. The external listener receives all callback events, |
| allowing for more centralized processing than per class defined callback methods. The external listener |
| receives events when unmarshalling proces is marshalling to a JAXB element or to JAXB mapped class. |
| <p> |
| The 'class defined' and external listener event callback methods are independent of each other, |
| both can be called for one event. The invocation ordering when both listener callback methods exist is |
| defined in <A HREF="../../../javax/xml/bind/Unmarshaller.Listener.html#beforeUnmarshal(java.lang.Object, java.lang.Object)"><CODE>Unmarshaller.Listener.beforeUnmarshal(Object, Object)</CODE></A> and <A HREF="../../../javax/xml/bind/Unmarshaller.Listener.html#afterUnmarshal(java.lang.Object, java.lang.Object)"><CODE>Unmarshaller.Listener.afterUnmarshal(Object, Object)</CODE></A>. |
| <p> |
| An event callback method throwing an exception terminates the current unmarshal process. |
| |
| </blockquote> |
| <P> |
| |
| <P> |
| <DL> |
| <DT><B>Version:</B></DT> |
| <DD>$Revision: 1.1 $ $Date: 2009/10/23 17:08:21 $</DD> |
| <DT><B>See Also:</B><DD><A HREF="../../../javax/xml/bind/JAXBContext.html" title="class in javax.xml.bind"><CODE>JAXBContext</CODE></A>, |
| <A HREF="../../../javax/xml/bind/Marshaller.html" title="interface in javax.xml.bind"><CODE>Marshaller</CODE></A>, |
| <A HREF="../../../javax/xml/bind/Validator.html" title="interface in javax.xml.bind"><CODE>Validator</CODE></A><DT><B>Author:</B></DT> |
| <DD><ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul></DD> |
| <DT><B>Since:</B></DT> |
| <DD>JAXB1.0</DD> |
| </DL> |
| <HR> |
| |
| <P> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| |
| <A NAME="nested_class_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Nested Class Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static class</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.Listener.html" title="class in javax.xml.bind">Unmarshaller.Listener</A></B></CODE> |
| |
| <BR> |
| <p/> |
| Register an instance of an implementation of this class with <A HREF="../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind"><CODE>Unmarshaller</CODE></A> to externally listen |
| for unmarshal events.</TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| |
| <A NAME="method_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Method Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><A extends <A HREF="../../../javax/xml/bind/annotation/adapters/XmlAdapter.html" title="class in javax.xml.bind.annotation.adapters">XmlAdapter</A>> |
| <BR> |
| A</CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#getAdapter(java.lang.Class)">getAdapter</A></B>(java.lang.Class<A> type)</CODE> |
| |
| <BR> |
| Gets the adapter associated with the specified type.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../javax/xml/bind/attachment/AttachmentUnmarshaller.html" title="class in javax.xml.bind.attachment">AttachmentUnmarshaller</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#getAttachmentUnmarshaller()">getAttachmentUnmarshaller</A></B>()</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind">ValidationEventHandler</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#getEventHandler()">getEventHandler</A></B>()</CODE> |
| |
| <BR> |
| Return the current event handler or the default event handler if one |
| hasn't been set.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../javax/xml/bind/Unmarshaller.Listener.html" title="class in javax.xml.bind">Unmarshaller.Listener</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#getListener()">getListener</A></B>()</CODE> |
| |
| <BR> |
| Return <A HREF="../../../javax/xml/bind/Unmarshaller.Listener.html" title="class in javax.xml.bind"><CODE>Unmarshaller.Listener</CODE></A> registered with this <A HREF="../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind"><CODE>Unmarshaller</CODE></A>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.Object</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#getProperty(java.lang.String)">getProperty</A></B>(java.lang.String name)</CODE> |
| |
| <BR> |
| Get the particular property in the underlying implementation of |
| <tt>Unmarshaller</tt>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> javax.xml.validation.Schema</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#getSchema()">getSchema</A></B>()</CODE> |
| |
| <BR> |
| Get the JAXP 1.3 <CODE>Schema</CODE> object |
| being used to perform unmarshal-time validation.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../javax/xml/bind/UnmarshallerHandler.html" title="interface in javax.xml.bind">UnmarshallerHandler</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#getUnmarshallerHandler()">getUnmarshallerHandler</A></B>()</CODE> |
| |
| <BR> |
| Get an unmarshaller handler object that can be used as a component in |
| an XML pipeline.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#isValidating()">isValidating</A></B>()</CODE> |
| |
| <BR> |
| <B>Deprecated.</B> <I>since JAXB2.0, please see <A HREF="../../../javax/xml/bind/Unmarshaller.html#getSchema()"><CODE>getSchema()</CODE></A></I></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><A extends <A HREF="../../../javax/xml/bind/annotation/adapters/XmlAdapter.html" title="class in javax.xml.bind.annotation.adapters">XmlAdapter</A>> |
| <BR> |
| void</CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#setAdapter(java.lang.Class, A)">setAdapter</A></B>(java.lang.Class<A> type, |
| A adapter)</CODE> |
| |
| <BR> |
| Associates a configured instance of <A HREF="../../../javax/xml/bind/annotation/adapters/XmlAdapter.html" title="class in javax.xml.bind.annotation.adapters"><CODE>XmlAdapter</CODE></A> with this unmarshaller.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#setAdapter(javax.xml.bind.annotation.adapters.XmlAdapter)">setAdapter</A></B>(<A HREF="../../../javax/xml/bind/annotation/adapters/XmlAdapter.html" title="class in javax.xml.bind.annotation.adapters">XmlAdapter</A> adapter)</CODE> |
| |
| <BR> |
| Associates a configured instance of <A HREF="../../../javax/xml/bind/annotation/adapters/XmlAdapter.html" title="class in javax.xml.bind.annotation.adapters"><CODE>XmlAdapter</CODE></A> with this unmarshaller.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#setAttachmentUnmarshaller(javax.xml.bind.attachment.AttachmentUnmarshaller)">setAttachmentUnmarshaller</A></B>(<A HREF="../../../javax/xml/bind/attachment/AttachmentUnmarshaller.html" title="class in javax.xml.bind.attachment">AttachmentUnmarshaller</A> au)</CODE> |
| |
| <BR> |
| Associate a context that resolves cid's, content-id URIs, to |
| binary data passed as attachments.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#setEventHandler(javax.xml.bind.ValidationEventHandler)">setEventHandler</A></B>(<A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind">ValidationEventHandler</A> handler)</CODE> |
| |
| <BR> |
| Allow an application to register a <tt>ValidationEventHandler</tt>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#setListener(javax.xml.bind.Unmarshaller.Listener)">setListener</A></B>(<A HREF="../../../javax/xml/bind/Unmarshaller.Listener.html" title="class in javax.xml.bind">Unmarshaller.Listener</A> listener)</CODE> |
| |
| <BR> |
| |
| Register unmarshal event callback <A HREF="../../../javax/xml/bind/Unmarshaller.Listener.html" title="class in javax.xml.bind"><CODE>Unmarshaller.Listener</CODE></A> with this <A HREF="../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind"><CODE>Unmarshaller</CODE></A>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#setProperty(java.lang.String, java.lang.Object)">setProperty</A></B>(java.lang.String name, |
| java.lang.Object value)</CODE> |
| |
| <BR> |
| Set the particular property in the underlying implementation of |
| <tt>Unmarshaller</tt>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#setSchema(javax.xml.validation.Schema)">setSchema</A></B>(javax.xml.validation.Schema schema)</CODE> |
| |
| <BR> |
| Specify the JAXP 1.3 <CODE>Schema</CODE> |
| object that should be used to validate subsequent unmarshal operations |
| against.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#setValidating(boolean)">setValidating</A></B>(boolean validating)</CODE> |
| |
| <BR> |
| <B>Deprecated.</B> <I>since JAXB2.0, please see <A HREF="../../../javax/xml/bind/Unmarshaller.html#setSchema(javax.xml.validation.Schema)"><CODE>setSchema(javax.xml.validation.Schema)</CODE></A></I></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.Object</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(java.io.File)">unmarshal</A></B>(java.io.File f)</CODE> |
| |
| <BR> |
| Unmarshal XML data from the specified file and return the resulting |
| content tree.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.Object</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(org.xml.sax.InputSource)">unmarshal</A></B>(org.xml.sax.InputSource source)</CODE> |
| |
| <BR> |
| Unmarshal XML data from the specified SAX InputSource and return the |
| resulting content tree.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.Object</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(java.io.InputStream)">unmarshal</A></B>(java.io.InputStream is)</CODE> |
| |
| <BR> |
| Unmarshal XML data from the specified InputStream and return the |
| resulting content tree.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.Object</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(org.w3c.dom.Node)">unmarshal</A></B>(org.w3c.dom.Node node)</CODE> |
| |
| <BR> |
| Unmarshal global XML data from the specified DOM tree and return the resulting |
| content tree.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><T> <A HREF="../../../javax/xml/bind/JAXBElement.html" title="class in javax.xml.bind">JAXBElement</A><T></CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(org.w3c.dom.Node, java.lang.Class)">unmarshal</A></B>(org.w3c.dom.Node node, |
| java.lang.Class<T> declaredType)</CODE> |
| |
| <BR> |
| Unmarshal XML data by JAXB mapped <tt>declaredType</tt> |
| and return the resulting content tree.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.Object</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(java.io.Reader)">unmarshal</A></B>(java.io.Reader reader)</CODE> |
| |
| <BR> |
| Unmarshal XML data from the specified Reader and return the |
| resulting content tree.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.Object</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(javax.xml.transform.Source)">unmarshal</A></B>(javax.xml.transform.Source source)</CODE> |
| |
| <BR> |
| Unmarshal XML data from the specified XML Source and return the |
| resulting content tree.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><T> <A HREF="../../../javax/xml/bind/JAXBElement.html" title="class in javax.xml.bind">JAXBElement</A><T></CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(javax.xml.transform.Source, java.lang.Class)">unmarshal</A></B>(javax.xml.transform.Source source, |
| java.lang.Class<T> declaredType)</CODE> |
| |
| <BR> |
| Unmarshal XML data from the specified XML Source by <tt>declaredType</tt> and return the |
| resulting content tree.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.Object</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(java.net.URL)">unmarshal</A></B>(java.net.URL url)</CODE> |
| |
| <BR> |
| Unmarshal XML data from the specified URL and return the resulting |
| content tree.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.Object</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(javax.xml.stream.XMLEventReader)">unmarshal</A></B>(javax.xml.stream.XMLEventReader reader)</CODE> |
| |
| <BR> |
| Unmarshal XML data from the specified pull parser and return the |
| resulting content tree.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><T> <A HREF="../../../javax/xml/bind/JAXBElement.html" title="class in javax.xml.bind">JAXBElement</A><T></CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(javax.xml.stream.XMLEventReader, java.lang.Class)">unmarshal</A></B>(javax.xml.stream.XMLEventReader reader, |
| java.lang.Class<T> declaredType)</CODE> |
| |
| <BR> |
| Unmarshal root element to JAXB mapped <tt>declaredType</tt> |
| and return the resulting content tree.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.Object</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(javax.xml.stream.XMLStreamReader)">unmarshal</A></B>(javax.xml.stream.XMLStreamReader reader)</CODE> |
| |
| <BR> |
| Unmarshal XML data from the specified pull parser and return the |
| resulting content tree.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><T> <A HREF="../../../javax/xml/bind/JAXBElement.html" title="class in javax.xml.bind">JAXBElement</A><T></CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(javax.xml.stream.XMLStreamReader, java.lang.Class)">unmarshal</A></B>(javax.xml.stream.XMLStreamReader reader, |
| java.lang.Class<T> declaredType)</CODE> |
| |
| <BR> |
| Unmarshal root element to JAXB mapped <tt>declaredType</tt> |
| and return the resulting content tree.</TD> |
| </TR> |
| </TABLE> |
| |
| <P> |
| |
| <!-- ============ METHOD DETAIL ========== --> |
| |
| <A NAME="method_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Method Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="unmarshal(java.io.File)"><!-- --></A><H3> |
| unmarshal</H3> |
| <PRE> |
| java.lang.Object <B>unmarshal</B>(java.io.File f) |
| throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> |
| <DL> |
| <DD>Unmarshal XML data from the specified file and return the resulting |
| content tree. |
| |
| <p> |
| Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>f</CODE> - the file to unmarshal XML data from |
| <DT><B>Returns:</B><DD>the newly created root object of the java content tree |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - If any unexpected errors occur while unmarshalling |
| <DD><CODE><A HREF="../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A> |
| returns false from its <tt>handleEvent</tt> method or the |
| <tt>Unmarshaller</tt> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a> |
| <DD><CODE>java.lang.IllegalArgumentException</CODE> - If the file parameter is null</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="unmarshal(java.io.InputStream)"><!-- --></A><H3> |
| unmarshal</H3> |
| <PRE> |
| java.lang.Object <B>unmarshal</B>(java.io.InputStream is) |
| throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> |
| <DL> |
| <DD>Unmarshal XML data from the specified InputStream and return the |
| resulting content tree. Validation event location information may |
| be incomplete when using this form of the unmarshal API. |
| |
| <p> |
| Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>is</CODE> - the InputStream to unmarshal XML data from |
| <DT><B>Returns:</B><DD>the newly created root object of the java content tree |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - If any unexpected errors occur while unmarshalling |
| <DD><CODE><A HREF="../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A> |
| returns false from its <tt>handleEvent</tt> method or the |
| <tt>Unmarshaller</tt> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a> |
| <DD><CODE>java.lang.IllegalArgumentException</CODE> - If the InputStream parameter is null</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="unmarshal(java.io.Reader)"><!-- --></A><H3> |
| unmarshal</H3> |
| <PRE> |
| java.lang.Object <B>unmarshal</B>(java.io.Reader reader) |
| throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> |
| <DL> |
| <DD>Unmarshal XML data from the specified Reader and return the |
| resulting content tree. Validation event location information may |
| be incomplete when using this form of the unmarshal API, |
| because a Reader does not provide the system ID. |
| |
| <p> |
| Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>reader</CODE> - the Reader to unmarshal XML data from |
| <DT><B>Returns:</B><DD>the newly created root object of the java content tree |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - If any unexpected errors occur while unmarshalling |
| <DD><CODE><A HREF="../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A> |
| returns false from its <tt>handleEvent</tt> method or the |
| <tt>Unmarshaller</tt> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a> |
| <DD><CODE>java.lang.IllegalArgumentException</CODE> - If the InputStream parameter is null<DT><B>Since:</B></DT> |
| <DD>JAXB2.0</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="unmarshal(java.net.URL)"><!-- --></A><H3> |
| unmarshal</H3> |
| <PRE> |
| java.lang.Object <B>unmarshal</B>(java.net.URL url) |
| throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> |
| <DL> |
| <DD>Unmarshal XML data from the specified URL and return the resulting |
| content tree. |
| |
| <p> |
| Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>url</CODE> - the url to unmarshal XML data from |
| <DT><B>Returns:</B><DD>the newly created root object of the java content tree |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - If any unexpected errors occur while unmarshalling |
| <DD><CODE><A HREF="../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A> |
| returns false from its <tt>handleEvent</tt> method or the |
| <tt>Unmarshaller</tt> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a> |
| <DD><CODE>java.lang.IllegalArgumentException</CODE> - If the URL parameter is null</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="unmarshal(org.xml.sax.InputSource)"><!-- --></A><H3> |
| unmarshal</H3> |
| <PRE> |
| java.lang.Object <B>unmarshal</B>(org.xml.sax.InputSource source) |
| throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> |
| <DL> |
| <DD>Unmarshal XML data from the specified SAX InputSource and return the |
| resulting content tree. |
| |
| <p> |
| Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>source</CODE> - the input source to unmarshal XML data from |
| <DT><B>Returns:</B><DD>the newly created root object of the java content tree |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - If any unexpected errors occur while unmarshalling |
| <DD><CODE><A HREF="../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A> |
| returns false from its <tt>handleEvent</tt> method or the |
| <tt>Unmarshaller</tt> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a> |
| <DD><CODE>java.lang.IllegalArgumentException</CODE> - If the InputSource parameter is null</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="unmarshal(org.w3c.dom.Node)"><!-- --></A><H3> |
| unmarshal</H3> |
| <PRE> |
| java.lang.Object <B>unmarshal</B>(org.w3c.dom.Node node) |
| throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> |
| <DL> |
| <DD>Unmarshal global XML data from the specified DOM tree and return the resulting |
| content tree. |
| |
| <p> |
| Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>node</CODE> - the document/element to unmarshal XML data from. |
| The caller must support at least Document and Element. |
| <DT><B>Returns:</B><DD>the newly created root object of the java content tree |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - If any unexpected errors occur while unmarshalling |
| <DD><CODE><A HREF="../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A> |
| returns false from its <tt>handleEvent</tt> method or the |
| <tt>Unmarshaller</tt> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a> |
| <DD><CODE>java.lang.IllegalArgumentException</CODE> - If the Node parameter is null<DT><B>See Also:</B><DD><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(org.w3c.dom.Node, java.lang.Class)"><CODE>unmarshal(org.w3c.dom.Node, Class)</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="unmarshal(org.w3c.dom.Node, java.lang.Class)"><!-- --></A><H3> |
| unmarshal</H3> |
| <PRE> |
| <T> <A HREF="../../../javax/xml/bind/JAXBElement.html" title="class in javax.xml.bind">JAXBElement</A><T> <B>unmarshal</B>(org.w3c.dom.Node node, |
| java.lang.Class<T> declaredType) |
| throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> |
| <DL> |
| <DD>Unmarshal XML data by JAXB mapped <tt>declaredType</tt> |
| and return the resulting content tree. |
| |
| <p> |
| Implements <a href="#unmarshalByDeclaredType">Unmarshal by Declared Type</a> |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>node</CODE> - the document/element to unmarshal XML data from. |
| The caller must support at least Document and Element.<DD><CODE>declaredType</CODE> - appropriate JAXB mapped class to hold <tt>node</tt>'s XML data. |
| <DT><B>Returns:</B><DD><a href="#unmarshalDeclaredTypeReturn">JAXB Element</a> representation of <tt>node</tt> |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - If any unexpected errors occur while unmarshalling |
| <DD><CODE><A HREF="../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A> |
| returns false from its <tt>handleEvent</tt> method or the |
| <tt>Unmarshaller</tt> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a> |
| <DD><CODE>java.lang.IllegalArgumentException</CODE> - If any parameter is null<DT><B>Since:</B></DT> |
| <DD>JAXB2.0</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="unmarshal(javax.xml.transform.Source)"><!-- --></A><H3> |
| unmarshal</H3> |
| <PRE> |
| java.lang.Object <B>unmarshal</B>(javax.xml.transform.Source source) |
| throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> |
| <DL> |
| <DD>Unmarshal XML data from the specified XML Source and return the |
| resulting content tree. |
| |
| <p> |
| Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>. |
| |
| <p> |
| <a name="saxParserPlugable"></a> |
| <b>SAX 2.0 Parser Pluggability</b> |
| <p> |
| A client application can choose not to use the default parser mechanism |
| supplied with their JAXB provider. Any SAX 2.0 compliant parser can be |
| substituted for the JAXB provider's default mechanism. To do so, the |
| client application must properly configure a <tt>SAXSource</tt> containing |
| an <tt>XMLReader</tt> implemented by the SAX 2.0 parser provider. If the |
| <tt>XMLReader</tt> has an <tt>org.xml.sax.ErrorHandler</tt> registered |
| on it, it will be replaced by the JAXB Provider so that validation errors |
| can be reported via the <tt>ValidationEventHandler</tt> mechanism of |
| JAXB. If the <tt>SAXSource</tt> does not contain an <tt>XMLReader</tt>, |
| then the JAXB provider's default parser mechanism will be used. |
| <p> |
| This parser replacement mechanism can also be used to replace the JAXB |
| provider's unmarshal-time validation engine. The client application |
| must properly configure their SAX 2.0 compliant parser to perform |
| validation (as shown in the example above). Any <tt>SAXParserExceptions |
| </tt> encountered by the parser during the unmarshal operation will be |
| processed by the JAXB provider and converted into JAXB |
| <tt>ValidationEvent</tt> objects which will be reported back to the |
| client via the <tt>ValidationEventHandler</tt> registered with the |
| <tt>Unmarshaller</tt>. <i>Note:</i> specifying a substitute validating |
| SAX 2.0 parser for unmarshalling does not necessarily replace the |
| validation engine used by the JAXB provider for performing on-demand |
| validation. |
| <p> |
| The only way for a client application to specify an alternate parser |
| mechanism to be used during unmarshal is via the |
| <tt>unmarshal(SAXSource)</tt> API. All other forms of the unmarshal |
| method (File, URL, Node, etc) will use the JAXB provider's default |
| parser and validator mechanisms. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>source</CODE> - the XML Source to unmarshal XML data from (providers are |
| only required to support SAXSource, DOMSource, and StreamSource) |
| <DT><B>Returns:</B><DD>the newly created root object of the java content tree |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - If any unexpected errors occur while unmarshalling |
| <DD><CODE><A HREF="../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A> |
| returns false from its <tt>handleEvent</tt> method or the |
| <tt>Unmarshaller</tt> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a> |
| <DD><CODE>java.lang.IllegalArgumentException</CODE> - If the Source parameter is null<DT><B>See Also:</B><DD><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(javax.xml.transform.Source, java.lang.Class)"><CODE>unmarshal(javax.xml.transform.Source, Class)</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="unmarshal(javax.xml.transform.Source, java.lang.Class)"><!-- --></A><H3> |
| unmarshal</H3> |
| <PRE> |
| <T> <A HREF="../../../javax/xml/bind/JAXBElement.html" title="class in javax.xml.bind">JAXBElement</A><T> <B>unmarshal</B>(javax.xml.transform.Source source, |
| java.lang.Class<T> declaredType) |
| throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> |
| <DL> |
| <DD>Unmarshal XML data from the specified XML Source by <tt>declaredType</tt> and return the |
| resulting content tree. |
| |
| <p> |
| Implements <a href="#unmarshalByDeclaredType">Unmarshal by Declared Type</a> |
| |
| <p> |
| See <a href="#saxParserPlugable">SAX 2.0 Parser Pluggability</a> |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>source</CODE> - the XML Source to unmarshal XML data from (providers are |
| only required to support SAXSource, DOMSource, and StreamSource)<DD><CODE>declaredType</CODE> - appropriate JAXB mapped class to hold <tt>source</tt>'s xml root element |
| <DT><B>Returns:</B><DD>Java content rooted by <a href="#unmarshalDeclaredTypeReturn">JAXB Element</a> |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - If any unexpected errors occur while unmarshalling |
| <DD><CODE><A HREF="../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A> |
| returns false from its <tt>handleEvent</tt> method or the |
| <tt>Unmarshaller</tt> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a> |
| <DD><CODE>java.lang.IllegalArgumentException</CODE> - If any parameter is null<DT><B>Since:</B></DT> |
| <DD>JAXB2.0</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="unmarshal(javax.xml.stream.XMLStreamReader)"><!-- --></A><H3> |
| unmarshal</H3> |
| <PRE> |
| java.lang.Object <B>unmarshal</B>(javax.xml.stream.XMLStreamReader reader) |
| throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> |
| <DL> |
| <DD>Unmarshal XML data from the specified pull parser and return the |
| resulting content tree. |
| |
| <p> |
| Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>. |
| |
| <p> |
| This method assumes that the parser is on a START_DOCUMENT or |
| START_ELEMENT event. Unmarshalling will be done from this |
| start event to the corresponding end event. If this method |
| returns successfully, the <tt>reader</tt> will be pointing at |
| the token right after the end event. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>reader</CODE> - The parser to be read. |
| <DT><B>Returns:</B><DD>the newly created root object of the java content tree. |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - If any unexpected errors occur while unmarshalling |
| <DD><CODE><A HREF="../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A> |
| returns false from its <tt>handleEvent</tt> method or the |
| <tt>Unmarshaller</tt> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a> |
| <DD><CODE>java.lang.IllegalArgumentException</CODE> - If the <tt>reader</tt> parameter is null |
| <DD><CODE>java.lang.IllegalStateException</CODE> - If <tt>reader</tt> is not pointing to a START_DOCUMENT or |
| START_ELEMENT event.<DT><B>See Also:</B><DD><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(javax.xml.stream.XMLStreamReader, java.lang.Class)"><CODE>unmarshal(javax.xml.stream.XMLStreamReader, Class)</CODE></A><DT><B>Since:</B></DT> |
| <DD>JAXB2.0</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="unmarshal(javax.xml.stream.XMLStreamReader, java.lang.Class)"><!-- --></A><H3> |
| unmarshal</H3> |
| <PRE> |
| <T> <A HREF="../../../javax/xml/bind/JAXBElement.html" title="class in javax.xml.bind">JAXBElement</A><T> <B>unmarshal</B>(javax.xml.stream.XMLStreamReader reader, |
| java.lang.Class<T> declaredType) |
| throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> |
| <DL> |
| <DD>Unmarshal root element to JAXB mapped <tt>declaredType</tt> |
| and return the resulting content tree. |
| |
| <p> |
| This method implements <a href="unmarshalByDeclaredType">unmarshal by declaredType</a>. |
| <p> |
| This method assumes that the parser is on a START_DOCUMENT or |
| START_ELEMENT event. Unmarshalling will be done from this |
| start event to the corresponding end event. If this method |
| returns successfully, the <tt>reader</tt> will be pointing at |
| the token right after the end event. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>reader</CODE> - The parser to be read.<DD><CODE>declaredType</CODE> - appropriate JAXB mapped class to hold <tt>reader</tt>'s START_ELEMENT XML data. |
| <DT><B>Returns:</B><DD>content tree rooted by <a href="#unmarshalDeclaredTypeReturn">JAXB Element representation</a> |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - If any unexpected errors occur while unmarshalling |
| <DD><CODE><A HREF="../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A> |
| returns false from its <tt>handleEvent</tt> method or the |
| <tt>Unmarshaller</tt> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a> |
| <DD><CODE>java.lang.IllegalArgumentException</CODE> - If any parameter is null<DT><B>Since:</B></DT> |
| <DD>JAXB2.0</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="unmarshal(javax.xml.stream.XMLEventReader)"><!-- --></A><H3> |
| unmarshal</H3> |
| <PRE> |
| java.lang.Object <B>unmarshal</B>(javax.xml.stream.XMLEventReader reader) |
| throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> |
| <DL> |
| <DD>Unmarshal XML data from the specified pull parser and return the |
| resulting content tree. |
| |
| <p> |
| This method is an <a href="#unmarshalGlobal">Unmarshal Global Root method</a>. |
| |
| <p> |
| This method assumes that the parser is on a START_DOCUMENT or |
| START_ELEMENT event. Unmarshalling will be done from this |
| start event to the corresponding end event. If this method |
| returns successfully, the <tt>reader</tt> will be pointing at |
| the token right after the end event. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>reader</CODE> - The parser to be read. |
| <DT><B>Returns:</B><DD>the newly created root object of the java content tree. |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - If any unexpected errors occur while unmarshalling |
| <DD><CODE><A HREF="../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A> |
| returns false from its <tt>handleEvent</tt> method or the |
| <tt>Unmarshaller</tt> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a> |
| <DD><CODE>java.lang.IllegalArgumentException</CODE> - If the <tt>reader</tt> parameter is null |
| <DD><CODE>java.lang.IllegalStateException</CODE> - If <tt>reader</tt> is not pointing to a START_DOCUMENT or |
| START_ELEMENT event.<DT><B>See Also:</B><DD><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(javax.xml.stream.XMLEventReader, java.lang.Class)"><CODE>unmarshal(javax.xml.stream.XMLEventReader, Class)</CODE></A><DT><B>Since:</B></DT> |
| <DD>JAXB2.0</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="unmarshal(javax.xml.stream.XMLEventReader, java.lang.Class)"><!-- --></A><H3> |
| unmarshal</H3> |
| <PRE> |
| <T> <A HREF="../../../javax/xml/bind/JAXBElement.html" title="class in javax.xml.bind">JAXBElement</A><T> <B>unmarshal</B>(javax.xml.stream.XMLEventReader reader, |
| java.lang.Class<T> declaredType) |
| throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> |
| <DL> |
| <DD>Unmarshal root element to JAXB mapped <tt>declaredType</tt> |
| and return the resulting content tree. |
| |
| <p> |
| This method implements <a href="unmarshalByDeclaredType">unmarshal by declaredType</a>. |
| |
| <p> |
| This method assumes that the parser is on a START_DOCUMENT or |
| START_ELEMENT event. Unmarshalling will be done from this |
| start event to the corresponding end event. If this method |
| returns successfully, the <tt>reader</tt> will be pointing at |
| the token right after the end event. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>reader</CODE> - The parser to be read.<DD><CODE>declaredType</CODE> - appropriate JAXB mapped class to hold <tt>reader</tt>'s START_ELEMENT XML data. |
| <DT><B>Returns:</B><DD>content tree rooted by <a href="#unmarshalDeclaredTypeReturn">JAXB Element representation</a> |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - If any unexpected errors occur while unmarshalling |
| <DD><CODE><A HREF="../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A> |
| returns false from its <tt>handleEvent</tt> method or the |
| <tt>Unmarshaller</tt> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a> |
| <DD><CODE>java.lang.IllegalArgumentException</CODE> - If any parameter is null<DT><B>Since:</B></DT> |
| <DD>JAXB2.0</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getUnmarshallerHandler()"><!-- --></A><H3> |
| getUnmarshallerHandler</H3> |
| <PRE> |
| <A HREF="../../../javax/xml/bind/UnmarshallerHandler.html" title="interface in javax.xml.bind">UnmarshallerHandler</A> <B>getUnmarshallerHandler</B>()</PRE> |
| <DL> |
| <DD>Get an unmarshaller handler object that can be used as a component in |
| an XML pipeline. |
| |
| <p> |
| The JAXB Provider can return the same handler object for multiple |
| invocations of this method. In other words, this method does not |
| necessarily create a new instance of <tt>UnmarshallerHandler</tt>. If the |
| application needs to use more than one <tt>UnmarshallerHandler</tt>, it |
| should create more than one <tt>Unmarshaller</tt>. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>the unmarshaller handler object<DT><B>See Also:</B><DD><A HREF="../../../javax/xml/bind/UnmarshallerHandler.html" title="interface in javax.xml.bind"><CODE>UnmarshallerHandler</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setValidating(boolean)"><!-- --></A><H3> |
| setValidating</H3> |
| <PRE> |
| void <B>setValidating</B>(boolean validating) |
| throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> |
| <DL> |
| <DD><B>Deprecated.</B> <I>since JAXB2.0, please see <A HREF="../../../javax/xml/bind/Unmarshaller.html#setSchema(javax.xml.validation.Schema)"><CODE>setSchema(javax.xml.validation.Schema)</CODE></A></I> |
| <P> |
| <DD>Specifies whether or not the default validation mechanism of the |
| <tt>Unmarshaller</tt> should validate during unmarshal operations. |
| By default, the <tt>Unmarshaller</tt> does not validate. |
| <p> |
| This method may only be invoked before or after calling one of the |
| unmarshal methods. |
| <p> |
| This method only controls the JAXB Provider's default unmarshal-time |
| validation mechanism - it has no impact on clients that specify their |
| own validating SAX 2.0 compliant parser. Clients that specify their |
| own unmarshal-time validation mechanism may wish to turn off the JAXB |
| Provider's default validation mechanism via this API to avoid "double |
| validation". |
| <p> |
| This method is deprecated as of JAXB 2.0 - please use the new |
| <A HREF="../../../javax/xml/bind/Unmarshaller.html#setSchema(javax.xml.validation.Schema)"><CODE>setSchema(javax.xml.validation.Schema)</CODE></A> API. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>validating</CODE> - true if the Unmarshaller should validate during |
| unmarshal, false otherwise |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - if an error occurred while enabling or disabling |
| validation at unmarshal time |
| <DD><CODE>java.lang.UnsupportedOperationException</CODE> - could be thrown if this method is |
| invoked on an Unmarshaller created from a JAXBContext referencing |
| JAXB 2.0 mapped classes</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isValidating()"><!-- --></A><H3> |
| isValidating</H3> |
| <PRE> |
| boolean <B>isValidating</B>() |
| throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> |
| <DL> |
| <DD><B>Deprecated.</B> <I>since JAXB2.0, please see <A HREF="../../../javax/xml/bind/Unmarshaller.html#getSchema()"><CODE>getSchema()</CODE></A></I> |
| <P> |
| <DD>Indicates whether or not the <tt>Unmarshaller</tt> is configured to |
| validate during unmarshal operations. |
| <p> |
| This API returns the state of the JAXB Provider's default unmarshal-time |
| validation mechanism. |
| <p> |
| This method is deprecated as of JAXB 2.0 - please use the new |
| <A HREF="../../../javax/xml/bind/Unmarshaller.html#getSchema()"><CODE>getSchema()</CODE></A> API. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>true if the Unmarshaller is configured to validate during |
| unmarshal operations, false otherwise |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - if an error occurs while retrieving the validating |
| flag |
| <DD><CODE>java.lang.UnsupportedOperationException</CODE> - could be thrown if this method is |
| invoked on an Unmarshaller created from a JAXBContext referencing |
| JAXB 2.0 mapped classes</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setEventHandler(javax.xml.bind.ValidationEventHandler)"><!-- --></A><H3> |
| setEventHandler</H3> |
| <PRE> |
| void <B>setEventHandler</B>(<A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind">ValidationEventHandler</A> handler) |
| throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> |
| <DL> |
| <DD>Allow an application to register a <tt>ValidationEventHandler</tt>. |
| <p> |
| The <tt>ValidationEventHandler</tt> will be called by the JAXB Provider |
| if any validation errors are encountered during calls to any of the |
| unmarshal methods. If the client application does not register a |
| <tt>ValidationEventHandler</tt> before invoking the unmarshal methods, |
| then <tt>ValidationEvents</tt> will be handled by the default event |
| handler which will terminate the unmarshal operation after the first |
| error or fatal error is encountered. |
| <p> |
| Calling this method with a null parameter will cause the Unmarshaller |
| to revert back to the default event handler. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>handler</CODE> - the validation event handler |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - if an error was encountered while setting the |
| event handler</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getEventHandler()"><!-- --></A><H3> |
| getEventHandler</H3> |
| <PRE> |
| <A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind">ValidationEventHandler</A> <B>getEventHandler</B>() |
| throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> |
| <DL> |
| <DD>Return the current event handler or the default event handler if one |
| hasn't been set. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>the current ValidationEventHandler or the default event handler |
| if it hasn't been set |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - if an error was encountered while getting the |
| current event handler</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setProperty(java.lang.String, java.lang.Object)"><!-- --></A><H3> |
| setProperty</H3> |
| <PRE> |
| void <B>setProperty</B>(java.lang.String name, |
| java.lang.Object value) |
| throws <A HREF="../../../javax/xml/bind/PropertyException.html" title="class in javax.xml.bind">PropertyException</A></PRE> |
| <DL> |
| <DD>Set the particular property in the underlying implementation of |
| <tt>Unmarshaller</tt>. This method can only be used to set one of |
| the standard JAXB defined properties above or a provider specific |
| property. Attempting to set an undefined property will result in |
| a PropertyException being thrown. See <a href="#supportedProps"> |
| Supported Properties</a>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the property to be set. This value can either |
| be specified using one of the constant fields or a user |
| supplied string.<DD><CODE>value</CODE> - the value of the property to be set |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../javax/xml/bind/PropertyException.html" title="class in javax.xml.bind">PropertyException</A></CODE> - when there is an error processing the given |
| property or value |
| <DD><CODE>java.lang.IllegalArgumentException</CODE> - If the name parameter is null</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getProperty(java.lang.String)"><!-- --></A><H3> |
| getProperty</H3> |
| <PRE> |
| java.lang.Object <B>getProperty</B>(java.lang.String name) |
| throws <A HREF="../../../javax/xml/bind/PropertyException.html" title="class in javax.xml.bind">PropertyException</A></PRE> |
| <DL> |
| <DD>Get the particular property in the underlying implementation of |
| <tt>Unmarshaller</tt>. This method can only be used to get one of |
| the standard JAXB defined properties above or a provider specific |
| property. Attempting to get an undefined property will result in |
| a PropertyException being thrown. See <a href="#supportedProps"> |
| Supported Properties</a>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the property to retrieve |
| <DT><B>Returns:</B><DD>the value of the requested property |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../javax/xml/bind/PropertyException.html" title="class in javax.xml.bind">PropertyException</A></CODE> - when there is an error retrieving the given property or value |
| property name |
| <DD><CODE>java.lang.IllegalArgumentException</CODE> - If the name parameter is null</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setSchema(javax.xml.validation.Schema)"><!-- --></A><H3> |
| setSchema</H3> |
| <PRE> |
| void <B>setSchema</B>(javax.xml.validation.Schema schema)</PRE> |
| <DL> |
| <DD>Specify the JAXP 1.3 <CODE>Schema</CODE> |
| object that should be used to validate subsequent unmarshal operations |
| against. Passing null into this method will disable validation. |
| <p> |
| This method replaces the deprecated <A HREF="../../../javax/xml/bind/Unmarshaller.html#setValidating(boolean)"><CODE>setValidating(boolean)</CODE></A> |
| API. |
| |
| <p> |
| Initially this property is set to <tt>null</tt>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>schema</CODE> - Schema object to validate unmarshal operations against or null to disable validation |
| <DT><B>Throws:</B> |
| <DD><CODE>java.lang.UnsupportedOperationException</CODE> - could be thrown if this method is |
| invoked on an Unmarshaller created from a JAXBContext referencing |
| JAXB 1.0 mapped classes<DT><B>Since:</B></DT> |
| <DD>JAXB2.0</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getSchema()"><!-- --></A><H3> |
| getSchema</H3> |
| <PRE> |
| javax.xml.validation.Schema <B>getSchema</B>()</PRE> |
| <DL> |
| <DD>Get the JAXP 1.3 <CODE>Schema</CODE> object |
| being used to perform unmarshal-time validation. If there is no |
| Schema set on the unmarshaller, then this method will return null |
| indicating that unmarshal-time validation will not be performed. |
| <p> |
| This method provides replacement functionality for the deprecated |
| <A HREF="../../../javax/xml/bind/Unmarshaller.html#isValidating()"><CODE>isValidating()</CODE></A> API as well as access to the Schema object. |
| To determine if the Unmarshaller has validation enabled, simply |
| test the return type for null: |
| <p> |
| <code> |
| boolean isValidating = u.getSchema()!=null; |
| </code> |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>the Schema object being used to perform unmarshal-time |
| validation or null if not present |
| <DT><B>Throws:</B> |
| <DD><CODE>java.lang.UnsupportedOperationException</CODE> - could be thrown if this method is |
| invoked on an Unmarshaller created from a JAXBContext referencing |
| JAXB 1.0 mapped classes<DT><B>Since:</B></DT> |
| <DD>JAXB2.0</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setAdapter(javax.xml.bind.annotation.adapters.XmlAdapter)"><!-- --></A><H3> |
| setAdapter</H3> |
| <PRE> |
| void <B>setAdapter</B>(<A HREF="../../../javax/xml/bind/annotation/adapters/XmlAdapter.html" title="class in javax.xml.bind.annotation.adapters">XmlAdapter</A> adapter)</PRE> |
| <DL> |
| <DD>Associates a configured instance of <A HREF="../../../javax/xml/bind/annotation/adapters/XmlAdapter.html" title="class in javax.xml.bind.annotation.adapters"><CODE>XmlAdapter</CODE></A> with this unmarshaller. |
| |
| <p> |
| This is a convenience method that invokes <code>setAdapter(adapter.getClass(),adapter);</code>. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Throws:</B> |
| <DD><CODE>java.lang.IllegalArgumentException</CODE> - if the adapter parameter is null. |
| <DD><CODE>java.lang.UnsupportedOperationException</CODE> - if invoked agains a JAXB 1.0 implementation.<DT><B>See Also:</B><DD><A HREF="../../../javax/xml/bind/Unmarshaller.html#setAdapter(java.lang.Class, A)"><CODE>setAdapter(Class,XmlAdapter)</CODE></A><DT><B>Since:</B></DT> |
| <DD>JAXB2.0</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setAdapter(java.lang.Class,javax.xml.bind.annotation.adapters.XmlAdapter)"><!-- --></A><A NAME="setAdapter(java.lang.Class, A)"><!-- --></A><H3> |
| setAdapter</H3> |
| <PRE> |
| <A extends <A HREF="../../../javax/xml/bind/annotation/adapters/XmlAdapter.html" title="class in javax.xml.bind.annotation.adapters">XmlAdapter</A>> void <B>setAdapter</B>(java.lang.Class<A> type, |
| A adapter)</PRE> |
| <DL> |
| <DD>Associates a configured instance of <A HREF="../../../javax/xml/bind/annotation/adapters/XmlAdapter.html" title="class in javax.xml.bind.annotation.adapters"><CODE>XmlAdapter</CODE></A> with this unmarshaller. |
| |
| <p> |
| Every unmarshaller internally maintains a |
| <CODE>Map</CODE><<CODE>Class</CODE>,<A HREF="../../../javax/xml/bind/annotation/adapters/XmlAdapter.html" title="class in javax.xml.bind.annotation.adapters"><CODE>XmlAdapter</CODE></A>>, |
| which it uses for unmarshalling classes whose fields/methods are annotated |
| with <A HREF="../../../javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.html" title="annotation in javax.xml.bind.annotation.adapters"><CODE>XmlJavaTypeAdapter</CODE></A>. |
| |
| <p> |
| This method allows applications to use a configured instance of <A HREF="../../../javax/xml/bind/annotation/adapters/XmlAdapter.html" title="class in javax.xml.bind.annotation.adapters"><CODE>XmlAdapter</CODE></A>. |
| When an instance of an adapter is not given, an unmarshaller will create |
| one by invoking its default constructor. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>type</CODE> - The type of the adapter. The specified instance will be used when |
| <A HREF="../../../javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.html#value()"><CODE>XmlJavaTypeAdapter.value()</CODE></A> |
| refers to this type.<DD><CODE>adapter</CODE> - The instance of the adapter to be used. If null, it will un-register |
| the current adapter set for this type. |
| <DT><B>Throws:</B> |
| <DD><CODE>java.lang.IllegalArgumentException</CODE> - if the type parameter is null. |
| <DD><CODE>java.lang.UnsupportedOperationException</CODE> - if invoked agains a JAXB 1.0 implementation.<DT><B>Since:</B></DT> |
| <DD>JAXB2.0</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getAdapter(java.lang.Class)"><!-- --></A><H3> |
| getAdapter</H3> |
| <PRE> |
| <A extends <A HREF="../../../javax/xml/bind/annotation/adapters/XmlAdapter.html" title="class in javax.xml.bind.annotation.adapters">XmlAdapter</A>> A <B>getAdapter</B>(java.lang.Class<A> type)</PRE> |
| <DL> |
| <DD>Gets the adapter associated with the specified type. |
| |
| This is the reverse operation of the <A HREF="../../../javax/xml/bind/Unmarshaller.html#setAdapter(javax.xml.bind.annotation.adapters.XmlAdapter)"><CODE>setAdapter(javax.xml.bind.annotation.adapters.XmlAdapter)</CODE></A> method. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Throws:</B> |
| <DD><CODE>java.lang.IllegalArgumentException</CODE> - if the type parameter is null. |
| <DD><CODE>java.lang.UnsupportedOperationException</CODE> - if invoked agains a JAXB 1.0 implementation.<DT><B>Since:</B></DT> |
| <DD>JAXB2.0</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setAttachmentUnmarshaller(javax.xml.bind.attachment.AttachmentUnmarshaller)"><!-- --></A><H3> |
| setAttachmentUnmarshaller</H3> |
| <PRE> |
| void <B>setAttachmentUnmarshaller</B>(<A HREF="../../../javax/xml/bind/attachment/AttachmentUnmarshaller.html" title="class in javax.xml.bind.attachment">AttachmentUnmarshaller</A> au)</PRE> |
| <DL> |
| <DD><p>Associate a context that resolves cid's, content-id URIs, to |
| binary data passed as attachments.</p> |
| <p/> |
| <p>Unmarshal time validation, enabled via <A HREF="../../../javax/xml/bind/Unmarshaller.html#setSchema(javax.xml.validation.Schema)"><CODE>setSchema(Schema)</CODE></A>, |
| must be supported even when unmarshaller is performing XOP processing. |
| </p> |
| <P> |
| <DD><DL> |
| |
| <DT><B>Throws:</B> |
| <DD><CODE>java.lang.IllegalStateException</CODE> - if attempt to concurrently call this |
| method during a unmarshal operation.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getAttachmentUnmarshaller()"><!-- --></A><H3> |
| getAttachmentUnmarshaller</H3> |
| <PRE> |
| <A HREF="../../../javax/xml/bind/attachment/AttachmentUnmarshaller.html" title="class in javax.xml.bind.attachment">AttachmentUnmarshaller</A> <B>getAttachmentUnmarshaller</B>()</PRE> |
| <DL> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setListener(javax.xml.bind.Unmarshaller.Listener)"><!-- --></A><H3> |
| setListener</H3> |
| <PRE> |
| void <B>setListener</B>(<A HREF="../../../javax/xml/bind/Unmarshaller.Listener.html" title="class in javax.xml.bind">Unmarshaller.Listener</A> listener)</PRE> |
| <DL> |
| <DD><p> |
| Register unmarshal event callback <A HREF="../../../javax/xml/bind/Unmarshaller.Listener.html" title="class in javax.xml.bind"><CODE>Unmarshaller.Listener</CODE></A> with this <A HREF="../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind"><CODE>Unmarshaller</CODE></A>. |
| |
| <p> |
| There is only one Listener per Unmarshaller. Setting a Listener replaces the previous set Listener. |
| One can unregister current Listener by setting listener to <tt>null</tt>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>listener</CODE> - provides unmarshal event callbacks for this <A HREF="../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind"><CODE>Unmarshaller</CODE></A><DT><B>Since:</B></DT> |
| <DD>JAXB2.0</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getListener()"><!-- --></A><H3> |
| getListener</H3> |
| <PRE> |
| <A HREF="../../../javax/xml/bind/Unmarshaller.Listener.html" title="class in javax.xml.bind">Unmarshaller.Listener</A> <B>getListener</B>()</PRE> |
| <DL> |
| <DD><p>Return <A HREF="../../../javax/xml/bind/Unmarshaller.Listener.html" title="class in javax.xml.bind"><CODE>Unmarshaller.Listener</CODE></A> registered with this <A HREF="../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind"><CODE>Unmarshaller</CODE></A>. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>registered <A HREF="../../../javax/xml/bind/Unmarshaller.Listener.html" title="class in javax.xml.bind"><CODE>Unmarshaller.Listener</CODE></A> or <code>null</code> if no Listener is registered with this Unmarshaller.<DT><B>Since:</B></DT> |
| <DD>JAXB2.0</DD> |
| </DL> |
| </DD> |
| </DL> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <HR> |
| |
| |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <A NAME="navbar_bottom"><!-- --></A> |
| <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../serialized-form.html"><FONT CLASS="NavBarFont1"><B>Serialized</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| EclipseLink 1.2.0, build 'v20091016-r5565' API Reference</EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind"><B>PREV CLASS</B></A> |
| <A HREF="../../../javax/xml/bind/Unmarshaller.Listener.html" title="class in javax.xml.bind"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../index.html?javax/xml/bind/Unmarshaller.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="Unmarshaller.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_bottom"></A> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| |
| <HR> |
| |
| </BODY> |
| </HTML> |