author | aefimov |
Fri, 10 Apr 2015 14:54:20 +0300 | |
changeset 29839 | 6d5d546e953b |
parent 28887 | 88470f768658 |
permissions | -rw-r--r-- |
12009 | 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) 2005, 2015, Oracle and/or its affiliates. All rights reserved. |
12009 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. Oracle designates this |
|
8 |
* particular file as subject to the "Classpath" exception as provided |
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
|
10 |
* |
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
24 |
*/ |
|
25 |
||
26 |
package javax.xml.bind.annotation; |
|
27 |
||
28 |
import javax.activation.DataHandler; |
|
29 |
import static java.lang.annotation.ElementType.*; |
|
30 |
import java.lang.annotation.Retention; |
|
31 |
import static java.lang.annotation.RetentionPolicy.RUNTIME; |
|
32 |
import java.lang.annotation.Target; |
|
33 |
||
34 |
/** |
|
35 |
* Marks a field/property that its XML form is a uri reference to mime content. |
|
36 |
* The mime content is optimally stored out-of-line as an attachment. |
|
37 |
* |
|
38 |
* A field/property must always map to the {@link DataHandler} class. |
|
39 |
* |
|
40 |
* <h2>Usage</h2> |
|
41 |
* <pre> |
|
42 |
* @{@link XmlRootElement} |
|
43 |
* class Foo { |
|
44 |
* @{@link XmlAttachmentRef} |
|
45 |
* @{@link XmlAttribute} |
|
46 |
* {@link DataHandler} data; |
|
47 |
* |
|
48 |
* @{@link XmlAttachmentRef} |
|
49 |
* @{@link XmlElement} |
|
50 |
* {@link DataHandler} body; |
|
51 |
* } |
|
52 |
* </pre> |
|
53 |
* The above code maps to the following XML: |
|
29839
6d5d546e953b
8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents:
28887
diff
changeset
|
54 |
* <pre>{@code |
6d5d546e953b
8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents:
28887
diff
changeset
|
55 |
* <xs:element name="foo" xmlns:ref="http://ws-i.org/profiles/basic/1.1/xsd"> |
6d5d546e953b
8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents:
28887
diff
changeset
|
56 |
* <xs:complexType> |
6d5d546e953b
8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents:
28887
diff
changeset
|
57 |
* <xs:sequence> |
6d5d546e953b
8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents:
28887
diff
changeset
|
58 |
* <xs:element name="body" type="ref:swaRef" minOccurs="0" /> |
6d5d546e953b
8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents:
28887
diff
changeset
|
59 |
* </xs:sequence> |
6d5d546e953b
8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents:
28887
diff
changeset
|
60 |
* <xs:attribute name="data" type="ref:swaRef" use="optional" /> |
6d5d546e953b
8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents:
28887
diff
changeset
|
61 |
* </xs:complexType> |
6d5d546e953b
8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents:
28887
diff
changeset
|
62 |
* </xs:element> |
6d5d546e953b
8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents:
28887
diff
changeset
|
63 |
* }</pre> |
12009 | 64 |
* |
65 |
* <p> |
|
66 |
* The above binding supports WS-I AP 1.0 <a href="http://www.ws-i.org/Profiles/AttachmentsProfile-1.0-2004-08-24.html#Referencing_Attachments_from_the_SOAP_Envelope">WS-I Attachments Profile Version 1.0.</a> |
|
67 |
* |
|
68 |
* @author Kohsuke Kawaguchi |
|
25840 | 69 |
* @since 1.6, JAXB 2.0 |
12009 | 70 |
*/ |
71 |
@Retention(RUNTIME) |
|
72 |
@Target({FIELD,METHOD,PARAMETER}) |
|
73 |
public @interface XmlAttachmentRef { |
|
74 |
} |