private CorbaType processChoice(XmlSchemaChoice choice, QName defaultName, QName schemaTypeName) throws Exception { QName choicename = null; if (schemaTypeName == null) { choicename = createQNameCorbaNamespace(defaultName.getLocalPart()); } else { choicename = createQNameCorbaNamespace(schemaTypeName.getLocalPart()); } choicename = checkPrefix(choicename); CorbaType corbatype = createUnion(choicename, choice, defaultName, schemaTypeName); String repoId = REPO_STRING + corbatype.getQName().getLocalPart().replace('.', '/') + IDL_VERSION; ((Union)corbatype).setRepositoryID(repoId); if (!(choice.getMaxOccurs() == 1) || !(choice.getMinOccurs() == 1)) { QName name = createQNameTargetNamespace(corbatype.getQName().getLocalPart() + "Array"); CorbaType arrayType = createArray(name, corbatype.getQName(), corbatype.getQName(), choice.getMaxOccurs(), choice.getMinOccurs(), false); if (arrayType != null && !isDuplicate(arrayType)) { typeMappingType.getStructOrExceptionOrUnion().add(arrayType); } } return corbatype; }
Boolean isArray = xmlSchemaChoice.getMaxOccurs() > 1 ? Boolean.TRUE : Boolean.FALSE; processedElementArrayStatusMap.put(item, isArray); particleQNameMap.put(item, choiceQName);
Boolean isArray = xmlSchemaChoice.getMaxOccurs() > 1 ? Boolean.TRUE : Boolean.FALSE; processedElementArrayStatusMap.put(item, isArray); particleQNameMap.put(item, choiceQName);
List<XmlSchemaChoiceMember> items = ((XmlSchemaChoice) particle).getItems(); if ((xmlSchemaChoice.getMaxOccurs() > 1)) { metainfHolder.registerQNameIndex(choiceQName, metainfHolder.getOrderStartPoint() + 1); metainfHolder.addtStatus(choiceQName, SchemaConstants.PARTICLE_TYPE_ELEMENT); metainfHolder.addMaxOccurs(choiceQName, xmlSchemaChoice.getMaxOccurs()); metainfHolder.addMinOccurs(choiceQName, xmlSchemaChoice.getMinOccurs());
List<XmlSchemaChoiceMember> items = ((XmlSchemaChoice) particle).getItems(); if ((xmlSchemaChoice.getMaxOccurs() > 1)) { metainfHolder.registerQNameIndex(choiceQName, metainfHolder.getOrderStartPoint() + 1); metainfHolder.addtStatus(choiceQName, SchemaConstants.PARTICLE_TYPE_ELEMENT); metainfHolder.addMaxOccurs(choiceQName, xmlSchemaChoice.getMaxOccurs()); metainfHolder.addMinOccurs(choiceQName, xmlSchemaChoice.getMinOccurs());
XmlSchemaChoice xmlSchemaChoice = (XmlSchemaChoice) child; QName choiceQName = particleQNameMap.get(child); boolean isArray = xmlSchemaChoice.getMaxOccurs() > 1; metainfHolder.addMaxOccurs(choiceQName, xmlSchemaChoice.getMaxOccurs()); metainfHolder.addMinOccurs(choiceQName, xmlSchemaChoice.getMinOccurs()); metainfHolder.setHasParticleType(true);
XmlSchemaChoice xmlSchemaChoice = (XmlSchemaChoice) child; QName choiceQName = particleQNameMap.get(child); boolean isArray = xmlSchemaChoice.getMaxOccurs() > 1; metainfHolder.addMaxOccurs(choiceQName, xmlSchemaChoice.getMaxOccurs()); metainfHolder.addMinOccurs(choiceQName, xmlSchemaChoice.getMinOccurs()); metainfHolder.setHasParticleType(true);