public CArrayInfo(Model model,CNonElement itemType, XSComponent source, CCustomizations customizations) { super(model,source,customizations); this.itemType = itemType; assert itemType.getTypeName()!=null; this.typeName = ArrayInfoImpl.calcArrayTypeName(itemType.getTypeName()); }
public CArrayInfo(Model model,CNonElement itemType, XSComponent source, CCustomizations customizations) { super(model,source,customizations); this.itemType = itemType; assert itemType.getTypeName()!=null; this.typeName = ArrayInfoUtil.calcArrayTypeName(itemType.getTypeName()); }
public CArrayInfo(Model model,CNonElement itemType, XSComponent source, CCustomizations customizations) { super(model,source,customizations); this.itemType = itemType; assert itemType.getTypeName()!=null; this.typeName = ArrayInfoImpl.calcArrayTypeName(itemType.getTypeName()); }
public CArrayInfo(Model model,CNonElement itemType, XSComponent source, CCustomizations customizations) { super(model,source,customizations); this.itemType = itemType; assert itemType.getTypeName()!=null; this.typeName = ArrayInfoUtil.calcArrayTypeName(itemType.getTypeName()); }
public CArrayInfo(Model model,CNonElement itemType, XSComponent source, CCustomizations customizations) { super(model,source,customizations); this.itemType = itemType; assert itemType.getTypeName()!=null; this.typeName = ArrayInfoUtil.calcArrayTypeName(itemType.getTypeName()); }
/** * Checks if the given {@link TypeUse} would need an explicit {@link XmlSchemaType} * annotation with the given type name. */ protected static boolean needsExplicitTypeName(TypeUse type, QName typeName) { if(typeName==null) // this is anonymous type. can't have @XmlSchemaType return false; if(!XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(typeName.getNamespaceURI())) // if we put application-defined type name, it will be undefined // by the time we generate a schema. return false; if(type.isCollection()) // there's no built-in binding for a list simple type, // so any collection type always need @XmlSchemaType return true; QName itemType = type.getInfo().getTypeName(); if(itemType==null) // this is somewhat strange case, as it means the bound type is anonymous // but it's eventually derived by a named type and used. // but we can certainly use typeName as @XmlSchemaType value here return true; // if it's the default type name for this item, then no need return !itemType.equals(typeName); }
/** * Checks if the given {@link TypeUse} would need an explicit {@link XmlSchemaType} * annotation with the given type name. */ protected static boolean needsExplicitTypeName(TypeUse type, QName typeName) { if(typeName==null) // this is anonymous type. can't have @XmlSchemaType return false; if(!typeName.getNamespaceURI().equals(WellKnownNamespace.XML_SCHEMA)) // if we put application-defined type name, it will be undefined // by the time we generate a schema. return false; if(type.isCollection()) // there's no built-in binding for a list simple type, // so any collection type always need @XmlSchemaType return true; QName itemType = type.getInfo().getTypeName(); if(itemType==null) // this is somewhat strange case, as it means the bound type is anonymous // but it's eventually derived by a named type and used. // but we can certainly use typeName as @XmlSchemaType value here return true; // if it's the default type name for this item, then no need return !itemType.equals(typeName); }
/** * Checks if the given {@link TypeUse} would need an explicit {@link XmlSchemaType} * annotation with the given type name. */ protected static boolean needsExplicitTypeName(TypeUse type, QName typeName) { if(typeName==null) // this is anonymous type. can't have @XmlSchemaType return false; if(!XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(typeName.getNamespaceURI())) // if we put application-defined type name, it will be undefined // by the time we generate a schema. return false; if(type.isCollection()) // there's no built-in binding for a list simple type, // so any collection type always need @XmlSchemaType return true; QName itemType = type.getInfo().getTypeName(); if(itemType==null) // this is somewhat strange case, as it means the bound type is anonymous // but it's eventually derived by a named type and used. // but we can certainly use typeName as @XmlSchemaType value here return true; // if it's the default type name for this item, then no need return !itemType.equals(typeName); }
/** * Checks if the given {@link TypeUse} would need an explicit {@link XmlSchemaType} * annotation with the given type name. */ protected static boolean needsExplicitTypeName(TypeUse type, QName typeName) { if(typeName==null) // this is anonymous type. can't have @XmlSchemaType return false; if(!typeName.getNamespaceURI().equals(WellKnownNamespace.XML_SCHEMA)) // if we put application-defined type name, it will be undefined // by the time we generate a schema. return false; if(type.isCollection()) // there's no built-in binding for a list simple type, // so any collection type always need @XmlSchemaType return true; QName itemType = type.getInfo().getTypeName(); if(itemType==null) // this is somewhat strange case, as it means the bound type is anonymous // but it's eventually derived by a named type and used. // but we can certainly use typeName as @XmlSchemaType value here return true; // if it's the default type name for this item, then no need return !itemType.equals(typeName); }
/** * Checks if the given {@link TypeUse} would need an explicit {@link XmlSchemaType} * annotation with the given type name. */ protected static boolean needsExplicitTypeName(TypeUse type, QName typeName) { if(typeName==null) // this is anonymous type. can't have @XmlSchemaType return false; if(!XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(typeName.getNamespaceURI())) // if we put application-defined type name, it will be undefined // by the time we generate a schema. return false; if(type.isCollection()) // there's no built-in binding for a list simple type, // so any collection type always need @XmlSchemaType return true; QName itemType = type.getInfo().getTypeName(); if(itemType==null) // this is somewhat strange case, as it means the bound type is anonymous // but it's eventually derived by a named type and used. // but we can certainly use typeName as @XmlSchemaType value here return true; // if it's the default type name for this item, then no need return !itemType.equals(typeName); }
public CPropertyInfo createElementPropertyInfo(String propertyName, XSComponent source, TypeUse propertyType, QName propertyQName, CollectionMode collectionMode, CCustomizations customizations) { final CNonElement propertyTypeInfo = propertyType.getInfo(); final CElementPropertyInfo propertyInfo = new CElementPropertyInfo( propertyName, collectionMode, propertyTypeInfo.idUse(), propertyTypeInfo.getExpectedMimeType(), source, customizations, null, true); final CTypeRef typeRef = new CTypeRef(propertyTypeInfo, propertyQName, propertyTypeInfo.getTypeName(), false, null); propertyInfo.setAdapter(propertyType.getAdapterUse()); propertyInfo.getTypes().add(typeRef); return propertyInfo; }
public CPropertyInfo createElementPropertyInfo(String propertyName, XSComponent source, TypeUse propertyType, QName propertyQName, CollectionMode collectionMode, CCustomizations customizations) { final CNonElement propertyTypeInfo = propertyType.getInfo(); final CElementPropertyInfo propertyInfo = new CElementPropertyInfo( propertyName, collectionMode, propertyTypeInfo.idUse(), propertyTypeInfo.getExpectedMimeType(), source, customizations, null, true); final CTypeRef typeRef = new CTypeRef(propertyTypeInfo, propertyQName, propertyTypeInfo.getTypeName(), false, null); propertyInfo.setAdapter(propertyType.getAdapterUse()); propertyInfo.getTypes().add(typeRef); return propertyInfo; }
public static FieldOutline createAttributeField( ClassOutlineImpl classOutline, String name, final QName attName, final CNonElement typeInfo, final boolean required // , // final XSDatatype datatype, // final JType type ) { final CPropertyInfo propertyInfo = new CAttributePropertyInfo( // name name, // source null, new CCustomizations(), // locator null, // attName attName, // typeUse typeInfo, // typeName typeInfo.getTypeName(), // required required); propertyInfo.realization = new FieldRendererFactory().getDefault(); final FieldOutline fieldOutline = propertyInfo.realization.generate(classOutline, propertyInfo); return fieldOutline; }
public CPropertyInfo createAttributePropertyInfo(String propertyName, XSComponent source, TypeUse propertyType, QName propertyQName, CollectionMode collectionMode, CCustomizations customizations) { final TypeUse typeUse = collectionMode.isRepeated() ? new DefaultTypeUse(propertyType.getInfo(), true, propertyType.idUse(), propertyType.getExpectedMimeType(), propertyType.getAdapterUse()) : propertyType; final CAttributePropertyInfo propertyInfo = new CAttributePropertyInfo( propertyName, source, customizations, null, propertyQName, typeUse, typeUse.getInfo() .getTypeName(), false); return propertyInfo; }
public CPropertyInfo createAttributePropertyInfo(String propertyName, XSComponent source, TypeUse propertyType, QName propertyQName, CollectionMode collectionMode, CCustomizations customizations) { final TypeUse typeUse = collectionMode.isRepeated() ? new DefaultTypeUse(propertyType.getInfo(), true, propertyType.idUse(), propertyType.getExpectedMimeType(), propertyType.getAdapterUse()) : propertyType; final CAttributePropertyInfo propertyInfo = new CAttributePropertyInfo( propertyName, source, customizations, null, propertyQName, typeUse, typeUse.getInfo() .getTypeName(), false); return propertyInfo; }
public static FieldOutline createAttributeField( ClassOutlineImpl classOutline, String name, final QName attName, final CNonElement typeInfo, final boolean required // , // final XSDatatype datatype, // final JType type ) { final CPropertyInfo propertyInfo = new CAttributePropertyInfo( // name name, // source null, new CCustomizations(), // locator null, // attName attName, // typeUse typeInfo, // typeName typeInfo.getTypeName(), // required required); propertyInfo.realization = new FieldRendererFactory().getDefault(); final FieldOutline fieldOutline = propertyInfo.realization.generate(classOutline, propertyInfo); return fieldOutline; }
protected CPropertyInfo createPropertyInfo(ProcessModel context, CClassInfo classInfo, GeneratedVersion cversion) { final String propertyName = getPropertyName(context, cversion); final QName attributeName = getAttributeName(context, cversion); final CNonElement propertyTypeInfo = getPropertyTypeInfo(context, cversion); final CCustomizations customizations = new CCustomizations(); final CPluginCustomization version = createVersionCustomization(context, cversion); customizations.add(version); // // CPluginCustomization generated = CustomizationUtils // .createCustomization(org.jvnet.jaxb2_commons.plugin.Customizations.GENERATED_ELEMENT_NAME); // generated.markAsAcknowledged(); // customizations.add(generated); final CPropertyInfo propertyInfo = new CAttributePropertyInfo( propertyName, null, customizations, null, attributeName, propertyTypeInfo, propertyTypeInfo.getTypeName(), false); if (cversion.isTransient() != null && cversion.isTransient()) { propertyInfo.realization = new GenericFieldRenderer( TransientSingleField.class); } Customizations.markGenerated(propertyInfo); return propertyInfo; }
protected CPropertyInfo createPropertyInfo(ProcessModel context, CClassInfo classInfo, GeneratedVersion cversion) { final String propertyName = getPropertyName(context, cversion); final QName attributeName = getAttributeName(context, cversion); final CNonElement propertyTypeInfo = getPropertyTypeInfo(context, cversion); final CCustomizations customizations = new CCustomizations(); final CPluginCustomization version = createVersionCustomization(context, cversion); customizations.add(version); // // CPluginCustomization generated = CustomizationUtils // .createCustomization(org.jvnet.jaxb2_commons.plugin.Customizations.GENERATED_ELEMENT_NAME); // generated.markAsAcknowledged(); // customizations.add(generated); final CPropertyInfo propertyInfo = new CAttributePropertyInfo( propertyName, null, customizations, null, attributeName, propertyTypeInfo, propertyTypeInfo.getTypeName(), false); if (cversion.isTransient() != null && cversion.isTransient()) { propertyInfo.realization = new GenericFieldRenderer( TransientSingleField.class); } Customizations.markGenerated(propertyInfo); return propertyInfo; }
protected CPropertyInfo createPropertyInfo(ProcessModel context, CClassInfo classInfo) { final GeneratedId cid = context.getCustomizing().getGeneratedId( classInfo); final String propertyName = getPropertyName(context, cid); final QName attributeName = getAttributeName(context, cid); final CNonElement propertyTypeInfo = getPropertyTypeInfo(context, cid); final CCustomizations customizations = new CCustomizations(); final CPluginCustomization id = createIdCustomization(context, cid); customizations.add(id); // // CPluginCustomization generated = CustomizationUtils // .createCustomization(org.jvnet.jaxb2_commons.plugin.Customizations.GENERATED_ELEMENT_NAME); // generated.markAsAcknowledged(); // customizations.add(generated); final CPropertyInfo propertyInfo = new CAttributePropertyInfo( propertyName, null, customizations, null, attributeName, propertyTypeInfo, propertyTypeInfo.getTypeName(), false); if (cid.isTransient() != null && cid.isTransient()) { propertyInfo.realization = new GenericFieldRenderer( TransientSingleField.class); } Customizations.markGenerated(propertyInfo); return propertyInfo; }
protected CPropertyInfo createPropertyInfo(ProcessModel context, CClassInfo classInfo) { final GeneratedId cid = context.getCustomizing().getGeneratedId( classInfo); final String propertyName = getPropertyName(context, cid); final QName attributeName = getAttributeName(context, cid); final CNonElement propertyTypeInfo = getPropertyTypeInfo(context, cid); final CCustomizations customizations = new CCustomizations(); final CPluginCustomization id = createIdCustomization(context, cid); customizations.add(id); // // CPluginCustomization generated = CustomizationUtils // .createCustomization(org.jvnet.jaxb2_commons.plugin.Customizations.GENERATED_ELEMENT_NAME); // generated.markAsAcknowledged(); // customizations.add(generated); final CPropertyInfo propertyInfo = new CAttributePropertyInfo( propertyName, null, customizations, null, attributeName, propertyTypeInfo, propertyTypeInfo.getTypeName(), false); if (cid.isTransient() != null && cid.isTransient()) { propertyInfo.realization = new GenericFieldRenderer( TransientSingleField.class); } Customizations.markGenerated(propertyInfo); return propertyInfo; }