Search in sources :

Example 11 with BIProperty

use of com.sun.tools.xjc.reader.xmlschema.bindinfo.BIProperty in project jaxb-ri by eclipse-ee4j.

the class FreshComplexTypeBuilder method build.

@Override
public void build(final XSComplexType ct) {
    XSContentType contentType = ct.getContentType();
    contentType.visit(new XSContentTypeVisitor() {

        @Override
        public void simpleType(XSSimpleType st) {
            builder.recordBindingMode(ct, ComplexTypeBindingMode.NORMAL);
            simpleTypeBuilder.refererStack.push(ct);
            TypeUse use = simpleTypeBuilder.build(st);
            simpleTypeBuilder.refererStack.pop();
            BIProperty prop = BIProperty.getCustomization(ct);
            CPropertyInfo p = prop.createValueProperty("Value", false, ct, use, BGMBuilder.getName(st));
            selector.getCurrentBean().addProperty(p);
        }

        @Override
        public void particle(XSParticle p) {
            // determine the binding of this complex type.
            builder.recordBindingMode(ct, bgmBuilder.getParticleBinder().checkFallback(p) ? FALLBACK_CONTENT : NORMAL);
            bgmBuilder.getParticleBinder().build(p);
            XSTerm term = p.getTerm();
            if (term.isModelGroup() && term.asModelGroup().getCompositor() == XSModelGroup.ALL)
                selector.getCurrentBean().setOrdered(false);
        }

        @Override
        public void empty(XSContentType e) {
            builder.recordBindingMode(ct, NORMAL);
        }
    });
    // adds attributes and we are through.
    green.attContainer(ct);
}
Also used : XSContentType(com.sun.xml.xsom.XSContentType) TypeUse(com.sun.tools.xjc.model.TypeUse) XSSimpleType(com.sun.xml.xsom.XSSimpleType) XSParticle(com.sun.xml.xsom.XSParticle) XSTerm(com.sun.xml.xsom.XSTerm) BIProperty(com.sun.tools.xjc.reader.xmlschema.bindinfo.BIProperty) XSContentTypeVisitor(com.sun.xml.xsom.visitor.XSContentTypeVisitor) CPropertyInfo(com.sun.tools.xjc.model.CPropertyInfo)

Aggregations

BIProperty (com.sun.tools.xjc.reader.xmlschema.bindinfo.BIProperty)11 CPropertyInfo (com.sun.tools.xjc.model.CPropertyInfo)9 RawTypeSet (com.sun.tools.xjc.reader.RawTypeSet)5 CClass (com.sun.tools.xjc.model.CClass)3 TypeUse (com.sun.tools.xjc.model.TypeUse)3 XSComplexType (com.sun.xml.xsom.XSComplexType)3 XSContentType (com.sun.xml.xsom.XSContentType)3 XSParticle (com.sun.xml.xsom.XSParticle)3 XSSimpleType (com.sun.xml.xsom.XSSimpleType)2 XSTerm (com.sun.xml.xsom.XSTerm)2 Multiplicity (com.sun.tools.xjc.model.Multiplicity)1 Element (com.sun.tools.xjc.reader.gbind.Element)1 BindInfo (com.sun.tools.xjc.reader.xmlschema.bindinfo.BindInfo)1 XSContentTypeVisitor (com.sun.xml.xsom.visitor.XSContentTypeVisitor)1 ParseException (java.text.ParseException)1