Package org.apache.xerces.xs

Examples of org.apache.xerces.xs.XSParticle


   }

   private void marshalComplexType(XSElementDeclaration element)
   {
      XSComplexTypeDefinition type = (XSComplexTypeDefinition)element.getTypeDefinition();
      XSParticle particle = type.getParticle();

      XSObjectList attributeUses = type.getAttributeUses();
      AttributesImpl attrs = attributeUses.getLength() > 0 ? new AttributesImpl(attributeUses.getLength()) : null;
      for (int i = 0; i < attributeUses.getLength(); ++i)
      {
View Full Code Here


   private boolean marshalModelGroupAll(XSObjectList particles)
   {
      boolean marshalled = false;
      for (int i = 0; i < particles.getLength(); ++i)
      {
         XSParticle particle = (XSParticle)particles.item(i);
         marshalled |= marshalParticle(particle);
      }
      return marshalled;
   }
View Full Code Here

   {
      boolean marshalled = false;
      Content mainContent = this.content;
      for (int i = 0; i < particles.getLength() && !marshalled; ++i)
      {
         XSParticle particle = (XSParticle)particles.item(i);
         this.content = new Content();
         marshalled = marshalParticle(particle);
      }

      if (marshalled)
View Full Code Here

   private boolean marshalModelGroupSequence(XSObjectList particles)
   {
      boolean marshalled = true;
      for (int i = 0; i < particles.getLength(); ++i)
      {
         XSParticle particle = (XSParticle)particles.item(i);
         marshalled &= marshalParticle(particle);
      }
      return marshalled;
   }
View Full Code Here

    }

    private void expandRelatedComplexTypeComponents(XSComplexTypeDecl type, Vector componentList, String namespace, Hashtable dependencies) {
        addRelatedType(type.getBaseType(), componentList, namespace, dependencies);
        expandRelatedAttributeUsesComponents(type.getAttributeUses(), componentList, namespace, dependencies);
        final XSParticle particle = type.getParticle();
        if (particle != null) {
            expandRelatedParticleComponents(particle, componentList, namespace, dependencies);
        }
    }
View Full Code Here

            fElementTraverser.traverseLocal (fParticle[i], currElem, currSchema, currGrammar, fAllContext[i], fParent[i], fLocalElemNamespaceContext[i]);
            // If it's an empty particle, remove it from the containing component.
            if (fParticle[i].fType == XSParticleDecl.PARTICLE_EMPTY) {
                XSModelGroupImpl group = null;
                if (fParent[i] instanceof XSComplexTypeDecl) {
                    XSParticle p = ((XSComplexTypeDecl)fParent[i]).getParticle();
                    if (p != null)
                        group = (XSModelGroupImpl)p.getTerm();
                }
                else {
                    group = ((XSGroupDecl)fParent[i]).fModelGroup;
                }
                if (group != null)
View Full Code Here

            // If the content model of this complex type is element or mixed then we must convert the
            // contained XSParticle into a set of node and/or property defs
        } else if (ctdef.getContentType() == XSComplexTypeDefinition.CONTENTTYPE_ELEMENT ||
                ctdef.getContentType() == XSComplexTypeDefinition.CONTENTTYPE_MIXED) {
            XSParticle p = ctdef.getParticle();

            // particleToDefs takes the two lists and adds to them as necessary. It also returns
            // an orderable indicator based on the top level compositor used within the complex typedef
            // (if there is one).
            orderable = particleToDefs(p, propDefList, nodeDefList);
View Full Code Here

            // We ignore any further nested compositors
            // by ignoring the return value of nested particleToDefs calls.
            XSObjectList list = mg.getParticles();
            for (int i = 0; i < list.getLength(); i++) {
                XSParticle pp = (XSParticle) list.item(i);
                particleToDefs(pp, propDefList, nodeDefList);
            }
        }
        return orderable;
    }
View Full Code Here

      if (wrapper.getAttributeUses().getLength() > 0)
         return false;

      boolean unwrappedElement = false;

      XSParticle particle = wrapper.getParticle();
      if (particle == null)
      {
         return true;
      }
      else
      {
         XSTerm term = particle.getTerm();
         if (term instanceof XSModelGroup)
         {
            unwrappedElement = unwrapGroup(partsMappings, methodMapping, messageName, containingElement, (XSModelGroup)term);
         }
      }
View Full Code Here

         return false;

      XSObjectList particles = group.getParticles();
      for (int i = 0; i < particles.getLength(); i++)
      {
         XSParticle particle = (XSParticle)particles.item(i);
         XSTerm term = particle.getTerm();
         if (term instanceof XSModelGroup)
         {
            if (unwrapGroup(partsMappings, methodMapping, messageName, containingElement, (XSModelGroup)term) == false)
               return false;
         }
         else if (term instanceof XSElementDeclaration)
         {
            XSElementDeclaration element = (XSElementDeclaration)term;
            XSTypeDefinition type = element.getTypeDefinition();

            QName xmlName = new QName(element.getNamespace(), element.getName());
            QName xmlType;
            if (type.getAnonymous())
            {
               String tempName = ToolsUtils.firstLetterUpperCase(containingElement) + ToolsUtils.firstLetterUpperCase(element.getName());
               xmlType = new QName(type.getNamespace(), tempName);
            }
            else
            {
               xmlType = new QName(type.getNamespace(), type.getName());
            }

            boolean array = particle.getMaxOccursUnbounded() || particle.getMaxOccurs() > 1;
            boolean primitive = !(element.getNillable() || (particle.getMinOccurs() == 0 && particle.getMaxOccurs() == 1));

            MethodParamPartsMapping part = getMethodParamPartsMapping(methodMapping, xmlName, xmlType, partsMappings.size(), messageName, "IN", xmlName.getLocalPart(),
                  array, primitive);
            partsMappings.add(part);
         }
View Full Code Here

TOP

Related Classes of org.apache.xerces.xs.XSParticle

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.