KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > xml > bind > annotation > XmlMimeType


1 /*
2  * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
3  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4  */

5
6 package javax.xml.bind.annotation;
7
8 import java.lang.annotation.Retention JavaDoc;
9 import java.lang.annotation.Target JavaDoc;
10 import java.awt.*;
11 import static java.lang.annotation.RetentionPolicy.RUNTIME JavaDoc;
12 import static java.lang.annotation.ElementType.FIELD JavaDoc;
13 import static java.lang.annotation.ElementType.METHOD JavaDoc;
14 import static java.lang.annotation.ElementType.PARAMETER JavaDoc;
15
16 import javax.xml.transform.Source JavaDoc;
17
18 /**
19  * Associates the MIME type that controls the XML representation of the property.
20  *
21  * <p>
22  * This annotation is used in conjunction with datatypes such as
23  * {@link Image} or {@link Source} that are bound to base64-encoded binary in XML.
24  *
25  * <p>
26  * If a property that has this annotation has a sibling property bound to
27  * the xmime:contentType attribute, and if in the instance the property has a value,
28  * the value of the attribute takes precedence and that will control the marshalling.
29  *
30  * @author Kohsuke Kawaguchi
31  * @since JAXB2.0
32  */

33 @Retention JavaDoc(RUNTIME)
34 @Target JavaDoc({FIELD,METHOD,PARAMETER})
35 public @interface XmlMimeType {
36     /**
37      * The textual representation of the MIME type,
38      * such as "image/jpeg" "image/*", "text/xml; charset=iso-8859-1" and so on.
39      */

40     String JavaDoc value();
41 }
42
Popular Tags