public CAttributePropertyInfo createAttributeProperty(XSAttributeUse use, TypeUse tu) { boolean forConstant = getCustomization(use).isConstantProperty() && use.getFixedValue() != null; String name = getPropertyName(forConstant); if (name == null) { NameConverter conv = getBuilder().getNameConverter(); if (forConstant) name = conv.toConstantName(use.getDecl().getName()); else name = conv.toPropertyName(use.getDecl().getName()); if (tu.isCollection() && getBuilder().getGlobalBinding().isSimpleMode()) name = JJavaName.getPluralForm(name); } markAsAcknowledged(); constantPropertyErrorCheck(); return wrapUp( new CAttributePropertyInfo( name, use, getCustomizations(use), use.getLocator(), BGMBuilder.getName(use.getDecl()), tu, BGMBuilder.getName(use.getDecl().getType()), use.isRequired()), use); }
public CValuePropertyInfo createValueProperty( String defaultName, boolean forConstant, XSComponent source, TypeUse tu, QName typeName) { markAsAcknowledged(); constantPropertyErrorCheck(); String name = getPropertyName(forConstant); if (name == null) { name = defaultName; if (tu.isCollection() && getBuilder().getGlobalBinding().isSimpleMode()) name = JJavaName.getPluralForm(name); } CValuePropertyInfo prop = wrapUp( new CValuePropertyInfo( name, source, getCustomizations(source), source.getLocator(), tu, typeName), source); BIInlineBinaryData.handle(source, prop); return prop; }