/** * @param optional * if this whole property is optional due to the * occurrence constraints on ancestors, set this to true. * this will prevent the primitive types to be generated. */ public static RawTypeSet build( XSParticle p, boolean optional ) { RawTypeSetBuilder rtsb = new RawTypeSetBuilder(); rtsb.particle(p); Multiplicity mul = MultiplicityCounter.theInstance.particle(p); if(optional) mul = mul.makeOptional(); return new RawTypeSet(rtsb.refs,mul); }
public void modelGroupDecl(XSModelGroupDecl decl) { modelGroup(decl.getModelGroup()); }
int nameTokenCount = 0; // combine only up to 3 RawTypeSetBuilder rtsb = new RawTypeSetBuilder(); for (Element e : cc) { GElement ge = (GElement)e; rtsb.elementDecl(ei.decl); continue; rtsb.getRefs().add(new RawTypeSetBuilder.WildcardRef( w.isStrict() ? WildcardMode.STRICT : WildcardMode.SKIP)); continue; m = m.makeOptional(); RawTypeSet rts = new RawTypeSet(rtsb.getRefs(),m);
public void particle( XSParticle p ) { XSTerm t = p.getTerm(); if(marked(p)) { BIProperty cust = BIProperty.getCustomization(p); CPropertyInfo prop = cust.createElementOrReferenceProperty( getLabel(p), false, p, RawTypeSetBuilder.build(p,insideOptionalParticle)); getCurrentBean().addProperty(prop); } else { // repeated model groups should have been marked already assert !p.isRepeated(); boolean oldIOP = insideOptionalParticle; insideOptionalParticle |= BigInteger.ZERO.equals(p.getMinOccurs()); // this is an unmarked particle t.visit(this); insideOptionalParticle = oldIOP; } }
public void modelGroup(XSModelGroup group) { for( XSParticle p : group.getChildren()) particle(p); }
int nameTokenCount = 0; // combine only up to 3 RawTypeSetBuilder rtsb = new RawTypeSetBuilder(); for (Element e : cc) { GElement ge = (GElement)e; rtsb.elementDecl(ei.decl); continue; rtsb.getRefs().add(new RawTypeSetBuilder.WildcardRef( w.isStrict() ? WildcardMode.STRICT : WildcardMode.SKIP)); continue; m = m.makeOptional(); RawTypeSet rts = new RawTypeSet(rtsb.getRefs(),m);
public void particle( XSParticle p ) { XSTerm t = p.getTerm(); if(marked(p)) { BIProperty cust = BIProperty.getCustomization(p); CPropertyInfo prop = cust.createElementOrReferenceProperty( getLabel(p), false, p, RawTypeSetBuilder.build(p,insideOptionalParticle)); getCurrentBean().addProperty(prop); } else { // repeated model groups should have been marked already assert !p.isRepeated(); boolean oldIOP = insideOptionalParticle; insideOptionalParticle |= BigInteger.ZERO.equals(p.getMinOccurs()); // this is an unmarked particle t.visit(this); insideOptionalParticle = oldIOP; } }
public void modelGroup(XSModelGroup group) { for( XSParticle p : group.getChildren()) particle(p); }
int nameTokenCount = 0; // combine only up to 3 RawTypeSetBuilder rtsb = new RawTypeSetBuilder(); for (Element e : cc) { GElement ge = (GElement)e; rtsb.elementDecl(ei.decl); continue; rtsb.getRefs().add(new RawTypeSetBuilder.WildcardRef( w.isStrict() ? WildcardMode.STRICT : WildcardMode.SKIP)); continue; m = m.makeOptional(); RawTypeSet rts = new RawTypeSet(rtsb.getRefs(),m);
public void particle( XSParticle p ) { XSTerm t = p.getTerm(); if(marked(p)) { BIProperty cust = BIProperty.getCustomization(p); CPropertyInfo prop = cust.createElementOrReferenceProperty( getLabel(p), false, p, RawTypeSetBuilder.build(p,insideOptionalParticle)); getCurrentBean().addProperty(prop); } else { // repeated model groups should have been marked already assert !p.isRepeated(); boolean oldIOP = insideOptionalParticle; insideOptionalParticle |= BigInteger.ZERO.equals(p.getMinOccurs()); // this is an unmarked particle t.visit(this); insideOptionalParticle = oldIOP; } }
/** * @param optional * if this whole property is optional due to the * occurence constraints on ancestors, set this to true. * this will prevent the primitive types to be generated. */ public static RawTypeSet build( XSParticle p, boolean optional ) { RawTypeSetBuilder rtsb = new RawTypeSetBuilder(); rtsb.particle(p); Multiplicity mul = MultiplicityCounter.theInstance.particle(p); if(optional) mul = mul.makeOptional(); return new RawTypeSet(rtsb.refs,mul); }
public void modelGroup(XSModelGroup group) { for( XSParticle p : group.getChildren()) particle(p); }
public void modelGroupDecl(XSModelGroupDecl decl) { modelGroup(decl.getModelGroup()); }
int nameTokenCount = 0; // combine only up to 3 RawTypeSetBuilder rtsb = new RawTypeSetBuilder(); for (Element e : cc) { GElement ge = (GElement)e; rtsb.elementDecl(ei.decl); continue; rtsb.getRefs().add(new RawTypeSetBuilder.WildcardRef( w.isStrict() ? WildcardMode.STRICT : WildcardMode.SKIP)); continue; m = m.makeOptional(); RawTypeSet rts = new RawTypeSet(rtsb.getRefs(),m);
public void build(XSComplexType ct) { XSContentType contentType = ct.getContentType(); builder.recordBindingMode(ct, FALLBACK_CONTENT); BIProperty prop = BIProperty.getCustomization(ct); CPropertyInfo p; if(contentType.asEmpty()!=null) { p = prop.createValueProperty("Content",false,ct,CBuiltinLeafInfo.STRING,null); } else { RawTypeSet ts = RawTypeSetBuilder.build(contentType.asParticle(),false); p = prop.createReferenceProperty("Content", false, ct, ts, true, false, true, false); } selector.getCurrentBean().addProperty(p); // adds attributes and we are through. green.attContainer(ct); }
/** * @param optional * if this whole property is optional due to the * occurence constraints on ancestors, set this to true. * this will prevent the primitive types to be generated. */ public static RawTypeSet build( XSParticle p, boolean optional ) { RawTypeSetBuilder rtsb = new RawTypeSetBuilder(); rtsb.particle(p); Multiplicity mul = MultiplicityCounter.theInstance.particle(p); if(optional) mul = mul.makeOptional(); return new RawTypeSet(rtsb.refs,mul); }
public void modelGroup(XSModelGroup group) { for( XSParticle p : group.getChildren()) particle(p); }
public void modelGroupDecl(XSModelGroupDecl decl) { modelGroup(decl.getModelGroup()); }
int nameTokenCount = 0; // combine only up to 3 RawTypeSetBuilder rtsb = new RawTypeSetBuilder(); for (Element e : cc) { GElement ge = (GElement)e; rtsb.elementDecl(ei.decl); continue; rtsb.getRefs().add(new RawTypeSetBuilder.WildcardRef( w.isStrict() ? WildcardMode.STRICT : WildcardMode.SKIP)); continue; m = m.makeOptional(); RawTypeSet rts = new RawTypeSet(rtsb.getRefs(),m);
public void build(XSComplexType ct) { XSContentType contentType = ct.getContentType(); builder.recordBindingMode(ct, FALLBACK_CONTENT); BIProperty prop = BIProperty.getCustomization(ct); CPropertyInfo p; if(contentType.asEmpty()!=null) { p = prop.createValueProperty("Content",false,ct,CBuiltinLeafInfo.STRING,null); } else { RawTypeSet ts = RawTypeSetBuilder.build(contentType.asParticle(),false); p = prop.createReferenceProperty("Content", false, ct, ts, true, false, true, false); } selector.getCurrentBean().addProperty(p); // adds attributes and we are through. green.attContainer(ct); }