public CPropertyInfo onValue( CValuePropertyInfo propertyInfo) { return new CValuePropertyInfo(propertyInfo .getName(true), propertyInfo .getSchemaComponent(), new CCustomizations(), null, context .getGetTypes().getTarget( context, propertyInfo), propertyInfo.getSchemaType()); } }));
/** * Processes an xsd value in form of xsd attribute from extended base. * <p> * Example: * <xsd:complexType name="Employee"> * <xsd:simpleContent> * <xsd:extension base="a:ShortId"> <- xsd extension base * <xsd:attribute name="id" type="xsd:string" use="optional"/> * </xsd:extension> * </xsd:simpleContent> * </xsd:complexType> * <p> * <xsd:simpleType name="ShortId"> * <xsd:restriction base="xsd:string"> * <xsd:minLength value="1"/> <- This is a special field that is added to the generated class, called "value" (corresponds to the valuePropertyName), * <xsd:maxLength value="5"/> it gets processed by this method and the "value" field receives @Size(min = 1, max = 5). * </xsd:restriction> * </xsd:simpleType> */ private void processValueFromExtendedBase(CValuePropertyInfo valueProperty, ClassOutline classOutline, List<FacetCustomization> customizations) { String valuePropertyName = valueProperty.getName(false); JFieldVar fieldVar = classOutline.implClass.fields().get(valuePropertyName); XSSimpleType type = ((RestrictionSimpleTypeImpl) valueProperty.getSchemaComponent()).asSimpleType(); processSimpleType(null, type, fieldVar, customizations); }
final CClassInfo classInfo = (CClassInfo) wrappedPropertyInfo.parent(); final String propertyName = wrappedPropertyInfo.getName(true); wrappedPropertyInfo.getExpectedMimeType(), wrappedPropertyInfo .getSchemaComponent(), new CCustomizations( CustomizationUtils .getCustomizations(wrappedPropertyInfo)), wrappedPropertyInfo.getLocator(), false); context, wrappedPropertyInfo) new QName(propertyName), wrappedPropertyInfo.getSchemaType(), false, null); if (wrappedPropertyInfo.getAdapter() != null) { itemPropertyInfo.setAdapter(wrappedPropertyInfo.getAdapter()); .getExpectedMimeType(), null, new CCustomizations(), null, false);
CValuePropertyInfo p = new CValuePropertyInfo("value", null,null/*TODO*/,locator,getConversion(),null); ci.addProperty(p);
public Collection<CPropertyInfo> onCollectionOtherValue( CValuePropertyInfo valuePropertyInfo) { logger.error("[" + valuePropertyInfo.getName(true) + "] is a collection other value. See issue #63."); return Collections.emptyList(); }
final CClassInfo classInfo = (CClassInfo) wrappedPropertyInfo.parent(); final String propertyName = wrappedPropertyInfo.getName(true); wrappedPropertyInfo.getExpectedMimeType(), wrappedPropertyInfo .getSchemaComponent(), new CCustomizations( CustomizationUtils .getCustomizations(wrappedPropertyInfo)), wrappedPropertyInfo.getLocator(), false); context, wrappedPropertyInfo) new QName(propertyName), wrappedPropertyInfo.getSchemaType(), false, null); if (wrappedPropertyInfo.getAdapter() != null) { itemPropertyInfo.setAdapter(wrappedPropertyInfo.getAdapter()); .getExpectedMimeType(), null, new CCustomizations(), null, false);
CValuePropertyInfo p = new CValuePropertyInfo("value", null,null/*TODO*/,locator,getConversion(),null); ci.addProperty(p);
/** * Processes an xsd value in form of xsd attribute from extended base. * <p> * Example: * <xsd:complexType name="Employee"> * <xsd:simpleContent> * <xsd:extension base="a:ShortId"> <- xsd extension base * <xsd:attribute name="id" type="xsd:string" use="optional"/> * </xsd:extension> * </xsd:simpleContent> * </xsd:complexType> * <p> * <xsd:simpleType name="ShortId"> * <xsd:restriction base="xsd:string"> * <xsd:minLength value="1"/> <- This is a special field that is added to the generated class, called "value" (corresponds to the valuePropertyName), * <xsd:maxLength value="5"/> it gets processed by this method and the "value" field receives @Size(min = 1, max = 5). * </xsd:restriction> * </xsd:simpleType> */ private void processValueFromExtendedBase(CValuePropertyInfo valueProperty, ClassOutline classOutline, List<FacetCustomization> customizations) { String valuePropertyName = valueProperty.getName(false); JFieldVar fieldVar = classOutline.implClass.fields().get(valuePropertyName); XSSimpleType type = ((RestrictionSimpleTypeImpl) valueProperty.getSchemaComponent()).asSimpleType(); processSimpleType(type, fieldVar, customizations); }
public Collection<CPropertyInfo> onSingleOtherValue( CValuePropertyInfo valuePropertyInfo) { logger.error("[" + valuePropertyInfo.getName(true) + "] is a single other value. See issue #60."); return Collections.emptyList(); }
public CPropertyInfo onValue( CValuePropertyInfo propertyInfo) { return new CValuePropertyInfo(propertyInfo .getName(true), propertyInfo .getSchemaComponent(), new CCustomizations(), null, context .getGetTypes().getTarget( context, propertyInfo), propertyInfo.getSchemaType()); } }));
CValuePropertyInfo p = new CValuePropertyInfo("value", null,null/*TODO*/,locator,getConversion(),null); ci.addProperty(p);
private void processAttribute(CValuePropertyInfo property, ClassOutline clase, Outline model) { FieldOutline field = model.getField(property); String propertyName = property.getName(false); String className = clase.implClass.name(); log("Attribute " + propertyName + " added to class " + className); XSComponent definition = property.getSchemaComponent(); RestrictionSimpleTypeImpl particle = (RestrictionSimpleTypeImpl) definition; XSSimpleType type = particle.asSimpleType(); JFieldVar var = clase.implClass.fields().get(propertyName); // if (particle.isRequired()) { // if (!hasAnnotation(var, NotNull.class)) { // if (notNullAnnotations) { // System.out.println("@NotNull: " + propertyName + " added to class " + className); // var.annotate(NotNull.class); // } // } // } validAnnotation(type, var, propertyName, className); processType(type, var, propertyName, className); }
public Collection<CPropertyInfo> onCollectionOtherValue( CValuePropertyInfo valuePropertyInfo) { logger.error("[" + valuePropertyInfo.getName(true) + "] is a collection other value. See issue #63."); return Collections.emptyList(); }
CValuePropertyInfo p = new CValuePropertyInfo("value", null,null/*TODO*/,locator,getConversion(),null); ci.addProperty(p);
public Collection<CPropertyInfo> onSingleOtherValue( CValuePropertyInfo valuePropertyInfo) { logger.error("[" + valuePropertyInfo.getName(true) + "] is a single other value. See issue #60."); return Collections.emptyList(); }
CValuePropertyInfo p = new CValuePropertyInfo("value", null,null/*TODO*/,locator,getConversion(),null); ci.addProperty(p);
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; }
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; }
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; }
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; }