Package org.apache.ws.commons.schema

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


            XmlSchemaComplexType complexType = (XmlSchemaComplexType)type;
            if (complexType.getAttributes().getCount() != 0 || complexType.getAnyAttribute() != null) {
                // No attributes
                return null;
            }
            XmlSchemaParticle particle = complexType.getParticle();
            if (particle == null) {
                // No particle
                return Collections.emptyList();
            }
            if (!(particle instanceof XmlSchemaSequence)) {
View Full Code Here


            XmlSchemaComplexType complexType = (XmlSchemaComplexType)type;
            if (complexType.getAttributes().getCount() != 0 || complexType.getAnyAttribute() != null) {
                // No attributes
                return null;
            }
            XmlSchemaParticle particle = complexType.getParticle();
            if (particle == null) {
                // No particle
                return Collections.emptyList();
            }
            if (!(particle instanceof XmlSchemaSequence)) {
View Full Code Here

        throw new UnsupportedConstruct(message);
       
    }
   
    public static XmlSchemaSequence getSequence(XmlSchemaComplexType type) {
        XmlSchemaParticle particle = type.getParticle();
        XmlSchemaSequence sequence = 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.
View Full Code Here

            XmlSchemaComplexType complexType = (XmlSchemaComplexType)type;
            if (complexType.getAttributes().getCount() != 0 || complexType.getAnyAttribute() != null) {
                // No attributes
                return null;
            }
            XmlSchemaParticle particle = complexType.getParticle();
            if (particle == null) {
                // No particle
                return Collections.emptyList();
            }
            if (!(particle instanceof XmlSchemaSequence)) {
View Full Code Here

            XmlSchemaComplexType complexType = (XmlSchemaComplexType)type;
            if (complexType.getAttributes().getCount() != 0 || complexType.getAnyAttribute() != null) {
                // No attributes
                return null;
            }
            XmlSchemaParticle particle = complexType.getParticle();
            if (particle == null) {
                // No particle
                return Collections.emptyList();
            }
            if (!(particle instanceof XmlSchemaSequence)) {
View Full Code Here

            // element corresponds to the type of the parameter. So, we refocus on that.
            if (!empty
                && type instanceof XmlSchemaComplexType
                && type.getName() == null
                && !isWrapped) {
                XmlSchemaParticle betterElement = getBuriedElement((XmlSchemaComplexType) type,
                                                                  diagnosticName);
                if (betterElement instanceof XmlSchemaElement) {
                    element = (XmlSchemaElement)betterElement;
                    if (element.getSchemaType() == null) {
                        if (element.getSchemaTypeName() != null) {
View Full Code Here

            LOG.warning("Unknown particle type " + particle.getClass().getName());
            iterL = new ArrayList<XmlSchemaObjectBase>().iterator();
        }

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

            if (container instanceof XmlSchemaSequence) {
                XmlSchemaSequence sequence = (XmlSchemaSequence)container;
                CorbaTypeImpl memberType =
                    processSequenceType(sequence, defaultName, schemaTypeName);
View Full Code Here

        corbaUnion.setRepositoryID(id);
        corbaUnion.setType(schematypeName);

        XmlSchemaSequence stype = (XmlSchemaSequence)complex.getParticle();
        Iterator<XmlSchemaSequenceMember> 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;
View Full Code Here

            && type.getAttributes().size() == 0) {

            XmlSchemaSequence stype = (XmlSchemaSequence)type.getParticle();

            if (stype.getItems().size() == 2) {
                XmlSchemaParticle st1 = (XmlSchemaParticle)stype.getItems().get(0);
                XmlSchemaParticle st2 = (XmlSchemaParticle)stype.getItems().get(1);
                XmlSchemaElement discEl = null;

                if (st1 instanceof XmlSchemaChoice && st2 instanceof XmlSchemaElement) {
                    isUnion = true;
                    discEl = (XmlSchemaElement)st2;
View Full Code Here

                }
                inMessageElementQname = schemaElement.getQName();
                XmlSchemaType type = schemaElement.getSchemaType();
                if (type != null && type instanceof XmlSchemaComplexType){
                    XmlSchemaComplexType complexType = (XmlSchemaComplexType) type;
                    XmlSchemaParticle particle = complexType.getParticle();
                    if (particle != null && particle instanceof XmlSchemaSequence){
                        XmlSchemaSequence xmlSchemaSequence = (XmlSchemaSequence) particle;
                        XmlSchemaObjectCollection schemaObjectCollection =
                                xmlSchemaSequence.getItems();
                        if (schemaObjectCollection != null) {
                            Iterator iterator = schemaObjectCollection.getIterator();
                            while (iterator.hasNext()) {
                                Object next = iterator.next();
                                if (!(next instanceof XmlSchemaElement)) {
                                    return new URI [0];
                                }
                                XmlSchemaElement innerElement = (XmlSchemaElement) next;
                                if (innerElement.getRefName() != null) {
                                    return new URI [0];
                                }
                                if (innerElement.getMinOccurs() != 1 ||
                                        innerElement.getMaxOccurs() != 1) {
                                    isMultipart = false;
                                }
                                XmlSchemaType schemaType = innerElement.getSchemaType();
                                QName innerElementQName = innerElement.getSchemaTypeName();
                                if (schemaType instanceof XmlSchemaSimpleType) {
                                    if (Constants.XSD_QNAME.equals(innerElementQName) ||
                                            Constants.XSD_NOTATION.equals(innerElementQName) ||
                                            Constants.XSD_HEXBIN.equals(innerElementQName) ||
                                            Constants.XSD_BASE64.equals(innerElementQName)) {
                                            isIRI = false;
                                    }
                                } else {
                                    isIRI = false;
                                }
                                if (Constants.XSD_ANY.equals(innerElementQName) && iterator.hasNext()) {
                                    isRPC = false;
                                }
                                String name = innerElement.getName();
                                if (inMessageElementDetails.get(name) != null) {
                                    isRPC = false;
                                    isMultipart = false;
                                }
                                inMessageElementDetails.put(name, innerElementQName);
                            }
                        }
                    } else {
                        return new URI [0];
                    }
                } else {
                        return new URI [0];
                    }
            } else {
                return new URI [0];
            }
        } else {
            return new URI [0];
        }
        AxisMessage outMessage = null;
        Map outMessageElementDetails = new LinkedHashMap();
        if (isRPC && !WSDL2Constants.MEP_URI_IN_ONLY.equals(mep)) {
            outMessage = axisOperation.getMessage(WSDL2Constants.MESSAGE_LABEL_OUT);
            QName qName = outMessage.getElementQName();
            if (qName == null && Constants.XSD_ANY.equals(qName)) {
                isRPC = false;
            }
            XmlSchemaElement schemaElement = outMessage.getSchemaElement();
            if (schemaElement != null) {
                if (!(axisOperation.getName().getLocalPart() + Java2WSDLConstants.RESPONSE)
                        .equals(schemaElement.getName())) {
                    isRPC = false;
                }
                if (!schemaElement.getQName().getNamespaceURI()
                        .equals(inMessageElementQname.getNamespaceURI())) {
                    isRPC = false;
                }
                XmlSchemaType type = schemaElement.getSchemaType();
                if (type != null && type instanceof XmlSchemaComplexType) {
                    XmlSchemaComplexType complexType = (XmlSchemaComplexType) type;
                    XmlSchemaParticle particle = complexType.getParticle();
                    if (particle != null && particle instanceof XmlSchemaSequence) {
                        XmlSchemaSequence xmlSchemaSequence = (XmlSchemaSequence) particle;
                        XmlSchemaObjectCollection schemaObjectCollection =
                                xmlSchemaSequence.getItems();
                        if (schemaObjectCollection != null) {
View Full Code Here

TOP

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

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.