public Collection<CPropertyInfo> process(ProcessModel context, CPropertyInfo propertyInfo) { assert propertyInfo instanceof CReferencePropertyInfo; final CReferencePropertyInfo referencePropertyInfo = (CReferencePropertyInfo) propertyInfo; assert !referencePropertyInfo.isMixed(); // if (referencePropertyInfo.getElements().isEmpty()) { final CPropertyInfo elementProperty = createElementProperty(referencePropertyInfo); final CPropertyInfo objectProperty = createObjectProperty(context, referencePropertyInfo); final Collection<CPropertyInfo> newPropertyInfos = new ArrayList<CPropertyInfo>( context.getGetTypes() .getElements(context, referencePropertyInfo).size() + 3); if (elementProperty != null) { newPropertyInfos.add(elementProperty); } if (objectProperty != null) { newPropertyInfos.add(objectProperty); } final Collection<CPropertyInfo> properties = createElementProperties( context, (CReferencePropertyInfo) propertyInfo); if (properties != null) { newPropertyInfos.addAll(properties); } Customizations.markIgnored(propertyInfo); return newPropertyInfos; }
public CPropertyInfo onReference( CReferencePropertyInfo propertyInfo) { final CReferencePropertyInfo referencePropertyInfo = new CReferencePropertyInfo( propertyInfo.getName(true), propertyInfo.isCollection(), false, propertyInfo.isMixed(), propertyInfo .getSchemaComponent(), new CCustomizations(), null, propertyInfo.isDummy(), propertyInfo .isContent(), propertyInfo .isMixedExtendedCust()); referencePropertyInfo.getElements() .addAll(context.getGetTypes() .getElements(context, referencePropertyInfo)); return referencePropertyInfo; }
public Collection<CPropertyInfo> process(ProcessModel context, CPropertyInfo propertyInfo) { assert propertyInfo instanceof CReferencePropertyInfo; final CReferencePropertyInfo referencePropertyInfo = (CReferencePropertyInfo) propertyInfo; assert !referencePropertyInfo.isMixed(); // if (referencePropertyInfo.getElements().isEmpty()) { final CPropertyInfo elementProperty = createElementProperty(referencePropertyInfo); final CPropertyInfo objectProperty = createObjectProperty(context, referencePropertyInfo); final Collection<CPropertyInfo> newPropertyInfos = new ArrayList<CPropertyInfo>( context.getGetTypes() .getElements(context, referencePropertyInfo).size() + 3); if (elementProperty != null) { newPropertyInfos.add(elementProperty); } if (objectProperty != null) { newPropertyInfos.add(objectProperty); } final Collection<CPropertyInfo> properties = createElementProperties( context, (CReferencePropertyInfo) propertyInfo); if (properties != null) { newPropertyInfos.addAll(properties); } Customizations.markIgnored(propertyInfo); return newPropertyInfos; }
public CPropertyInfo onReference( CReferencePropertyInfo propertyInfo) { final CReferencePropertyInfo referencePropertyInfo = new CReferencePropertyInfo( propertyInfo.getName(true), propertyInfo.isCollection(), false, propertyInfo.isMixed(), propertyInfo .getSchemaComponent(), new CCustomizations(), null, propertyInfo.isDummy(), propertyInfo .isContent(), propertyInfo .isMixedExtendedCust()); referencePropertyInfo.getElements() .addAll(context.getGetTypes() .getElements(context, referencePropertyInfo)); return referencePropertyInfo; }
assert !referencePropertyInfo.isMixed(); Set<CElement> elements = context.getGetTypes().getElements(context, referencePropertyInfo);
assert !referencePropertyInfo.isMixed(); final Set<CElement> elements = context.getGetTypes().getElements( context, referencePropertyInfo);
assert !referencePropertyInfo.isMixed(); final Set<CElement> elements = context.getGetTypes().getElements( context, referencePropertyInfo);
assert !referencePropertyInfo.isMixed(); Set<CElement> elements = context.getGetTypes().getElements(context, referencePropertyInfo);
assert elements.isEmpty(); assert referencePropertyInfo.getWildcard() != null; assert !referencePropertyInfo.isMixed(); return onWildcardReference(referencePropertyInfo); } else { assert !elements.isEmpty(); assert referencePropertyInfo.getWildcard() == null; assert !referencePropertyInfo.isMixed(); assert referencePropertyInfo.isMixed() ^ elements.isEmpty(); return onBuiltinElementReference(referencePropertyInfo); assert !elements.isEmpty(); assert referencePropertyInfo.getWildcard() == null; assert !referencePropertyInfo.isMixed(); return onEnumElementReference(referencePropertyInfo); } else if (contentType instanceof CArrayInfo) { assert !elements.isEmpty(); assert referencePropertyInfo.getWildcard() == null; assert !referencePropertyInfo.isMixed(); return onArrayElementReference(referencePropertyInfo); } else if (contentType instanceof CClass) { assert !elements.isEmpty(); assert referencePropertyInfo.getWildcard() == null; assert !referencePropertyInfo.isMixed(); return onClassElementReference(referencePropertyInfo); } else {
final CReferencePropertyInfo propertyInfo = (CReferencePropertyInfo) draftPropertyInfo; final CReferencePropertyInfo referencePropertyInfo = (CReferencePropertyInfo) propertyInfo; assert !referencePropertyInfo.isMixed(); assert referencePropertyInfo.getWildcard() == null; final Set<CElement> elements = context.getGetTypes().getElements(
final CReferencePropertyInfo propertyInfo = (CReferencePropertyInfo) draftPropertyInfo; final CReferencePropertyInfo referencePropertyInfo = (CReferencePropertyInfo) propertyInfo; assert !referencePropertyInfo.isMixed(); assert referencePropertyInfo.getWildcard() == null; final Set<CElement> elements = context.getGetTypes().getElements(
if(rp.isMixed()) field.annotate(XmlMixed.class);
if(rp.isMixed()) field.annotate(XmlMixed.class);
if(rp.isMixed()) field.annotate(XmlMixed.class);
if(rp.isMixed()) field.annotate(XmlMixed.class);
if(rp.isMixed()) field.annotate(XmlMixed.class);
if(rp.isMixed()) field.annotate(XmlMixed.class);
if(rp.isMixed()) field.annotate(XmlMixed.class);
protected void fix(final JBlock body) { // final JFieldRef wrappedPropertyField = field; // // final JFieldRef wrappingPropertyField = itemsField; body._if(wrappingPropertyField.eq(JExpr._null()))._then().assign( wrappingPropertyField, JExpr._new(codeModel.ref(ArrayList.class).narrow( wrappingPropertyExposedType.boxify()))); final JClass utilsClass = (wrappedProperty instanceof CReferencePropertyInfo && ((CReferencePropertyInfo) wrappedProperty) .isMixed()) ? codeModel.ref(MixedItemUtils.class) : codeModel .ref(ItemUtils.class); body._if( utilsClass.staticInvoke("shouldBeWrapped").arg( wrappedPropertyField))._then().assign( wrappedPropertyField, utilsClass.staticInvoke("wrap").arg(wrappedPropertyField).arg( wrappingPropertyField).arg( wrappingPropertyExposedType.boxify().dotclass())); }
protected void fix(final JBlock body) { // final JFieldRef wrappedPropertyField = field; // // final JFieldRef wrappingPropertyField = itemsField; body._if(wrappingPropertyField.eq(JExpr._null()))._then().assign( wrappingPropertyField, JExpr._new(codeModel.ref(ArrayList.class).narrow( wrappingPropertyExposedType.boxify()))); final JClass utilsClass = (wrappedProperty instanceof CReferencePropertyInfo && ((CReferencePropertyInfo) wrappedProperty) .isMixed()) ? codeModel.ref(MixedItemUtils.class) : codeModel .ref(ItemUtils.class); body._if( utilsClass.staticInvoke("shouldBeWrapped").arg( wrappedPropertyField))._then().assign( wrappedPropertyField, utilsClass.staticInvoke("wrap").arg(wrappedPropertyField).arg( wrappingPropertyField).arg( wrappingPropertyExposedType.boxify().dotclass())); }