01: /*
02: * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
03: * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
04: */
05:
06: package javax.xml.bind.annotation;
07:
08: import java.lang.annotation.Retention;
09: import java.lang.annotation.Target;
10: import java.awt.*;
11: import static java.lang.annotation.RetentionPolicy.RUNTIME;
12: import static java.lang.annotation.ElementType.FIELD;
13: import static java.lang.annotation.ElementType.METHOD;
14: import static java.lang.annotation.ElementType.PARAMETER;
15:
16: import javax.xml.transform.Source;
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(RUNTIME)
34: @Target({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 value();
41: }
|