if (single && bindcomp instanceof StructureElement) { struct = (StructureElement)bindcomp; keep = struct.getGetName() == null && struct.getSetName() == null && struct.getFieldName() == null && !struct.isChoice() && struct.getDeclaredType() == null && struct.getMapAsQName() == null && (struct.getName() == null || (type != SchemaBase.ATTRIBUTE_TYPE && type != SchemaBase.ELEMENT_TYPE)); struct = new StructureElement(); struct.setDeclaredType(leaf.getBindingType()); holder.addTypeNameReference(uri, def.getSchemaComponent().getSchema()); struct.setMapAsQName(qname);
/** * Check if a <structure> element represents a type derivation. If the element is empty, has no name or property, * is required, and is a mapping reference, then it can be handled as a type derivation. * * @param struct * @return <code>true</code> if a type derivation, <code>false</code> if not */ private static boolean isTypeDerivation(StructureElement struct) { return struct.children().size() == 0 && !struct.hasName() && !struct.hasProperty() && !struct.isOptional() && (struct.getDeclaredType() != null || struct.getEffectiveMapping() != null); }
String uri = qname.getUri(); hold.addTypeNameReference(uri, uri); struct.setMapAsQName(qname); if (memb != null) { struct.setName(memb.getXmlName()); hold.addNamespaceUsage(hold.getNamespace()); struct.setMapAsName(cust.getName()); struct.setDeclaredType(memb.getActualType()); struct.setCreateType(memb.getCreateType()); struct.setFactoryName(memb.getFactoryMethod()); struct.setName(memb.getXmlName()); hold.addNamespaceUsage(hold.getNamespace()); StructureElement sstruct = new StructureElement(); sstruct.setDeclaredType(stype); fillStructure(scust, null, exmethmap, sstruct, hold); struct.addChild(sstruct); struct.setDeclaredType(stype); fillStructure(scust, null, exmethmap, struct, hold); struct = new StructureElement(); struct.setMapAsName(intf); exmethmap = idetail.getAccessMethodMap();
StructureElement struct = new StructureElement(); setName(child.getQName(), holder, struct); struct.setUsage(PropertyAttributes.OPTIONAL_USAGE); bindcomp.addChild(struct); AnnotatedBase comp = def.getSchemaComponent(); int type = comp.type(); StructureElement struct = new StructureElement(); if (type == SchemaBase.ELEMENT_TYPE) { struct.setMapAsName(getSuperClass().getBindingName()); struct.setMapAsQName(qname); boolean multi = subparent.getChildren().size() > 1; if ((wrapname != null && (subparent.isNamed() || multi)) || (all && multi)) { StructureElement struct = new StructureElement(); struct.setOrdered(!all); setName(wrapname, holder, struct); if (wrapopt) { struct.setUsage(PropertyAttributes.OPTIONAL_USAGE); struct.setDeclaredType(type); StructureElement struct = new StructureElement(); setName(subparent.getQName(), holder, struct); wrapcomp.addChild(struct); newcomp = new StructureElement();
StructureElement struct = new StructureElement(); if (memb.getFieldName() == null) { struct.setGetName(gmeth); struct.setSetName(memb.getSetName()); } else { struct.setFieldName(memb.getFieldName()); struct.setUsageName("optional");
ptype = parent.getName(); if (checkInclude(ptype)) { struct = new StructureElement(); struct.setDeclaredType(ptype); ClassCustom scust = m_global.getClassCustomization(ptype); exmembmap = new HashMap(); struct = new StructureElement(); BindingMappingDetail pdetail = (BindingMappingDetail)m_mappingDetailsMap.get(ptype); if (!pdetail.isGenerated()) { uri = tname.getUri(); hold.addTypeNameReference(uri, uri); struct.setMapAsQName(tname); struct.setMapAsName(ptype); struct = new StructureElement(); QName tname = detail.getTypeQName(); uri = tname.getUri(); hold.addTypeNameReference(uri, uri); struct.setMapAsQName(tname); mapcon.addChild(struct); hold.addMapping(mapcon);
if (struct.children().size() > 0) { MappingElement ref = (MappingElement)struct.getEffectiveMapping(); if (ref == null) { m_context.addError("No handling defined for empty structure with no mapping reference", struct); if (struct.hasDirectName()) { if (ref.isAbstract()) {
if (struct.children().size() > 0) { if (struct.isOrdered()) { MappingElementBase ref = (MappingElementBase)struct.getEffectiveMapping(); if (ref == null) {
StructureElement struct = (StructureElement)content; if (isTypeDerivation(struct)) { base = (MappingElement)struct.getEffectiveMapping(); baseref = struct; if (struct.children().size() > 0) { MappingElementBase ref = (MappingElementBase)struct.getEffectiveMapping(); if (ref != null) {
if (struct.isOptional()) { m_context.addError("No schema equivalent for optional abstract mapping with attributes", comp); } else { MappingElementBase ref = (MappingElementBase)struct.getEffectiveMapping(); if (ref != null && ref.isAbstract()) {
StructureElement struct = new StructureElement(); QName qname = mapping.getTypeQName(); String uri = qname.getUri(); m_bindingDirectory.addTypeNameReference(holder, uri, schema); struct.setMapAsQName(qname); elmapping.addChild(struct); holder.addMapping(elmapping);
MappingElementBase ref = (MappingElementBase)struct.getEffectiveMapping(); if (ref == null) {
iname = custom.getElementName(); StructureElement struct = new StructureElement(); if (qname == null) { struct.setMapAsName(itype); } else { struct.setMapAsQName(qname); struct.setName(iname); hold.addNamespaceUsage(hold.getNamespace()); struct.setCreateType(custom.getCreateType()); struct.setFactoryName(custom.getFactoryMethod()); coll.addChild(struct); StructureElement struct = new StructureElement(); struct.setDeclaredType(itype); if (iname == null) { iname = custom.getElementName(); struct.setName(iname); hold.addNamespaceUsage(hold.getNamespace()); fillStructure(custom, null, null, struct, hold);