, XmlSchema parentSchema) throws SchemaCompilationException {
if (particle instanceof XmlSchemaSequence) {
XmlSchemaSequence xmlSchemaSequence = (XmlSchemaSequence) particle;
XmlSchemaObjectCollection items = xmlSchemaSequence.getItems();
if ((xmlSchemaSequence.getMaxOccurs() > 1) && (parentElementQName != null)) {
// we have to process many sequence types
BeanWriterMetaInfoHolder beanWriterMetaInfoHolder = new BeanWriterMetaInfoHolder();
process(parentElementQName, items, beanWriterMetaInfoHolder, true, parentSchema);
beanWriterMetaInfoHolder.setParticleClass(true);
QName sequenceQName = new QName(parentElementQName.getNamespaceURI(),
parentElementQName.getLocalPart() + "Sequence");
String javaClassName = writeComplexParticle(sequenceQName,beanWriterMetaInfoHolder);
processedTypemap.put(sequenceQName, javaClassName);
// add this as an array to the original class
metainfHolder.registerMapping(sequenceQName,
sequenceQName,
findClassName(sequenceQName,true),
SchemaConstants.ARRAY_TYPE);
metainfHolder.setOrdered(true);
metainfHolder.registerQNameIndex(sequenceQName,metainfHolder.getOrderStartPoint() + 1);
metainfHolder.setHasParticleType(true);
metainfHolder.addtStatus(sequenceQName,SchemaConstants.PARTICLE_TYPE_ELEMENT);
metainfHolder.addMaxOccurs(sequenceQName,xmlSchemaSequence.getMaxOccurs());
metainfHolder.addMinOccurs(sequenceQName,xmlSchemaSequence.getMinOccurs());
} else {
if (options.isBackwordCompatibilityMode()) {
process(parentElementQName,items, metainfHolder, false, parentSchema);
} else {
process(parentElementQName,items, metainfHolder, true, parentSchema);
}
}
} else if (particle instanceof XmlSchemaAll) {
XmlSchemaObjectCollection items = ((XmlSchemaAll) particle).getItems();
process(parentElementQName,items, metainfHolder, false, parentSchema);
} else if (particle instanceof XmlSchemaChoice) {
XmlSchemaChoice xmlSchemaChoice = (XmlSchemaChoice) particle;
XmlSchemaObjectCollection items = ((XmlSchemaChoice) particle).getItems();
if ((xmlSchemaChoice.getMaxOccurs() > 1)) {
// we have to process many sequence types
BeanWriterMetaInfoHolder beanWriterMetaInfoHolder = new BeanWriterMetaInfoHolder();
beanWriterMetaInfoHolder.setChoice(true);