public Collection<CPropertyInfo> onCollectionOtherValue( CValuePropertyInfo valuePropertyInfo) { logger.error("[" + valuePropertyInfo.getName(true) + "] is a collection other value. See issue #63."); return Collections.emptyList(); }
public Collection<CPropertyInfo> onSingleOtherValue( CValuePropertyInfo valuePropertyInfo) { logger.error("[" + valuePropertyInfo.getName(true) + "] is a single other value. See issue #60."); return Collections.emptyList(); }
public Collection<CPropertyInfo> onSingleOtherValue( CValuePropertyInfo valuePropertyInfo) { logger.error("[" + valuePropertyInfo.getName(true) + "] is a single other value. See issue #60."); return Collections.emptyList(); }
public Collection<CPropertyInfo> onCollectionOtherValue( CValuePropertyInfo valuePropertyInfo) { logger.error("[" + valuePropertyInfo.getName(true) + "] is a collection other value. See issue #63."); return Collections.emptyList(); }
/** * 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); }
/** * 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 CPropertyInfo onValue( CValuePropertyInfo propertyInfo) { return new CValuePropertyInfo(propertyInfo .getName(true), propertyInfo .getSchemaComponent(), new CCustomizations(), null, context .getGetTypes().getTarget( context, propertyInfo), propertyInfo.getSchemaType()); } }));
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 CPropertyInfo onValue( CValuePropertyInfo propertyInfo) { return new CValuePropertyInfo(propertyInfo .getName(true), propertyInfo .getSchemaComponent(), new CCustomizations(), null, context .getGetTypes().getTarget( context, propertyInfo), propertyInfo.getSchemaType()); } }));
final String propertyName = wrappedPropertyInfo.getName(true);
final String propertyName = wrappedPropertyInfo.getName(true);