View Javadoc

1   /*
2    *  Copyright (c) 2008 Rodrigo Ruiz
3    *
4    *  Licensed under the Apache License, Version 2.0 (the "License");
5    *  you may not use this file except in compliance with the License.
6    *  You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *  Unless required by applicable law or agreed to in writing, software
11   *  distributed under the License is distributed on an "AS IS" BASIS,
12   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *  See the License for the specific language governing permissions and
14   *  limitations under the License.
15   */
16  package org.apache.axis.message.addressing;
17  
18  import javax.xml.soap.SOAPHeaderElement;
19  
20  import org.apache.axis.types.URI;
21  
22  /**
23   * Java content class for To element declaration.
24   * <p>
25   * The following schema fragment specifies the expected content contained within
26   * this java content object. (defined at
27   * http://schemas.xmlsoap.org/ws/2004/08/addressing line 78)
28   * <p>
29   *
30   * <pre>
31   * &lt;element
32   *   name=&quot;To&quot;
33   *   type=&quot;{http://schemas.xmlsoap.org/ws/2004/08/addressing}AttributedURI&quot;/&gt;
34   * </pre>
35   *
36   * @author Davanum Srinivas
37   * @version $Revision: 14 $
38   */
39  public class To extends AttributedURI {
40  
41    /**
42     * <code>serialVersionUID</code> attribute.
43     */
44    private static final long serialVersionUID = 6274632242177957818L;
45  
46    /**
47     * Constructor To.
48     *
49     * @param el Element
50     * @throws MalformedURIException If an error occurs
51     */
52    public To(SOAPHeaderElement el) throws MalformedURIException {
53      super(el);
54    }
55  
56    /**
57     * Constructor To.
58     *
59     * @param uri To URI
60     */
61    public To(String uri) throws URI.MalformedURIException {
62      super(new URI(uri));
63    }
64  
65    /**
66     * Copy constructor.
67     *
68     * @param uri To URI
69     */
70    public To(URI uri) {
71      super(uri);
72    }
73  
74    /**
75     * {@inheritDoc}
76     */
77    public String getDefaultElementName() {
78      return Constants.TO;
79    }
80  }