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


    event.setComplexType(complexType);
   
    handler.startComplexType(event);
   
    // particle (sequence/all)
    XmlSchemaParticle particle = complexType.getParticle();
    if(particle!=null)
      processParticle(particle);
   
    // attributes
    XmlSchemaObjectCollection attributes = complexType.getAttributes();
View Full Code Here

    // extends
    handler.foundExtension(event);
   
    // particle (sequence/all)
    XmlSchemaParticle particle = complexContentExtension.getParticle();
    if(particle!=null)
      processParticle(particle);
   
    // attributes
    XmlSchemaObjectCollection attributes = complexContentExtension.getAttributes();
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

        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

            // 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) {
                        element.setSchemaType(xmlSchemaCollection
View Full Code Here

    XmlSchemaContentModel contentModel = complexType.getContentModel();
   
    if(contentModel!=null)
      return false;

    XmlSchemaParticle particle = complexType.getParticle();
   
    if(particle==null) {
      return false;
     
    } else if(particle instanceof XmlSchemaSequence) {
View Full Code Here

   *
   * @param complexType
   * @return
   */
  public static XmlSchemaObject getWrappedObject(XmlSchemaComplexType complexType) {
    XmlSchemaParticle particle = complexType.getParticle();
   
    if(particle instanceof XmlSchemaSequence) {
      XmlSchemaSequence sequence = (XmlSchemaSequence)complexType.getParticle();
      XmlSchemaElement element = (XmlSchemaElement)sequence.getItems().getItem(0);
      return element;
View Full Code Here

       
            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

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.