public void simpleType(XSSimpleType type) { createSimpleTypeProperty(type,"Value"); }
public void complexType(XSComplexType ct) { CClass ctBean = selector.bindToType(ct,null,false); if(getCurrentBean()!=ctBean) // in some case complex type and element binds to the same class // don't make it has-a. Just make it is-a. getCurrentBean().setBaseClass(ctBean); }
/** * Attribute use always becomes a property. */ public void attributeUse(XSAttributeUse use) { boolean hasFixedValue = use.getFixedValue()!=null; BIProperty pc = BIProperty.getCustomization(use); // map to a constant property ? boolean toConstant = pc.isConstantProperty() && hasFixedValue; TypeUse attType = bindAttDecl(use.getDecl()); CPropertyInfo prop = pc.createAttributeProperty( use, attType ); if(toConstant) { prop.defaultValue = CDefaultValue.create(attType,use.getFixedValue()); prop.realization = builder.fieldRendererFactory.getConst(prop.realization); } else if(!attType.isCollection()) { // don't support a collection default value. That's difficult to do. if(use.getDefaultValue()!=null) { // this attribute use has a default value. // the item type is guaranteed to be a leaf type... or TODO: is it really so? // don't support default values if it's a list prop.defaultValue = CDefaultValue.create(attType,use.getDefaultValue()); } else if(use.getFixedValue()!=null) { prop.defaultValue = CDefaultValue.create(attType,use.getFixedValue()); } } getCurrentBean().addProperty(prop); }
/** * Attribute use always becomes a property. */ public void attributeUse(XSAttributeUse use) { boolean hasFixedValue = use.getFixedValue()!=null; BIProperty pc = BIProperty.getCustomization(use); // map to a constant property ? boolean toConstant = pc.isConstantProperty() && hasFixedValue; TypeUse attType = bindAttDecl(use.getDecl()); CPropertyInfo prop = pc.createAttributeProperty( use, attType ); if(toConstant) { prop.defaultValue = CDefaultValue.create(attType,use.getFixedValue()); prop.realization = builder.fieldRendererFactory.getConst(prop.realization); } else if(!attType.isCollection()) { // don't support a collection default value. That's difficult to do. if(use.getDefaultValue()!=null) { // this attribute use has a default value. // the item type is guaranteed to be a leaf type... or TODO: is it really so? // don't support default values if it's a list prop.defaultValue = CDefaultValue.create(attType,use.getDefaultValue()); } else if(use.getFixedValue()!=null) { prop.defaultValue = CDefaultValue.create(attType,use.getFixedValue()); } } getCurrentBean().addProperty(prop); }
TypeUse attType = bindAttDecl(use.getDecl()); getCurrentBean().addProperty(prop);
public void complexType(XSComplexType ct) { CClass ctBean = selector.bindToType(ct,null,false); if(getCurrentBean()!=ctBean) // in some case complex type and element binds to the same class // don't make it has-a. Just make it is-a. getCurrentBean().setBaseClass(ctBean); }
public void simpleType(XSSimpleType type) { createSimpleTypeProperty(type,"Value"); }
TypeUse attType = bindAttDecl(use.getDecl()); getCurrentBean().addProperty(prop);
public void wildcard(XSWildcard xsWildcard) { // element wildcards are processed by particle binders, // so this one is for attribute wildcard. getCurrentBean().hasAttributeWildcard(true); }
public void simpleType(XSSimpleType type) { createSimpleTypeProperty(type,"Value"); }
TypeUse attType = bindAttDecl(use.getDecl()); getCurrentBean().addProperty(prop);
public void complexType(XSComplexType ct) { CClass ctBean = selector.bindToType(ct,null,false); if(getCurrentBean()!=ctBean) // in some case complex type and element binds to the same class // don't make it has-a. Just make it is-a. getCurrentBean().setBaseClass(ctBean); }
public void simpleType(XSSimpleType type) { createSimpleTypeProperty(type,"Value"); }
public void complexType(XSComplexType ct) { CClass ctBean = selector.bindToType(ct,null,false); if(getCurrentBean()!=ctBean) // in some case complex type and element binds to the same class // don't make it has-a. Just make it is-a. getCurrentBean().setBaseClass(ctBean); }
public void simpleType(XSSimpleType type) { createSimpleTypeProperty(type,"Value"); }
public void wildcard(XSWildcard xsWildcard) { // element wildcards are processed by particle binders, // so this one is for attribute wildcard. getCurrentBean().hasAttributeWildcard(true); }
public void wildcard(XSWildcard xsWildcard) { // element wildcards are processed by particle binders, // so this one is for attribute wildcard. getCurrentBean().hasAttributeWildcard(true); }
public void wildcard(XSWildcard xsWildcard) { // element wildcards are processed by particle binders, // so this one is for attribute wildcard. getCurrentBean().hasAttributeWildcard(true); }
public void complexType(XSComplexType ct) { CClass ctBean = selector.bindToType(ct,null,false); if(getCurrentBean()!=ctBean) // in some case complex type and element binds to the same class // don't make it has-a. Just make it is-a. getCurrentBean().setBaseClass(ctBean); }
public void wildcard(XSWildcard xsWildcard) { // element wildcards are processed by particle binders, // so this one is for attribute wildcard. getCurrentBean().hasAttributeWildcard(true); }