Package org.apache.ws.commons.schema

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


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

            if (stype.getItems().getCount() == 2) {
                Iterator it = stype.getItems().getIterator();
                XmlSchemaParticle st1 = (XmlSchemaParticle)it.next();
                XmlSchemaParticle st2 = (XmlSchemaParticle)it.next();
                XmlSchemaElement discEl = null;

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


            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);
View Full Code Here

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

        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;
View Full Code Here

        if (!(content instanceof XmlSchemaComplexContentExtension)) {
            return null;
        }

        XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension)content;
        XmlSchemaParticle particle = ext.getParticle();
        if (particle == null) {
            return null;
        }
        XmlSchemaSequence sequence = null;
        try {
View Full Code Here

        }
        return null;
    }

    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

        }
        if (content instanceof XmlSchemaComplexContentExtension) {
            XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension)content;
            XmlSchemaUtils.addImportIfNeeded(schema, extension.getBaseTypeName());
            addCrossImportsAttributeList(schema, extension.getAttributes());
            XmlSchemaParticle particle = extension.getParticle();
            if (particle instanceof XmlSchemaSequence) {
                addCrossImportsSequence(schema, (XmlSchemaSequence)particle);
            }
        } else if (content instanceof XmlSchemaComplexContentRestriction) {
            XmlSchemaComplexContentRestriction restriction = (XmlSchemaComplexContentRestriction)content;
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

            && 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

            XmlSchemaType schemaType = elt.getSchemaType();
            // if the schema is a complex type then we are interested!
            if (schemaType instanceof XmlSchemaComplexType) {
                XmlSchemaComplexType complexType = (XmlSchemaComplexType)schemaType;
                if (complexType.getParticle()!=null){
                    XmlSchemaParticle particle = complexType.getParticle();
                    if (particle instanceof XmlSchemaSequence){
                        //fine! We have a sequence. so we need to traverse through this
                        //and find the nested elements
                        XmlSchemaSequence sequence = (XmlSchemaSequence)particle;
                        XmlSchemaElement internalElement;
View Full Code Here

        writer.write(simpleType, processedTypemap, metaInfHolder);
        processedTypeMetaInfoMap.put(simpleType.getQName(),metaInfHolder);
    }

    private BeanWriterMetaInfoHolder processComplexType(XmlSchemaComplexType complexType,XmlSchema parentSchema) throws SchemaCompilationException {
        XmlSchemaParticle particle = complexType.getParticle();
        BeanWriterMetaInfoHolder metaInfHolder = new BeanWriterMetaInfoHolder();
        if (particle != null) {
            //Process the particle
            processParticle(particle, metaInfHolder,parentSchema);
        }
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.