Package org.apache.ws.commons.schema

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


        QName qname = name;
        if (ctype.getQName() != null) {
            qname = ctype.getQName();
        }
        String nsURI = getNamespaceURI(serviceInfo, qname);
        XmlSchemaGroupBase group = (XmlSchemaGroupBase) ctype.getParticle();
        for (int i = 0; i < exceptMembers.size(); ++i) {
            MemberType member = exceptMembers.get(i);
            QName memberName = new QName(nsURI, member.getName());
            QName memberType = member.getIdltype();
            CorbaObjectHandler memberObj = initializeObjectHandler(orb,
                                                                   memberName,
                                                                   memberType,
                                                                   group.getItems().getItem(i),
                                                                   typeMaps,
                                                                   serviceInfo);
            ((CorbaExceptionHandler)obj).addMember(memberObj);
        }
    }
View Full Code Here


        }
       
        if (stype instanceof XmlSchemaComplexType) {
            //only one element inside the XmlSchemaComplexType
            XmlSchemaComplexType ctype = (XmlSchemaComplexType) stype;
            XmlSchemaGroupBase group = (XmlSchemaGroupBase) ctype.getParticle();
            el = (XmlSchemaElement) group.getItems().getItem(0);
        } else {
            el = (XmlSchemaElement) schemaType;
        }
        return el;
    }
View Full Code Here

        try {
            Exception exType = (Exception) CorbaUtils.getCorbaType(idlType, typeMaps);
            StartElement exStartEl = reader.nextEvent().asStartElement();
            obj = new CorbaExceptionHandler(exStartEl.getName(), idlType, tc, exType);
            XmlSchemaComplexType ctype = (XmlSchemaComplexType) schemaType;
            XmlSchemaGroupBase group = (XmlSchemaGroupBase) ctype.getParticle();
            List<MemberType> exMembers = exType.getMember();
            for (int i = 0; i < exMembers.size(); ++i) {
                CorbaObjectHandler member = readObjectFromStax(reader,
                                                               exMembers.get(i).getIdltype(),
                                                               group.getItems().getItem(i),
                                                               true);
                obj.addMember(member);
            }
            reader.nextEvent().asEndElement();
        } catch (java.lang.Exception ex) {
View Full Code Here

        }
        StartElement startEl = factory.createStartElement(objName, null, null);
        writer.add(startEl);
        CorbaExceptionHandler exObj = (CorbaExceptionHandler)obj;
        XmlSchemaComplexType ctype = (XmlSchemaComplexType) schemaType;
        XmlSchemaGroupBase group = (XmlSchemaGroupBase) ctype.getParticle();
        List<CorbaObjectHandler> elements = exObj.getMembers();
        for (int i = 0; i < elements.size(); i++) {
            writeObjectToStax(elements.get(i), group.getItems().getItem(i), writer, factory, true);
        }
        EndElement endEl = factory.createEndElement(objName, null);
        writer.add(endEl);
    }
View Full Code Here

        XmlSchemaType schemaType = xmlSchemaElement.getSchemaType();
        if (schemaType instanceof XmlSchemaComplexType) {
            XmlSchemaComplexType complexType = ((XmlSchemaComplexType)schemaType);
            XmlSchemaParticle particle = complexType.getParticle();
            if (particle instanceof XmlSchemaSequence || particle instanceof XmlSchemaAll) {
                XmlSchemaGroupBase xmlSchemaGroupBase = (XmlSchemaGroupBase)particle;
                Iterator iterator = xmlSchemaGroupBase.getItems().getIterator();

                while (iterator.hasNext()) {
                    XmlSchemaElement innerElement = (XmlSchemaElement)iterator.next();
                    QName qName = innerElement.getQName();
                    if (qName == null && innerElement.getSchemaTypeName()
View Full Code Here

                XmlSchemaType schemaType = xmlSchemaElement.getSchemaType();
                if (schemaType instanceof XmlSchemaComplexType) {
                    XmlSchemaComplexType complexType = ((XmlSchemaComplexType)schemaType);
                    XmlSchemaParticle particle = complexType.getParticle();
                    if (particle instanceof XmlSchemaSequence || particle instanceof XmlSchemaAll) {
                        XmlSchemaGroupBase xmlSchemaGroupBase = (XmlSchemaGroupBase)particle;
                        Iterator iterator = xmlSchemaGroupBase.getItems().getIterator();

                        // now we need to know some information from the binding operation.

                        while (iterator.hasNext()) {
                            XmlSchemaElement innerElement = (XmlSchemaElement)iterator.next();
View Full Code Here

        XmlSchemaType schemaType = xmlSchemaElement.getSchemaType();
        if (schemaType instanceof XmlSchemaComplexType) {
            XmlSchemaComplexType complexType = ((XmlSchemaComplexType)schemaType);
            XmlSchemaParticle particle = complexType.getParticle();
            if (particle instanceof XmlSchemaSequence || particle instanceof XmlSchemaAll) {
                XmlSchemaGroupBase xmlSchemaGroupBase = (XmlSchemaGroupBase)particle;
                Iterator iterator = xmlSchemaGroupBase.getItems().getIterator();

                while (iterator.hasNext()) {
                    XmlSchemaElement innerElement = (XmlSchemaElement)iterator.next();
                    QName qName = innerElement.getQName();
                    if (qName == null && innerElement.getSchemaTypeName()
View Full Code Here

            XmlSchemaType schemaType = xmlSchemaElement.getSchemaType();
            if (schemaType instanceof XmlSchemaComplexType) {
                XmlSchemaComplexType complexType = ((XmlSchemaComplexType) schemaType);
                XmlSchemaParticle particle = complexType.getParticle();
                if (particle instanceof XmlSchemaSequence || particle instanceof XmlSchemaAll) {
                    XmlSchemaGroupBase xmlSchemaGroupBase = (XmlSchemaGroupBase) particle;
                    Iterator iterator = xmlSchemaGroupBase.getItems().getIterator();

                    // now we need to know some information from the binding operation.

                    while (iterator.hasNext()) {
                        XmlSchemaElement innerElement = (XmlSchemaElement) iterator.next();
View Full Code Here

    private void processGroup(XmlSchemaGroup xmlSchemaGroup,
                              QName schemaGroupQName,
                              XmlSchema parentSchema) throws SchemaCompilationException {

        // find the group base item
        XmlSchemaGroupBase xmlSchemaGroupBase = xmlSchemaGroup.getParticle();
        if (xmlSchemaGroupBase != null){
            if (xmlSchemaGroupBase instanceof XmlSchemaSequence){
                XmlSchemaSequence xmlSchemaSequence = (XmlSchemaSequence) xmlSchemaGroupBase;
                if (xmlSchemaSequence.getItems().getCount() > 0) {
                    BeanWriterMetaInfoHolder beanWriterMetaInfoHolder = new BeanWriterMetaInfoHolder();
View Full Code Here

        final XmlSchemaParticle particle = complexType.getParticle();
        if (particle instanceof XmlSchemaElement) {
            final XmlSchemaElement element = (XmlSchemaElement) particle;
            elements.add(element);
        } else if (particle instanceof XmlSchemaGroupBase && !(particle instanceof XmlSchemaChoice)) {
            final XmlSchemaGroupBase groupBase = (XmlSchemaGroupBase) particle;
            for (final Iterator iterator = groupBase.getItems().getIterator(); iterator.hasNext(); ) {
                final XmlSchemaParticle child = (XmlSchemaParticle) iterator.next();
                if (child instanceof XmlSchemaElement) {
                    final XmlSchemaElement element = (XmlSchemaElement) child;
                    elements.add(element);
                }
View Full Code Here

TOP

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

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.