Package org.apache.ws.commons.schema

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


        return choice;
    }
    public static XmlSchemaAll getAll(XmlSchemaComplexType type) {
        XmlSchemaParticle particle = type.getParticle();
        XmlSchemaAll all = null;

        if (particle == null) {
            // the code that uses this wants to iterate. An empty one is more useful than
            // a null pointer, and certainly an exception.
            return EMPTY_ALL;
View Full Code Here


            iterL = scontainer.getItems().getIterator();
        } else if (particle instanceof XmlSchemaChoice) {
            XmlSchemaChoice scontainer = (XmlSchemaChoice)particle;
            iterL = scontainer.getItems().getIterator();
        } else if (particle instanceof XmlSchemaAll) {
            XmlSchemaAll acontainer = (XmlSchemaAll)particle;
            iterL = acontainer.getItems().getIterator();
        }

        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) {
                    memberType.setQName(null);                 
                    if (memberType != null && !isDuplicate(memberType)) {
                        typeMappingType.getStructOrExceptionOrUnion().add(memberType);
                    }                   
                }
               
                MemberType member = new MemberType();
                member.setName(memberType.getName() + "_f");
                member.setIdltype(typeName);
                members.add(member);

            } else if (container instanceof XmlSchemaChoice) {
                XmlSchemaChoice choice = (XmlSchemaChoice)container;
                CorbaTypeImpl corbatype = processChoice(choice, defaultName, schemaTypeName);
                MemberType member = new MemberType();
                member.setName(corbatype.getQName().getLocalPart());
                member.setIdltype(corbatype.getQName());
                members.add(member);
            } else if (container instanceof XmlSchemaAll) {
                XmlSchemaAll all = (XmlSchemaAll)container;
                CorbaTypeImpl corbatype = processAllType(all, defaultName, schemaTypeName);
                MemberType member = new MemberType();
                member.setName(corbatype.getQName().getLocalPart());
                member.setIdltype(corbatype.getQName());
                members.add(member);
View Full Code Here

                } else {                   
                    LOG.log(Level.WARNING, "Couldnt map Sequence inside extension");
                }

            } else if (extype.getParticle() instanceof  XmlSchemaAll) {
                XmlSchemaAll all = (XmlSchemaAll)extype.getParticle();
               
                CorbaTypeImpl alltype = processAllType(all, defaultName, schematypeName);
                if (alltype != null) {
                    MemberType allmem = new MemberType();
                    allmem.setName(alltype.getQName().getLocalPart() + "_f");
View Full Code Here

    } 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();
     
    } else {
      return false;
    }
   
View Full Code Here

    } 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);
      return element;
     
    } else {
      return null;
    }
View Full Code Here

            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) {
                XmlSchemaAll all = (XmlSchemaAll)container;
                MemberType member = processAllMember(all, defaultName,
                                                     schemaTypeName);
                member.setAnonschematype(true);
                members.add(member);
            } else if (container instanceof XmlSchemaElement) {
View Full Code Here

            corbaStruct.getMember().add(choicemem);
        } else if (extype instanceof  XmlSchemaSequence) {
            XmlSchemaSequence seq = (XmlSchemaSequence)extype;
            corbaStruct = processComplexContentStructSequence(corbaStruct, seq, defaultName, schematypeName);
        } else if (extype instanceof  XmlSchemaAll) {
            XmlSchemaAll all = (XmlSchemaAll)extype;
            corbaStruct = processComplexContentStructSchemaAll(corbaStruct, all,
                                                         defaultName, schematypeName);
        }
        return corbaStruct;
    }
View Full Code Here

           
            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 {
                XmlSchemaSequence sequence = XmlSchemaUtils.getSequence(complexType);
                addCrossImports(schema, sequence);
            }
View Full Code Here

            iterL = scontainer.getItems().getIterator();
        } else if (particle instanceof XmlSchemaChoice) {
            XmlSchemaChoice scontainer = (XmlSchemaChoice)particle;
            iterL = scontainer.getItems().getIterator();
        } else if (particle instanceof XmlSchemaAll) {
            XmlSchemaAll acontainer = (XmlSchemaAll)particle;
            iterL = acontainer.getItems().getIterator();
        }

        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) {
                    memberType.setQName(null);          
                    if (!isDuplicate(memberType)) {
                        typeMappingType.getStructOrExceptionOrUnion().add(memberType);
                    }                   
                }
               
                MemberType member = new MemberType();
                member.setName(memberType.getName() + "_f");
                member.setIdltype(typeName);
                members.add(member);

            } else if (container instanceof XmlSchemaChoice) {
                XmlSchemaChoice choice = (XmlSchemaChoice)container;
                CorbaTypeImpl corbatype = processChoice(choice, defaultName, schemaTypeName);
                MemberType member = new MemberType();
                member.setName(corbatype.getQName().getLocalPart());
                member.setIdltype(corbatype.getQName());
                members.add(member);
            } else if (container instanceof XmlSchemaAll) {
                XmlSchemaAll all = (XmlSchemaAll)container;
                CorbaTypeImpl corbatype = processAllType(all, defaultName, schemaTypeName);
                MemberType member = new MemberType();
                member.setName(corbatype.getQName().getLocalPart());
                member.setIdltype(corbatype.getQName());
                members.add(member);
View Full Code Here

                } else {                   
                    LOG.log(Level.WARNING, "Couldnt map Sequence inside extension");
                }

            } else if (extype.getParticle() instanceof  XmlSchemaAll) {
                XmlSchemaAll all = (XmlSchemaAll)extype.getParticle();
               
                CorbaTypeImpl alltype = processAllType(all, defaultName, schematypeName);
                if (alltype != null) {
                    MemberType allmem = new MemberType();
                    allmem.setName(alltype.getQName().getLocalPart() + "_f");
View Full Code Here

TOP

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

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.