Package org.apache.ws.commons.schema

Examples of org.apache.ws.commons.schema.XmlSchemaChoice


                    processedGroupTypeMap.put(schemaGroupQName, javaClassName);
//                    processedTypemap.put(schemaGroupQName, javaClassName);
                }

            } else if (xmlSchemaGroupParticle instanceof XmlSchemaChoice) {
                XmlSchemaChoice xmlSchemaChoice = (XmlSchemaChoice) xmlSchemaGroupParticle;
                if (xmlSchemaChoice.getItems().size() > 0) {
                    BeanWriterMetaInfoHolder beanWriterMetaInfoHolder = new BeanWriterMetaInfoHolder();
                    beanWriterMetaInfoHolder.setChoice(true);
                    processChoiceItems(schemaGroupQName, xmlSchemaChoice.getItems(),
                                       beanWriterMetaInfoHolder, false, parentSchema);
                    beanWriterMetaInfoHolder.setParticleClass(true);
                    String javaClassName = writeComplexParticle(schemaGroupQName,
                                                                beanWriterMetaInfoHolder);
                    processedGroupTypeMap.put(schemaGroupQName, javaClassName);
View Full Code Here


    } else if(particle instanceof XmlSchemaSequence) {
      XmlSchemaSequence sequence = (XmlSchemaSequence)particle;
      items = sequence.getItems();
     
    } else if(particle instanceof XmlSchemaChoice) {
      XmlSchemaChoice choice = (XmlSchemaChoice)particle;
      if(choice.getMaxOccurs()>1) return true;
     
    } else if(particle instanceof XmlSchemaAll) {
      XmlSchemaAll all = (XmlSchemaAll)particle;
      items = all.getItems();
     
View Full Code Here

      XmlSchemaSequence sequence = (XmlSchemaSequence)complexType.getParticle();
      XmlSchemaElement element = (XmlSchemaElement)sequence.getItems().getItem(0);
      return element;
     
    } else if(particle instanceof XmlSchemaChoice) {
      XmlSchemaChoice choice = (XmlSchemaChoice)complexType.getParticle();
      return choice;
     
    } else if(particle instanceof XmlSchemaAll) {
      XmlSchemaAll all = (XmlSchemaAll)complexType.getParticle();
      XmlSchemaElement element = (XmlSchemaElement)all.getItems().getItem(0);
View Full Code Here

   *
   * @param complexType
   * @return
   */
  public static XmlSchemaChoice getWrappedChoice(XmlSchemaComplexType complexType) {
    XmlSchemaChoice choice = (XmlSchemaChoice)complexType.getParticle();
    return choice;
  }
View Full Code Here

        discriminatorElement.setSchemaTypeName(type.getQName());
        discriminatorElement.setMinOccurs(1);
        discriminatorElement.setMaxOccurs(1);
        sequence.getItems().add(discriminatorElement);
       
        XmlSchemaChoice choice = new XmlSchemaChoice();
        choice.setMinOccurs(0);
        choice.setMaxOccurs(1);
        sequence.getItems().add(choice);
       
       
        // corba:union
        Union corbaUnion = new Union();
View Full Code Here

        Iterator iterL = null;
        if (particle instanceof XmlSchemaSequence) {
            XmlSchemaSequence scontainer = (XmlSchemaSequence)particle;
            iterL = scontainer.getItems().iterator();
        } else if (particle instanceof XmlSchemaChoice) {
            XmlSchemaChoice scontainer = (XmlSchemaChoice)particle;
            iterL = scontainer.getItems().iterator();
        } else if (particle instanceof XmlSchemaAll) {
            XmlSchemaAll acontainer = (XmlSchemaAll)particle;
            iterL = acontainer.getItems().iterator();
        } else {
            LOG.warning("Unknown particle type " + particle.getClass().getName());
            iterL = Collections.emptyList().iterator();
        }

        while (iterL.hasNext()) {
            XmlSchemaParticle container = (XmlSchemaParticle)iterL.next();

            if (container instanceof XmlSchemaSequence) {
                XmlSchemaSequence sequence = (XmlSchemaSequence)container;
                CorbaTypeImpl memberType =
                    processSequenceType(sequence, defaultName, schemaTypeName);
                QName typeName = memberType.getQName();
                if (memberType instanceof Struct
                    && !isDuplicate(memberType)) {
                    typeMappingType.getStructOrExceptionOrUnion().add(memberType);
                }
                MemberType member = new MemberType();
                member.setName(memberType.getName() + "_f");
                member.setIdltype(typeName);
                member.setAnonschematype(true);
                if (memberType.isSetQualified() && memberType.isQualified()) {
                    member.setQualified(true);
                }
                members.add(member);
            } else if (container instanceof XmlSchemaChoice) {
                XmlSchemaChoice choice = (XmlSchemaChoice)container;
                MemberType member = processChoiceMember(choice, defaultName,
                                                        schemaTypeName);
                member.setAnonschematype(true);
                members.add(member);
            } else if (container instanceof XmlSchemaAll) {
View Full Code Here

            corbaStruct.getMember().add(member);
        }

        // Process members of Current Type
        if (extype instanceof XmlSchemaChoice) {
            XmlSchemaChoice choice = (XmlSchemaChoice)extype;
            MemberType choicemem = processComplexContentStructChoice(choice, schematypeName, defaultName);
            choicemem.setAnonschematype(true);
            corbaStruct.getMember().add(choicemem);
        } else if (extype instanceof  XmlSchemaSequence) {
            XmlSchemaSequence seq = (XmlSchemaSequence)extype;
View Full Code Here

        XmlSchemaSequence stype = (XmlSchemaSequence)complex.getParticle();
        Iterator it = stype.getItems().iterator();
        XmlSchemaParticle st1 = (XmlSchemaParticle)it.next();
        XmlSchemaParticle st2 = (XmlSchemaParticle)it.next();
        XmlSchemaElement discEl = null;
        XmlSchemaChoice choice = null;

        if (st1 instanceof XmlSchemaElement) {
            discEl = (XmlSchemaElement)st1;
            choice = (XmlSchemaChoice)st2;
        } else {
View Full Code Here

            addCrossImports(schema, complexType.getContentModel());
            addCrossImportsAttributeList(schema, complexType.getAttributes());
            // could it be a choice or something else?
           
            if (complexType.getParticle() instanceof XmlSchemaChoice) {
                XmlSchemaChoice choice = XmlSchemaUtils.getChoice(complexType);
                addCrossImports(schema, choice);
            } else if (complexType.getParticle() instanceof XmlSchemaAll) {
                XmlSchemaAll all = XmlSchemaUtils.getAll(complexType);
                addCrossImports(schema, all);
            } else {
View Full Code Here

                // adding this type to the table
                typeTable.addComplexSchema(name, eltOuter.getQName());
            } else if (dataType instanceof UnionType) {
                XmlSchemaComplexType complexType = new XmlSchemaComplexType(xmlSchema);
                XmlSchemaChoice choice = new XmlSchemaChoice();
                XmlSchemaObjectCollection items = choice.getItems();

                UnionType unionType = (UnionType) dataType;
                Member[] members = unionType.getMembers();
                for (int i = 0; i < members.length; i++) {
                    items.add(generateSchemaforFieldsandProperties(xmlSchema, members[i].getDataType(),
View Full Code Here

TOP

Related Classes of org.apache.ws.commons.schema.XmlSchemaChoice

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.