jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Unmarshaller.java
author aefimov
Fri, 10 Apr 2015 14:54:20 +0300
changeset 29839 6d5d546e953b
parent 28887 88470f768658
child 32795 5a5710ee05a0
permissions -rw-r--r--
8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412) Reviewed-by: joehw
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     1
/*
28887
88470f768658 8071585: Update JAX-WS RI integration to latest version (2.2.11-b150127.1410)
aefimov
parents: 25871
diff changeset
     2
 * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     4
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    10
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    15
 * accompanied this code).
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    16
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    20
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    23
 * questions.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    24
 */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    25
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    26
package javax.xml.bind;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    27
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    28
import javax.xml.bind.annotation.adapters.XmlAdapter;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    29
import javax.xml.bind.attachment.AttachmentUnmarshaller;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    30
import javax.xml.validation.Schema;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    31
import java.io.Reader;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    32
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    33
/**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    34
 * The <tt>Unmarshaller</tt> class governs the process of deserializing XML
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    35
 * data into newly created Java content trees, optionally validating the XML
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    36
 * data as it is unmarshalled.  It provides an overloading of unmarshal methods
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    37
 * for many different input kinds.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    38
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    39
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    40
 * Unmarshalling from a File:
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    41
 * <blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    42
 *    <pre>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    43
 *       JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    44
 *       Unmarshaller u = jc.createUnmarshaller();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    45
 *       Object o = u.unmarshal( new File( "nosferatu.xml" ) );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    46
 *    </pre>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    47
 * </blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    48
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    49
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    50
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    51
 * Unmarshalling from an InputStream:
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    52
 * <blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    53
 *    <pre>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    54
 *       InputStream is = new FileInputStream( "nosferatu.xml" );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    55
 *       JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    56
 *       Unmarshaller u = jc.createUnmarshaller();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    57
 *       Object o = u.unmarshal( is );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    58
 *    </pre>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    59
 * </blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    60
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    61
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    62
 * Unmarshalling from a URL:
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    63
 * <blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    64
 *    <pre>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    65
 *       JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    66
 *       Unmarshaller u = jc.createUnmarshaller();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    67
 *       URL url = new URL( "http://beaker.east/nosferatu.xml" );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    68
 *       Object o = u.unmarshal( url );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    69
 *    </pre>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    70
 * </blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    71
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    72
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    73
 * Unmarshalling from a StringBuffer using a
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    74
 * <tt>javax.xml.transform.stream.StreamSource</tt>:
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    75
 * <blockquote>
29839
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
    76
 *    <pre>{@code
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    77
 *       JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    78
 *       Unmarshaller u = jc.createUnmarshaller();
29839
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
    79
 *       StringBuffer xmlStr = new StringBuffer( "<?xml version="1.0"?>..." );
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    80
 *       Object o = u.unmarshal( new StreamSource( new StringReader( xmlStr.toString() ) ) );
29839
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
    81
 *    }</pre>
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    82
 * </blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    83
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    84
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    85
 * Unmarshalling from a <tt>org.w3c.dom.Node</tt>:
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    86
 * <blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    87
 *    <pre>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    88
 *       JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    89
 *       Unmarshaller u = jc.createUnmarshaller();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    90
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    91
 *       DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    92
 *       dbf.setNamespaceAware(true);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    93
 *       DocumentBuilder db = dbf.newDocumentBuilder();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    94
 *       Document doc = db.parse(new File( "nosferatu.xml"));
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    95
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    96
 *       Object o = u.unmarshal( doc );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    97
 *    </pre>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    98
 * </blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    99
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   100
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   101
 * Unmarshalling from a <tt>javax.xml.transform.sax.SAXSource</tt> using a
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   102
 * client specified validating SAX2.0 parser:
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   103
 * <blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   104
 *    <pre>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   105
 *       // configure a validating SAX2.0 parser (Xerces2)
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   106
 *       static final String JAXP_SCHEMA_LANGUAGE =
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   107
 *           "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   108
 *       static final String JAXP_SCHEMA_LOCATION =
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   109
 *           "http://java.sun.com/xml/jaxp/properties/schemaSource";
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   110
 *       static final String W3C_XML_SCHEMA =
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   111
 *           "http://www.w3.org/2001/XMLSchema";
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   112
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   113
 *       System.setProperty( "javax.xml.parsers.SAXParserFactory",
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   114
 *                           "org.apache.xerces.jaxp.SAXParserFactoryImpl" );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   115
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   116
 *       SAXParserFactory spf = SAXParserFactory.newInstance();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   117
 *       spf.setNamespaceAware(true);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   118
 *       spf.setValidating(true);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   119
 *       SAXParser saxParser = spf.newSAXParser();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   120
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   121
 *       try {
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   122
 *           saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   123
 *           saxParser.setProperty(JAXP_SCHEMA_LOCATION, "http://....");
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   124
 *       } catch (SAXNotRecognizedException x) {
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   125
 *           // exception handling omitted
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   126
 *       }
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   127
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   128
 *       XMLReader xmlReader = saxParser.getXMLReader();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   129
 *       SAXSource source =
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   130
 *           new SAXSource( xmlReader, new InputSource( "http://..." ) );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   131
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   132
 *       // Setup JAXB to unmarshal
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   133
 *       JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   134
 *       Unmarshaller u = jc.createUnmarshaller();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   135
 *       ValidationEventCollector vec = new ValidationEventCollector();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   136
 *       u.setEventHandler( vec );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   137
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   138
 *       // turn off the JAXB provider's default validation mechanism to
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   139
 *       // avoid duplicate validation
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   140
 *       u.setValidating( false )
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   141
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   142
 *       // unmarshal
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   143
 *       Object o = u.unmarshal( source );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   144
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   145
 *       // check for events
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   146
 *       if( vec.hasEvents() ) {
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   147
 *          // iterate over events
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   148
 *       }
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   149
 *    </pre>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   150
 * </blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   151
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   152
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   153
 * Unmarshalling from a StAX XMLStreamReader:
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   154
 * <blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   155
 *    <pre>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   156
 *       JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   157
 *       Unmarshaller u = jc.createUnmarshaller();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   158
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   159
 *       javax.xml.stream.XMLStreamReader xmlStreamReader =
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   160
 *           javax.xml.stream.XMLInputFactory().newInstance().createXMLStreamReader( ... );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   161
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   162
 *       Object o = u.unmarshal( xmlStreamReader );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   163
 *    </pre>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   164
 * </blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   165
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   166
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   167
 * Unmarshalling from a StAX XMLEventReader:
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   168
 * <blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   169
 *    <pre>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   170
 *       JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   171
 *       Unmarshaller u = jc.createUnmarshaller();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   172
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   173
 *       javax.xml.stream.XMLEventReader xmlEventReader =
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   174
 *           javax.xml.stream.XMLInputFactory().newInstance().createXMLEventReader( ... );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   175
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   176
 *       Object o = u.unmarshal( xmlEventReader );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   177
 *    </pre>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   178
 * </blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   179
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   180
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   181
 * <a name="unmarshalEx"></a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   182
 * <b>Unmarshalling XML Data</b><br>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   183
 * <blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   184
 * Unmarshalling can deserialize XML data that represents either an entire XML document
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   185
 * or a subtree of an XML document. Typically, it is sufficient to use the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   186
 * unmarshalling methods described by
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   187
 * <a href="#unmarshalGlobal">Unmarshal root element that is declared globally</a>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   188
 * These unmarshal methods utilize {@link JAXBContext}'s mapping of global XML element
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   189
 * declarations and type definitions to JAXB mapped classes to initiate the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   190
 * unmarshalling of the root element of  XML data.  When the {@link JAXBContext}'s
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   191
 * mappings are not sufficient to unmarshal the root element of XML data,
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   192
 * the application can assist the unmarshalling process by using the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   193
 * <a href="#unmarshalByDeclaredType">unmarshal by declaredType methods</a>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   194
 * These methods are useful for unmarshalling XML data where
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   195
 * the root element corresponds to a local element declaration in the schema.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   196
 * </blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   197
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   198
 * <blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   199
 * An unmarshal method never returns null. If the unmarshal process is unable to unmarshal
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   200
 * the root of XML content to a JAXB mapped object, a fatal error is reported that
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   201
 * terminates processing by throwing JAXBException.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   202
 * </blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   203
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   204
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   205
 * <a name="unmarshalGlobal"></a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   206
 * <b>Unmarshal a root element that is globally declared</b><br>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   207
 * <blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   208
 * The unmarshal methods that do not have an <tt>declaredType</tt> parameter use
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   209
 * {@link JAXBContext} to unmarshal the root element of an XML data. The {@link JAXBContext}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   210
 * instance is the one that was used to create this <tt>Unmarshaller</tt>. The {@link JAXBContext}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   211
 * instance maintains a mapping of globally declared XML element and type definition names to
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   212
 * JAXB mapped classes. The unmarshal method checks if {@link JAXBContext} has a mapping
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   213
 * from the root element's XML name and/or <tt>@xsi:type</tt> to a JAXB mapped class.  If it does, it umarshalls the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   214
 * XML data using the appropriate JAXB mapped class. Note that when the root element name is unknown and the root
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   215
 * element has an <tt>@xsi:type</tt>, the XML data is unmarshalled
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   216
 * using that JAXB mapped class as the value of a {@link JAXBElement}.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   217
 * When the {@link JAXBContext} object does not have a mapping for the root element's name
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   218
 * nor its <tt>@xsi:type</tt>, if it exists,
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   219
 * then the unmarshal operation will abort immediately by throwing a {@link UnmarshalException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   220
 * UnmarshalException}. This exception scenario can be worked around by using the unmarshal by
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   221
 * declaredType methods described in the next subsection.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   222
 * </blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   223
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   224
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   225
 * <a name="unmarshalByDeclaredType"></a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   226
 * <b>Unmarshal by Declared Type</b><br>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   227
 * <blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   228
 * The unmarshal methods with a <code>declaredType</code> parameter enable an
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   229
 * application to deserialize a root element of XML data, even when
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   230
 * there is no mapping in {@link JAXBContext} of the root element's XML name.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   231
 * The unmarshaller unmarshals the root element using the application provided
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   232
 * mapping specified as the <tt>declaredType</tt> parameter.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   233
 * Note that even when the root element's element name is mapped by {@link JAXBContext},
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   234
 * the <code>declaredType</code> parameter overrides that mapping for
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   235
 * deserializing the root element when using these unmarshal methods.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   236
 * Additionally, when the root element of XML data has an <tt>xsi:type</tt> attribute and
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   237
 * that attribute's value references a type definition that is mapped
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   238
 * to a JAXB mapped class by {@link JAXBContext}, that the root
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   239
 * element's <tt>xsi:type</tt> attribute takes
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   240
 * precedence over the unmarshal methods <tt>declaredType</tt> parameter.
29839
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   241
 * These methods always return a <tt>{@literal JAXBElement<declaredType>}</tt>
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   242
 * instance. The table below shows how the properties of the returned JAXBElement
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   243
 * instance are set.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   244
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   245
 * <a name="unmarshalDeclaredTypeReturn"></a>
28887
88470f768658 8071585: Update JAX-WS RI integration to latest version (2.2.11-b150127.1410)
aefimov
parents: 25871
diff changeset
   246
 *   <table summary="" border="2" rules="all" cellpadding="4">
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   247
 *   <thead>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   248
 *     <tr>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   249
 *       <th align="center" colspan="2">
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   250
 *       Unmarshal By Declared Type returned JAXBElement
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   251
 *       </tr>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   252
 *     <tr>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   253
 *       <th>JAXBElement Property</th>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   254
 *       <th>Value</th>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   255
 *     </tr>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   256
 *     <tr>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   257
 *       <td>name</td>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   258
 *       <td><code>xml element name</code></td>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   259
 *     </tr>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   260
 *   </thead>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   261
 *   <tbody>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   262
 *     <tr>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   263
 *       <td>value</td>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   264
 *       <td><code>instanceof declaredType</code></td>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   265
 *     </tr>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   266
 *     <tr>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   267
 *       <td>declaredType</td>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   268
 *       <td>unmarshal method <code>declaredType</code> parameter</td>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   269
 *     </tr>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   270
 *     <tr>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   271
 *       <td>scope</td>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   272
 *       <td><code>null</code> <i>(actual scope is unknown)</i></td>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   273
 *     </tr>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   274
 *   </tbody>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   275
 *  </table>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   276
 * </blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   277
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   278
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   279
 * The following is an example of
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   280
 * <a href="#unmarshalByDeclaredType">unmarshal by declaredType method</a>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   281
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   282
 * Unmarshal by declaredType from a <tt>org.w3c.dom.Node</tt>:
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   283
 * <blockquote>
29839
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   284
 *    <pre>{@code
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   285
 *       Schema fragment for example
29839
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   286
 *       <xs:schema>
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   287
 *          <xs:complexType name="FooType">...<\xs:complexType>
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   288
 *          <!-- global element declaration "PurchaseOrder" -->
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   289
 *          <xs:element name="PurchaseOrder">
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   290
 *              <xs:complexType>
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   291
 *                 <xs:sequence>
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   292
 *                    <!-- local element declaration "foo" -->
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   293
 *                    <xs:element name="foo" type="FooType"/>
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   294
 *                    ...
29839
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   295
 *                 </xs:sequence>
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   296
 *              </xs:complexType>
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   297
 *          </xs:element>
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   298
 *       </xs:schema>
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   299
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   300
 *       JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   301
 *       Unmarshaller u = jc.createUnmarshaller();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   302
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   303
 *       DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   304
 *       dbf.setNamespaceAware(true);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   305
 *       DocumentBuilder db = dbf.newDocumentBuilder();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   306
 *       Document doc = db.parse(new File( "nosferatu.xml"));
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   307
 *       Element  fooSubtree = ...; // traverse DOM till reach xml element foo, constrained by a
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   308
 *                                  // local element declaration in schema.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   309
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   310
 *       // FooType is the JAXB mapping of the type of local element declaration foo.
29839
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   311
 *       JAXBElement<FooType> foo = u.unmarshal( fooSubtree, FooType.class);
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   312
 *    }</pre>
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   313
 * </blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   314
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   315
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   316
 * <b>Support for SAX2.0 Compliant Parsers</b><br>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   317
 * <blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   318
 * A client application has the ability to select the SAX2.0 compliant parser
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   319
 * of their choice.  If a SAX parser is not selected, then the JAXB Provider's
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   320
 * default parser will be used.  Even though the JAXB Provider's default parser
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   321
 * is not required to be SAX2.0 compliant, all providers are required to allow
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   322
 * a client application to specify their own SAX2.0 parser.  Some providers may
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   323
 * require the client application to specify the SAX2.0 parser at schema compile
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   324
 * time. See {@link #unmarshal(javax.xml.transform.Source) unmarshal(Source)}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   325
 * for more detail.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   326
 * </blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   327
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   328
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   329
 * <b>Validation and Well-Formedness</b><br>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   330
 * <blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   331
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   332
 * A client application can enable or disable JAXP 1.3 validation
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   333
 * mechanism via the <tt>setSchema(javax.xml.validation.Schema)</tt> API.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   334
 * Sophisticated clients can specify their own validating SAX 2.0 compliant
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   335
 * parser and bypass the JAXP 1.3 validation mechanism using the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   336
 * {@link #unmarshal(javax.xml.transform.Source) unmarshal(Source)}  API.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   337
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   338
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   339
 * Since unmarshalling invalid XML content is defined in JAXB 2.0,
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   340
 * the Unmarshaller default validation event handler was made more lenient
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   341
 * than in JAXB 1.0.  When schema-derived code generated
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   342
 * by JAXB 1.0 binding compiler is registered with {@link JAXBContext},
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   343
 * the default unmarshal validation handler is
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   344
 * {@link javax.xml.bind.helpers.DefaultValidationEventHandler} and it
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   345
 * terminates the marshal  operation after encountering either a fatal error or an error.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   346
 * For a JAXB 2.0 client application, there is no explicitly defined default
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   347
 * validation handler and the default event handling only
16791
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents: 12009
diff changeset
   348
 * terminates the unmarshal operation after encountering a fatal error.
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   349
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   350
 * </blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   351
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   352
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   353
 * <a name="supportedProps"></a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   354
 * <b>Supported Properties</b><br>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   355
 * <blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   356
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   357
 * There currently are not any properties required to be supported by all
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   358
 * JAXB Providers on Unmarshaller.  However, some providers may support
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   359
 * their own set of provider specific properties.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   360
 * </blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   361
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   362
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   363
 * <a name="unmarshalEventCallback"></a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   364
 * <b>Unmarshal Event Callbacks</b><br>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   365
 * <blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   366
 * The {@link Unmarshaller} provides two styles of callback mechanisms
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   367
 * that allow application specific processing during key points in the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   368
 * unmarshalling process.  In 'class defined' event callbacks, application
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   369
 * specific code placed in JAXB mapped classes is triggered during
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   370
 * unmarshalling.  'External listeners' allow for centralized processing
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   371
 * of unmarshal events in one callback method rather than by type event callbacks.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   372
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   373
 * 'Class defined' event callback methods allow any JAXB mapped class to specify
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   374
 * its own specific callback methods by defining methods with the following method signature:
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   375
 * <blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   376
 * <pre>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   377
 *   // This method is called immediately after the object is created and before the unmarshalling of this
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   378
 *   // object begins. The callback provides an opportunity to initialize JavaBean properties prior to unmarshalling.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   379
 *   void beforeUnmarshal(Unmarshaller, Object parent);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   380
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   381
 *   //This method is called after all the properties (except IDREF) are unmarshalled for this object,
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   382
 *   //but before this object is set to the parent object.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   383
 *   void afterUnmarshal(Unmarshaller, Object parent);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   384
 * </pre>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   385
 * </blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   386
 * The class defined callback methods should be used when the callback method requires
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   387
 * access to non-public methods and/or fields of the class.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   388
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   389
 * The external listener callback mechanism enables the registration of a {@link Listener}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   390
 * instance with an {@link Unmarshaller#setListener(Listener)}. The external listener receives all callback events,
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   391
 * allowing for more centralized processing than per class defined callback methods.  The external listener
28887
88470f768658 8071585: Update JAX-WS RI integration to latest version (2.2.11-b150127.1410)
aefimov
parents: 25871
diff changeset
   392
 * receives events when unmarshalling process is marshalling to a JAXB element or to JAXB mapped class.
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   393
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   394
 * The 'class defined' and external listener event callback methods are independent of each other,
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   395
 * both can be called for one event.  The invocation ordering when both listener callback methods exist is
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   396
 * defined in {@link Listener#beforeUnmarshal(Object, Object)} and {@link Listener#afterUnmarshal(Object, Object)}.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   397
* <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   398
 * An event callback method throwing an exception terminates the current unmarshal process.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   399
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   400
 * </blockquote>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   401
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   402
 * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   403
 * @see JAXBContext
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   404
 * @see Marshaller
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   405
 * @see Validator
25840
c2002453eec3 8047724: @since tag cleanup in jaxws
henryjen
parents: 19645
diff changeset
   406
 * @since 1.6, JAXB 1.0
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   407
 */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   408
public interface Unmarshaller {
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   409
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   410
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   411
     * Unmarshal XML data from the specified file and return the resulting
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   412
     * content tree.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   413
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   414
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   415
     * Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   416
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   417
     * @param f the file to unmarshal XML data from
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   418
     * @return the newly created root object of the java content tree
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   419
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   420
     * @throws JAXBException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   421
     *     If any unexpected errors occur while unmarshalling
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   422
     * @throws UnmarshalException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   423
     *     If the {@link ValidationEventHandler ValidationEventHandler}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   424
     *     returns false from its <tt>handleEvent</tt> method or the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   425
     *     <tt>Unmarshaller</tt> is unable to perform the XML to Java
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   426
     *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   427
     * @throws IllegalArgumentException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   428
     *      If the file parameter is null
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   429
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   430
    public Object unmarshal( java.io.File f ) throws JAXBException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   431
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   432
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   433
     * Unmarshal XML data from the specified InputStream and return the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   434
     * resulting content tree.  Validation event location information may
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   435
     * be incomplete when using this form of the unmarshal API.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   436
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   437
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   438
     * Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   439
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   440
     * @param is the InputStream to unmarshal XML data from
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   441
     * @return the newly created root object of the java content tree
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   442
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   443
     * @throws JAXBException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   444
     *     If any unexpected errors occur while unmarshalling
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   445
     * @throws UnmarshalException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   446
     *     If the {@link ValidationEventHandler ValidationEventHandler}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   447
     *     returns false from its <tt>handleEvent</tt> method or the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   448
     *     <tt>Unmarshaller</tt> is unable to perform the XML to Java
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   449
     *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   450
     * @throws IllegalArgumentException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   451
     *      If the InputStream parameter is null
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   452
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   453
    public Object unmarshal( java.io.InputStream is ) throws JAXBException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   454
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   455
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   456
     * Unmarshal XML data from the specified Reader and return the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   457
     * resulting content tree.  Validation event location information may
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   458
     * be incomplete when using this form of the unmarshal API,
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   459
     * because a Reader does not provide the system ID.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   460
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   461
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   462
     * Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   463
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   464
     * @param reader the Reader to unmarshal XML data from
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   465
     * @return the newly created root object of the java content tree
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   466
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   467
     * @throws JAXBException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   468
     *     If any unexpected errors occur while unmarshalling
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   469
     * @throws UnmarshalException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   470
     *     If the {@link ValidationEventHandler ValidationEventHandler}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   471
     *     returns false from its <tt>handleEvent</tt> method or the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   472
     *     <tt>Unmarshaller</tt> is unable to perform the XML to Java
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   473
     *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   474
     * @throws IllegalArgumentException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   475
     *      If the InputStream parameter is null
25840
c2002453eec3 8047724: @since tag cleanup in jaxws
henryjen
parents: 19645
diff changeset
   476
     * @since 1.6, JAXB 2.0
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   477
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   478
    public Object unmarshal( Reader reader ) throws JAXBException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   479
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   480
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   481
     * Unmarshal XML data from the specified URL and return the resulting
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   482
     * content tree.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   483
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   484
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   485
     * Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   486
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   487
     * @param url the url to unmarshal XML data from
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   488
     * @return the newly created root object of the java content tree
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   489
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   490
     * @throws JAXBException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   491
     *     If any unexpected errors occur while unmarshalling
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   492
     * @throws UnmarshalException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   493
     *     If the {@link ValidationEventHandler ValidationEventHandler}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   494
     *     returns false from its <tt>handleEvent</tt> method or the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   495
     *     <tt>Unmarshaller</tt> is unable to perform the XML to Java
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   496
     *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   497
     * @throws IllegalArgumentException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   498
     *      If the URL parameter is null
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   499
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   500
    public Object unmarshal( java.net.URL url ) throws JAXBException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   501
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   502
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   503
     * Unmarshal XML data from the specified SAX InputSource and return the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   504
     * resulting content tree.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   505
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   506
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   507
     * Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   508
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   509
     * @param source the input source to unmarshal XML data from
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   510
     * @return the newly created root object of the java content tree
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   511
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   512
     * @throws JAXBException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   513
     *     If any unexpected errors occur while unmarshalling
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   514
     * @throws UnmarshalException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   515
     *     If the {@link ValidationEventHandler ValidationEventHandler}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   516
     *     returns false from its <tt>handleEvent</tt> method or the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   517
     *     <tt>Unmarshaller</tt> is unable to perform the XML to Java
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   518
     *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   519
     * @throws IllegalArgumentException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   520
     *      If the InputSource parameter is null
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   521
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   522
    public Object unmarshal( org.xml.sax.InputSource source ) throws JAXBException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   523
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   524
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   525
     * Unmarshal global XML data from the specified DOM tree and return the resulting
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   526
     * content tree.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   527
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   528
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   529
     * Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   530
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   531
     * @param node
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   532
     *      the document/element to unmarshal XML data from.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   533
     *      The caller must support at least Document and Element.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   534
     * @return the newly created root object of the java content tree
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   535
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   536
     * @throws JAXBException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   537
     *     If any unexpected errors occur while unmarshalling
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   538
     * @throws UnmarshalException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   539
     *     If the {@link ValidationEventHandler ValidationEventHandler}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   540
     *     returns false from its <tt>handleEvent</tt> method or the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   541
     *     <tt>Unmarshaller</tt> is unable to perform the XML to Java
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   542
     *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   543
     * @throws IllegalArgumentException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   544
     *      If the Node parameter is null
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   545
     * @see #unmarshal(org.w3c.dom.Node, Class)
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   546
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   547
    public Object unmarshal( org.w3c.dom.Node node ) throws JAXBException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   548
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   549
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   550
     * Unmarshal XML data by JAXB mapped <tt>declaredType</tt>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   551
     * and return the resulting content tree.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   552
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   553
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   554
     * Implements <a href="#unmarshalByDeclaredType">Unmarshal by Declared Type</a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   555
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   556
     * @param node
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   557
     *      the document/element to unmarshal XML data from.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   558
     *      The caller must support at least Document and Element.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   559
     * @param declaredType
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   560
     *      appropriate JAXB mapped class to hold <tt>node</tt>'s XML data.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   561
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   562
     * @return <a href="#unmarshalDeclaredTypeReturn">JAXB Element</a> representation of <tt>node</tt>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   563
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   564
     * @throws JAXBException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   565
     *     If any unexpected errors occur while unmarshalling
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   566
     * @throws UnmarshalException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   567
     *     If the {@link ValidationEventHandler ValidationEventHandler}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   568
     *     returns false from its <tt>handleEvent</tt> method or the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   569
     *     <tt>Unmarshaller</tt> is unable to perform the XML to Java
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   570
     *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   571
     * @throws IllegalArgumentException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   572
     *      If any parameter is null
25840
c2002453eec3 8047724: @since tag cleanup in jaxws
henryjen
parents: 19645
diff changeset
   573
     * @since 1.6, JAXB 2.0
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   574
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   575
    public <T> JAXBElement<T> unmarshal( org.w3c.dom.Node node, Class<T> declaredType ) throws JAXBException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   576
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   577
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   578
     * Unmarshal XML data from the specified XML Source and return the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   579
     * resulting content tree.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   580
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   581
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   582
     * Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   583
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   584
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   585
     * <a name="saxParserPlugable"></a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   586
     * <b>SAX 2.0 Parser Pluggability</b>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   587
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   588
     * A client application can choose not to use the default parser mechanism
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   589
     * supplied with their JAXB provider.  Any SAX 2.0 compliant parser can be
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   590
     * substituted for the JAXB provider's default mechanism.  To do so, the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   591
     * client application must properly configure a <tt>SAXSource</tt> containing
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   592
     * an <tt>XMLReader</tt> implemented by the SAX 2.0 parser provider.  If the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   593
     * <tt>XMLReader</tt> has an <tt>org.xml.sax.ErrorHandler</tt> registered
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   594
     * on it, it will be replaced by the JAXB Provider so that validation errors
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   595
     * can be reported via the <tt>ValidationEventHandler</tt> mechanism of
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   596
     * JAXB.  If the <tt>SAXSource</tt> does not contain an <tt>XMLReader</tt>,
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   597
     * then the JAXB provider's default parser mechanism will be used.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   598
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   599
     * This parser replacement mechanism can also be used to replace the JAXB
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   600
     * provider's unmarshal-time validation engine.  The client application
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   601
     * must properly configure their SAX 2.0 compliant parser to perform
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   602
     * validation (as shown in the example above).  Any <tt>SAXParserExceptions
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   603
     * </tt> encountered by the parser during the unmarshal operation will be
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   604
     * processed by the JAXB provider and converted into JAXB
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   605
     * <tt>ValidationEvent</tt> objects which will be reported back to the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   606
     * client via the <tt>ValidationEventHandler</tt> registered with the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   607
     * <tt>Unmarshaller</tt>.  <i>Note:</i> specifying a substitute validating
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   608
     * SAX 2.0 parser for unmarshalling does not necessarily replace the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   609
     * validation engine used by the JAXB provider for performing on-demand
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   610
     * validation.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   611
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   612
     * The only way for a client application to specify an alternate parser
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   613
     * mechanism to be used during unmarshal is via the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   614
     * <tt>unmarshal(SAXSource)</tt> API.  All other forms of the unmarshal
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   615
     * method (File, URL, Node, etc) will use the JAXB provider's default
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   616
     * parser and validator mechanisms.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   617
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   618
     * @param source the XML Source to unmarshal XML data from (providers are
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   619
     *        only required to support SAXSource, DOMSource, and StreamSource)
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   620
     * @return the newly created root object of the java content tree
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   621
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   622
     * @throws JAXBException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   623
     *     If any unexpected errors occur while unmarshalling
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   624
     * @throws UnmarshalException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   625
     *     If the {@link ValidationEventHandler ValidationEventHandler}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   626
     *     returns false from its <tt>handleEvent</tt> method or the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   627
     *     <tt>Unmarshaller</tt> is unable to perform the XML to Java
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   628
     *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   629
     * @throws IllegalArgumentException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   630
     *      If the Source parameter is null
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   631
     * @see #unmarshal(javax.xml.transform.Source, Class)
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   632
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   633
    public Object unmarshal( javax.xml.transform.Source source )
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   634
        throws JAXBException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   635
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   636
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   637
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   638
     * Unmarshal XML data from the specified XML Source by <tt>declaredType</tt> and return the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   639
     * resulting content tree.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   640
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   641
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   642
     * Implements <a href="#unmarshalByDeclaredType">Unmarshal by Declared Type</a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   643
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   644
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   645
     * See <a href="#saxParserPlugable">SAX 2.0 Parser Pluggability</a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   646
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   647
     * @param source the XML Source to unmarshal XML data from (providers are
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   648
     *        only required to support SAXSource, DOMSource, and StreamSource)
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   649
     * @param declaredType
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   650
     *      appropriate JAXB mapped class to hold <tt>source</tt>'s xml root element
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   651
     * @return Java content rooted by <a href="#unmarshalDeclaredTypeReturn">JAXB Element</a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   652
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   653
     * @throws JAXBException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   654
     *     If any unexpected errors occur while unmarshalling
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   655
     * @throws UnmarshalException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   656
     *     If the {@link ValidationEventHandler ValidationEventHandler}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   657
     *     returns false from its <tt>handleEvent</tt> method or the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   658
     *     <tt>Unmarshaller</tt> is unable to perform the XML to Java
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   659
     *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   660
     * @throws IllegalArgumentException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   661
     *      If any parameter is null
25840
c2002453eec3 8047724: @since tag cleanup in jaxws
henryjen
parents: 19645
diff changeset
   662
     * @since 1.6, JAXB 2.0
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   663
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   664
    public <T> JAXBElement<T> unmarshal( javax.xml.transform.Source source, Class<T> declaredType )
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   665
        throws JAXBException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   666
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   667
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   668
     * Unmarshal XML data from the specified pull parser and return the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   669
     * resulting content tree.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   670
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   671
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   672
     * Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   673
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   674
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   675
     * This method assumes that the parser is on a START_DOCUMENT or
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   676
     * START_ELEMENT event.  Unmarshalling will be done from this
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   677
     * start event to the corresponding end event.  If this method
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   678
     * returns successfully, the <tt>reader</tt> will be pointing at
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   679
     * the token right after the end event.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   680
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   681
     * @param reader
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   682
     *      The parser to be read.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   683
     * @return
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   684
     *      the newly created root object of the java content tree.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   685
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   686
     * @throws JAXBException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   687
     *     If any unexpected errors occur while unmarshalling
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   688
     * @throws UnmarshalException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   689
     *     If the {@link ValidationEventHandler ValidationEventHandler}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   690
     *     returns false from its <tt>handleEvent</tt> method or the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   691
     *     <tt>Unmarshaller</tt> is unable to perform the XML to Java
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   692
     *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   693
     * @throws IllegalArgumentException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   694
     *      If the <tt>reader</tt> parameter is null
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   695
     * @throws IllegalStateException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   696
     *      If <tt>reader</tt> is not pointing to a START_DOCUMENT or
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   697
     *      START_ELEMENT  event.
25840
c2002453eec3 8047724: @since tag cleanup in jaxws
henryjen
parents: 19645
diff changeset
   698
     * @since 1.6, JAXB 2.0
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   699
     * @see #unmarshal(javax.xml.stream.XMLStreamReader, Class)
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   700
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   701
    public Object unmarshal( javax.xml.stream.XMLStreamReader reader )
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   702
        throws JAXBException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   703
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   704
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   705
     * Unmarshal root element to JAXB mapped <tt>declaredType</tt>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   706
     * and return the resulting content tree.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   707
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   708
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   709
     * This method implements <a href="#unmarshalByDeclaredType">unmarshal by declaredType</a>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   710
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   711
     * This method assumes that the parser is on a START_DOCUMENT or
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   712
     * START_ELEMENT event. Unmarshalling will be done from this
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   713
     * start event to the corresponding end event.  If this method
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   714
     * returns successfully, the <tt>reader</tt> will be pointing at
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   715
     * the token right after the end event.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   716
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   717
     * @param reader
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   718
     *      The parser to be read.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   719
     * @param declaredType
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   720
     *      appropriate JAXB mapped class to hold <tt>reader</tt>'s START_ELEMENT XML data.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   721
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   722
     * @return   content tree rooted by <a href="#unmarshalDeclaredTypeReturn">JAXB Element representation</a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   723
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   724
     * @throws JAXBException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   725
     *     If any unexpected errors occur while unmarshalling
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   726
     * @throws UnmarshalException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   727
     *     If the {@link ValidationEventHandler ValidationEventHandler}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   728
     *     returns false from its <tt>handleEvent</tt> method or the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   729
     *     <tt>Unmarshaller</tt> is unable to perform the XML to Java
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   730
     *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   731
     * @throws IllegalArgumentException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   732
     *      If any parameter is null
25840
c2002453eec3 8047724: @since tag cleanup in jaxws
henryjen
parents: 19645
diff changeset
   733
     * @since 1.6, JAXB 2.0
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   734
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   735
    public <T> JAXBElement<T> unmarshal( javax.xml.stream.XMLStreamReader reader, Class<T> declaredType ) throws JAXBException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   736
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   737
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   738
     * Unmarshal XML data from the specified pull parser and return the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   739
     * resulting content tree.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   740
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   741
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   742
     * This method is an <a href="#unmarshalGlobal">Unmarshal Global Root method</a>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   743
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   744
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   745
     * This method assumes that the parser is on a START_DOCUMENT or
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   746
     * START_ELEMENT event.  Unmarshalling will be done from this
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   747
     * start event to the corresponding end event.  If this method
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   748
     * returns successfully, the <tt>reader</tt> will be pointing at
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   749
     * the token right after the end event.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   750
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   751
     * @param reader
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   752
     *      The parser to be read.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   753
     * @return
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   754
     *      the newly created root object of the java content tree.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   755
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   756
     * @throws JAXBException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   757
     *     If any unexpected errors occur while unmarshalling
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   758
     * @throws UnmarshalException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   759
     *     If the {@link ValidationEventHandler ValidationEventHandler}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   760
     *     returns false from its <tt>handleEvent</tt> method or the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   761
     *     <tt>Unmarshaller</tt> is unable to perform the XML to Java
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   762
     *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   763
     * @throws IllegalArgumentException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   764
     *      If the <tt>reader</tt> parameter is null
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   765
     * @throws IllegalStateException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   766
     *      If <tt>reader</tt> is not pointing to a START_DOCUMENT or
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   767
     *      START_ELEMENT event.
25840
c2002453eec3 8047724: @since tag cleanup in jaxws
henryjen
parents: 19645
diff changeset
   768
     * @since 1.6, JAXB 2.0
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   769
     * @see #unmarshal(javax.xml.stream.XMLEventReader, Class)
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   770
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   771
    public Object unmarshal( javax.xml.stream.XMLEventReader reader )
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   772
        throws JAXBException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   773
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   774
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   775
     * Unmarshal root element to JAXB mapped <tt>declaredType</tt>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   776
     * and return the resulting content tree.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   777
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   778
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   779
     * This method implements <a href="#unmarshalByDeclaredType">unmarshal by declaredType</a>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   780
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   781
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   782
     * This method assumes that the parser is on a START_DOCUMENT or
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   783
     * START_ELEMENT event. Unmarshalling will be done from this
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   784
     * start event to the corresponding end event.  If this method
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   785
     * returns successfully, the <tt>reader</tt> will be pointing at
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   786
     * the token right after the end event.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   787
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   788
     * @param reader
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   789
     *      The parser to be read.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   790
     * @param declaredType
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   791
     *      appropriate JAXB mapped class to hold <tt>reader</tt>'s START_ELEMENT XML data.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   792
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   793
     * @return   content tree rooted by <a href="#unmarshalDeclaredTypeReturn">JAXB Element representation</a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   794
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   795
     * @throws JAXBException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   796
     *     If any unexpected errors occur while unmarshalling
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   797
     * @throws UnmarshalException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   798
     *     If the {@link ValidationEventHandler ValidationEventHandler}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   799
     *     returns false from its <tt>handleEvent</tt> method or the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   800
     *     <tt>Unmarshaller</tt> is unable to perform the XML to Java
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   801
     *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   802
     * @throws IllegalArgumentException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   803
     *      If any parameter is null
25840
c2002453eec3 8047724: @since tag cleanup in jaxws
henryjen
parents: 19645
diff changeset
   804
     * @since 1.6, JAXB 2.0
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   805
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   806
    public <T> JAXBElement<T> unmarshal( javax.xml.stream.XMLEventReader reader, Class<T> declaredType ) throws JAXBException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   807
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   808
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   809
     * Get an unmarshaller handler object that can be used as a component in
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   810
     * an XML pipeline.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   811
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   812
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   813
     * The JAXB Provider can return the same handler object for multiple
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   814
     * invocations of this method. In other words, this method does not
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   815
     * necessarily create a new instance of <tt>UnmarshallerHandler</tt>. If the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   816
     * application needs to use more than one <tt>UnmarshallerHandler</tt>, it
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   817
     * should create more than one <tt>Unmarshaller</tt>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   818
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   819
     * @return the unmarshaller handler object
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   820
     * @see UnmarshallerHandler
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   821
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   822
    public UnmarshallerHandler getUnmarshallerHandler();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   823
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   824
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   825
     * Specifies whether or not the default validation mechanism of the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   826
     * <tt>Unmarshaller</tt> should validate during unmarshal operations.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   827
     * By default, the <tt>Unmarshaller</tt> does not validate.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   828
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   829
     * This method may only be invoked before or after calling one of the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   830
     * unmarshal methods.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   831
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   832
     * This method only controls the JAXB Provider's default unmarshal-time
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   833
     * validation mechanism - it has no impact on clients that specify their
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   834
     * own validating SAX 2.0 compliant parser.  Clients that specify their
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   835
     * own unmarshal-time validation mechanism may wish to turn off the JAXB
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   836
     * Provider's default validation mechanism via this API to avoid "double
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   837
     * validation".
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   838
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   839
     * This method is deprecated as of JAXB 2.0 - please use the new
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   840
     * {@link #setSchema(javax.xml.validation.Schema)} API.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   841
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   842
     * @param validating true if the Unmarshaller should validate during
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   843
     *        unmarshal, false otherwise
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   844
     * @throws JAXBException if an error occurred while enabling or disabling
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   845
     *         validation at unmarshal time
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   846
     * @throws UnsupportedOperationException could be thrown if this method is
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   847
     *         invoked on an Unmarshaller created from a JAXBContext referencing
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   848
     *         JAXB 2.0 mapped classes
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   849
     * @deprecated since JAXB2.0, please see {@link #setSchema(javax.xml.validation.Schema)}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   850
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   851
    public void setValidating( boolean validating )
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   852
        throws JAXBException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   853
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   854
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   855
     * Indicates whether or not the <tt>Unmarshaller</tt> is configured to
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   856
     * validate during unmarshal operations.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   857
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   858
     * This API returns the state of the JAXB Provider's default unmarshal-time
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   859
     * validation mechanism.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   860
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   861
     * This method is deprecated as of JAXB 2.0 - please use the new
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   862
     * {@link #getSchema()} API.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   863
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   864
     * @return true if the Unmarshaller is configured to validate during
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   865
     *         unmarshal operations, false otherwise
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   866
     * @throws JAXBException if an error occurs while retrieving the validating
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   867
     *         flag
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   868
     * @throws UnsupportedOperationException could be thrown if this method is
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   869
     *         invoked on an Unmarshaller created from a JAXBContext referencing
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   870
     *         JAXB 2.0 mapped classes
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   871
     * @deprecated since JAXB2.0, please see {@link #getSchema()}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   872
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   873
    public boolean isValidating()
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   874
        throws JAXBException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   875
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   876
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   877
     * Allow an application to register a <tt>ValidationEventHandler</tt>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   878
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   879
     * The <tt>ValidationEventHandler</tt> will be called by the JAXB Provider
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   880
     * if any validation errors are encountered during calls to any of the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   881
     * unmarshal methods.  If the client application does not register a
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   882
     * <tt>ValidationEventHandler</tt> before invoking the unmarshal methods,
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   883
     * then <tt>ValidationEvents</tt> will be handled by the default event
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   884
     * handler which will terminate the unmarshal operation after the first
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   885
     * error or fatal error is encountered.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   886
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   887
     * Calling this method with a null parameter will cause the Unmarshaller
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   888
     * to revert back to the default event handler.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   889
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   890
     * @param handler the validation event handler
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   891
     * @throws JAXBException if an error was encountered while setting the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   892
     *         event handler
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   893
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   894
    public void setEventHandler( ValidationEventHandler handler )
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   895
        throws JAXBException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   896
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   897
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   898
     * Return the current event handler or the default event handler if one
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   899
     * hasn't been set.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   900
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   901
     * @return the current ValidationEventHandler or the default event handler
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   902
     *         if it hasn't been set
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   903
     * @throws JAXBException if an error was encountered while getting the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   904
     *         current event handler
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   905
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   906
    public ValidationEventHandler getEventHandler()
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   907
        throws JAXBException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   908
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   909
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   910
     * Set the particular property in the underlying implementation of
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   911
     * <tt>Unmarshaller</tt>.  This method can only be used to set one of
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   912
     * the standard JAXB defined properties above or a provider specific
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   913
     * property.  Attempting to set an undefined property will result in
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   914
     * a PropertyException being thrown.  See <a href="#supportedProps">
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   915
     * Supported Properties</a>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   916
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   917
     * @param name the name of the property to be set. This value can either
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   918
     *              be specified using one of the constant fields or a user
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   919
     *              supplied string.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   920
     * @param value the value of the property to be set
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   921
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   922
     * @throws PropertyException when there is an error processing the given
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   923
     *                            property or value
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   924
     * @throws IllegalArgumentException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   925
     *      If the name parameter is null
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   926
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   927
    public void setProperty( String name, Object value )
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   928
        throws PropertyException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   929
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   930
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   931
     * Get the particular property in the underlying implementation of
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   932
     * <tt>Unmarshaller</tt>.  This method can only be used to get one of
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   933
     * the standard JAXB defined properties above or a provider specific
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   934
     * property.  Attempting to get an undefined property will result in
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   935
     * a PropertyException being thrown.  See <a href="#supportedProps">
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   936
     * Supported Properties</a>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   937
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   938
     * @param name the name of the property to retrieve
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   939
     * @return the value of the requested property
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   940
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   941
     * @throws PropertyException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   942
     *      when there is an error retrieving the given property or value
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   943
     *      property name
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   944
     * @throws IllegalArgumentException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   945
     *      If the name parameter is null
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   946
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   947
    public Object getProperty( String name ) throws PropertyException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   948
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   949
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   950
     * Specify the JAXP 1.3 {@link javax.xml.validation.Schema Schema}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   951
     * object that should be used to validate subsequent unmarshal operations
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   952
     * against.  Passing null into this method will disable validation.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   953
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   954
     * This method replaces the deprecated {@link #setValidating(boolean) setValidating(boolean)}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   955
     * API.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   956
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   957
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   958
     * Initially this property is set to <tt>null</tt>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   959
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   960
     * @param schema Schema object to validate unmarshal operations against or null to disable validation
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   961
     * @throws UnsupportedOperationException could be thrown if this method is
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   962
     *         invoked on an Unmarshaller created from a JAXBContext referencing
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   963
     *         JAXB 1.0 mapped classes
25840
c2002453eec3 8047724: @since tag cleanup in jaxws
henryjen
parents: 19645
diff changeset
   964
     * @since 1.6, JAXB 2.0
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   965
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   966
    public void setSchema( javax.xml.validation.Schema schema );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   967
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   968
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   969
     * Get the JAXP 1.3 {@link javax.xml.validation.Schema Schema} object
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   970
     * being used to perform unmarshal-time validation.  If there is no
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   971
     * Schema set on the unmarshaller, then this method will return null
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   972
     * indicating that unmarshal-time validation will not be performed.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   973
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   974
     * This method provides replacement functionality for the deprecated
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   975
     * {@link #isValidating()} API as well as access to the Schema object.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   976
     * To determine if the Unmarshaller has validation enabled, simply
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   977
     * test the return type for null:
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   978
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   979
     * <code>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   980
     *   boolean isValidating = u.getSchema()!=null;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   981
     * </code>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   982
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   983
     * @return the Schema object being used to perform unmarshal-time
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   984
     *      validation or null if not present
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   985
     * @throws UnsupportedOperationException could be thrown if this method is
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   986
     *         invoked on an Unmarshaller created from a JAXBContext referencing
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   987
     *         JAXB 1.0 mapped classes
25840
c2002453eec3 8047724: @since tag cleanup in jaxws
henryjen
parents: 19645
diff changeset
   988
     * @since 1.6, JAXB 2.0
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   989
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   990
    public javax.xml.validation.Schema getSchema();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   991
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   992
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   993
     * Associates a configured instance of {@link XmlAdapter} with this unmarshaller.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   994
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   995
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   996
     * This is a convenience method that invokes <code>setAdapter(adapter.getClass(),adapter);</code>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   997
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   998
     * @see #setAdapter(Class,XmlAdapter)
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   999
     * @throws IllegalArgumentException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1000
     *      if the adapter parameter is null.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1001
     * @throws UnsupportedOperationException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1002
     *      if invoked agains a JAXB 1.0 implementation.
25840
c2002453eec3 8047724: @since tag cleanup in jaxws
henryjen
parents: 19645
diff changeset
  1003
     * @since 1.6, JAXB 2.0
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1004
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1005
    public void setAdapter( XmlAdapter adapter );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1006
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1007
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1008
     * Associates a configured instance of {@link XmlAdapter} with this unmarshaller.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1009
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1010
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1011
     * Every unmarshaller internally maintains a
28887
88470f768658 8071585: Update JAX-WS RI integration to latest version (2.2.11-b150127.1410)
aefimov
parents: 25871
diff changeset
  1012
     * {@link java.util.Map}&lt;{@link Class},{@link XmlAdapter}&gt;,
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1013
     * which it uses for unmarshalling classes whose fields/methods are annotated
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1014
     * with {@link javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter}.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1015
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1016
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1017
     * This method allows applications to use a configured instance of {@link XmlAdapter}.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1018
     * When an instance of an adapter is not given, an unmarshaller will create
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1019
     * one by invoking its default constructor.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1020
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1021
     * @param type
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1022
     *      The type of the adapter. The specified instance will be used when
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1023
     *      {@link javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter#value()}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1024
     *      refers to this type.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1025
     * @param adapter
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1026
     *      The instance of the adapter to be used. If null, it will un-register
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1027
     *      the current adapter set for this type.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1028
     * @throws IllegalArgumentException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1029
     *      if the type parameter is null.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1030
     * @throws UnsupportedOperationException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1031
     *      if invoked agains a JAXB 1.0 implementation.
25840
c2002453eec3 8047724: @since tag cleanup in jaxws
henryjen
parents: 19645
diff changeset
  1032
     * @since 1.6, JAXB 2.0
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1033
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1034
    public <A extends XmlAdapter> void setAdapter( Class<A> type, A adapter );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1035
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1036
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1037
     * Gets the adapter associated with the specified type.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1038
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1039
     * This is the reverse operation of the {@link #setAdapter} method.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1040
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1041
     * @throws IllegalArgumentException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1042
     *      if the type parameter is null.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1043
     * @throws UnsupportedOperationException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1044
     *      if invoked agains a JAXB 1.0 implementation.
25840
c2002453eec3 8047724: @since tag cleanup in jaxws
henryjen
parents: 19645
diff changeset
  1045
     * @since 1.6, JAXB 2.0
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1046
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1047
    public <A extends XmlAdapter> A getAdapter( Class<A> type );
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1048
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1049
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1050
     * <p>Associate a context that resolves cid's, content-id URIs, to
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1051
     * binary data passed as attachments.</p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1052
     * <p>Unmarshal time validation, enabled via {@link #setSchema(Schema)},
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1053
     * must be supported even when unmarshaller is performing XOP processing.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1054
     * </p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1055
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1056
     * @throws IllegalStateException if attempt to concurrently call this
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1057
     *                               method during a unmarshal operation.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1058
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1059
    void setAttachmentUnmarshaller(AttachmentUnmarshaller au);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1060
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1061
    AttachmentUnmarshaller getAttachmentUnmarshaller();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1062
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1063
    /**
28887
88470f768658 8071585: Update JAX-WS RI integration to latest version (2.2.11-b150127.1410)
aefimov
parents: 25871
diff changeset
  1064
     * <p>
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1065
     * Register an instance of an implementation of this class with {@link Unmarshaller} to externally listen
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1066
     * for unmarshal events.
28887
88470f768658 8071585: Update JAX-WS RI integration to latest version (2.2.11-b150127.1410)
aefimov
parents: 25871
diff changeset
  1067
     * </p>
88470f768658 8071585: Update JAX-WS RI integration to latest version (2.2.11-b150127.1410)
aefimov
parents: 25871
diff changeset
  1068
     * <p>
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1069
     * This class enables pre and post processing of an instance of a JAXB mapped class
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1070
     * as XML data is unmarshalled into it. The event callbacks are called when unmarshalling
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1071
     * XML content into a JAXBElement instance or a JAXB mapped class that represents a complex type definition.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1072
     * The event callbacks are not called when unmarshalling to an instance of a
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1073
     * Java datatype that represents a simple type definition.
28887
88470f768658 8071585: Update JAX-WS RI integration to latest version (2.2.11-b150127.1410)
aefimov
parents: 25871
diff changeset
  1074
     * </p>
88470f768658 8071585: Update JAX-WS RI integration to latest version (2.2.11-b150127.1410)
aefimov
parents: 25871
diff changeset
  1075
     * <p>
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1076
     * External listener is one of two different mechanisms for defining unmarshal event callbacks.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1077
     * See <a href="Unmarshaller.html#unmarshalEventCallback">Unmarshal Event Callbacks</a> for an overview.
28887
88470f768658 8071585: Update JAX-WS RI integration to latest version (2.2.11-b150127.1410)
aefimov
parents: 25871
diff changeset
  1078
     * </p>
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1079
     * (@link #setListener(Listener)}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1080
     * (@link #getListener()}
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1081
     *
25840
c2002453eec3 8047724: @since tag cleanup in jaxws
henryjen
parents: 19645
diff changeset
  1082
     * @since 1.6, JAXB 2.0
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1083
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1084
    public static abstract class Listener {
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1085
        /**
28887
88470f768658 8071585: Update JAX-WS RI integration to latest version (2.2.11-b150127.1410)
aefimov
parents: 25871
diff changeset
  1086
         * <p>
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1087
         * Callback method invoked before unmarshalling into <tt>target</tt>.
28887
88470f768658 8071585: Update JAX-WS RI integration to latest version (2.2.11-b150127.1410)
aefimov
parents: 25871
diff changeset
  1088
         * </p>
88470f768658 8071585: Update JAX-WS RI integration to latest version (2.2.11-b150127.1410)
aefimov
parents: 25871
diff changeset
  1089
         * <p>
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1090
         * This method is invoked immediately after <tt>target</tt> was created and
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1091
         * before the unmarshalling of this object begins. Note that
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1092
         * if the class of <tt>target</tt> defines its own <tt>beforeUnmarshal</tt> method,
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1093
         * the class specific callback method is invoked before this method is invoked.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1094
         *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1095
         * @param target non-null instance of JAXB mapped class prior to unmarshalling into it.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1096
         * @param parent instance of JAXB mapped class that will eventually reference <tt>target</tt>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1097
         *               <tt>null</tt> when <tt>target</tt> is root element.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1098
         */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1099
        public void beforeUnmarshal(Object target, Object parent) {
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1100
        }
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1101
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1102
        /**
28887
88470f768658 8071585: Update JAX-WS RI integration to latest version (2.2.11-b150127.1410)
aefimov
parents: 25871
diff changeset
  1103
         * <p>
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1104
         * Callback method invoked after unmarshalling XML data into <tt>target</tt>.
28887
88470f768658 8071585: Update JAX-WS RI integration to latest version (2.2.11-b150127.1410)
aefimov
parents: 25871
diff changeset
  1105
         * </p>
88470f768658 8071585: Update JAX-WS RI integration to latest version (2.2.11-b150127.1410)
aefimov
parents: 25871
diff changeset
  1106
         * <p>
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1107
         * This method is invoked after all the properties (except IDREF) are unmarshalled into <tt>target</tt>,
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1108
         * but before <tt>target</tt> is set into its <tt>parent</tt> object.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1109
         * Note that if the class of <tt>target</tt> defines its own <tt>afterUnmarshal</tt> method,
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1110
         * the class specific callback method is invoked before this method is invoked.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1111
         *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1112
         * @param target non-null instance of JAXB mapped class prior to unmarshalling into it.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1113
         * @param parent instance of JAXB mapped class that will reference <tt>target</tt>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1114
         *               <tt>null</tt> when <tt>target</tt> is root element.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1115
         */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1116
        public void afterUnmarshal(Object target, Object parent) {
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1117
        }
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1118
    }
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1119
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1120
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1121
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1122
     * Register unmarshal event callback {@link Listener} with this {@link Unmarshaller}.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1123
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1124
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1125
     * There is only one Listener per Unmarshaller. Setting a Listener replaces the previous set Listener.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1126
     * One can unregister current Listener by setting listener to <tt>null</tt>.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1127
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1128
     * @param listener  provides unmarshal event callbacks for this {@link Unmarshaller}
25840
c2002453eec3 8047724: @since tag cleanup in jaxws
henryjen
parents: 19645
diff changeset
  1129
     * @since 1.6, JAXB 2.0
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1130
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1131
    public void     setListener(Listener listener);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1132
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1133
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1134
     * <p>Return {@link Listener} registered with this {@link Unmarshaller}.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1135
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1136
     * @return registered {@link Listener} or <code>null</code> if no Listener is registered with this Unmarshaller.
25840
c2002453eec3 8047724: @since tag cleanup in jaxws
henryjen
parents: 19645
diff changeset
  1137
     * @since 1.6, JAXB 2.0
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1138
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1139
    public Listener getListener();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
  1140
}