01: package com.sun.tools.xjc.reader.xmlschema.bindinfo;
02:
03: import javax.xml.bind.annotation.XmlRootElement;
04: import javax.xml.bind.annotation.XmlInlineBinaryData;
05: import javax.xml.namespace.QName;
06:
07: import com.sun.tools.xjc.reader.Const;
08: import com.sun.tools.xjc.reader.Ring;
09: import com.sun.tools.xjc.reader.xmlschema.BGMBuilder;
10: import com.sun.tools.xjc.model.CPropertyInfo;
11: import com.sun.xml.xsom.XSComponent;
12:
13: /**
14: * Generates {@link @XmlInlineBinaryData}.
15: *
16: * @author Kohsuke Kawaguchi
17: */
18: @XmlRootElement(name="inlineBinaryData")
19: public class BIInlineBinaryData extends AbstractDeclarationImpl {
20:
21: /**
22: * If the given component has {@link BIInlineBinaryData} customization,
23: * reflect that to the specified property.
24: */
25: public static void handle(XSComponent source, CPropertyInfo prop) {
26: BIInlineBinaryData inline = Ring.get(BGMBuilder.class)
27: .getBindInfo(source).get(BIInlineBinaryData.class);
28: if (inline != null) {
29: prop.inlineBinaryData = true;
30: inline.markAsAcknowledged();
31: }
32: }
33:
34: public final QName getName() {
35: return NAME;
36: }
37:
38: /** Name of the declaration. */
39: public static final QName NAME = new QName(Const.JAXB_NSURI,
40: "inlineBinaryData");
41: }
|