Examples of XSTerm


Examples of org.apache.xerces.xs.XSTerm

   {
      XSObjectList xo = xm.getParticles();
      int len = xo != null ? xo.getLength() : 0;
      for (int i = 0; i < len; i++)
      {
         XSTerm xsterm = ((XSParticle)xo.item(i)).getTerm();
         if (xsterm instanceof XSModelGroup)
         {
            addGroup((XSModelGroup)xsterm, containingElement, containingType, jwm);
         }
         else if (xsterm instanceof XSElementDeclaration)
View Full Code Here

Examples of org.apache.xerces.xs.XSTerm

      {
         unwrappedElement = true;
      }
      else
      {
         XSTerm term = particle.getTerm();
         if (term instanceof XSModelGroup)
         {
            unwrappedElement = unwrapGroup(tempBuf, containingElement, (XSModelGroup)term);
         }
      }
View Full Code Here

Examples of org.apache.xerces.xs.XSTerm

      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(buf, containingElement, (XSModelGroup)term) == false)
               return false;
         }
View Full Code Here

Examples of org.apache.xerces.xs.XSTerm

      XSParticle xsp = xc.getParticle();
      if (xsp == null)
         return null;

      XSTerm xsterm = xsp.getTerm();
      if (xsterm instanceof XSModelGroup == false)
         return null;

      XSModelGroup xm = (XSModelGroup)xsterm;
      XSObjectList xo = xm.getParticles();
      if (xo.getLength() != 1)
         return null;

      XSParticle xp = (XSParticle)xo.item(0);
      XSTerm term = xp.getTerm();
      if ((xp.getMaxOccursUnbounded() || xp.getMaxOccurs() > 1) == false || term instanceof XSElementDeclaration == false)
         return null;

      return (XSElementDeclaration)term;
   }
View Full Code Here

Examples of org.apache.xerces.xs.XSTerm

      private void analyzeParticle(XSParticle particle, String parentName, String namespace)
      {
         // Is this right, can a particle be null?
         if (particle == null)
            return;
         XSTerm term = particle.getTerm();

         // Is this right, can a term be null?
         if (term == null)
            return;
         switch (term.getType())
         {
            case XSConstants.MODEL_GROUP:
               XSModelGroup group = (XSModelGroup)term;
               XSObjectList list = group.getParticles();
               for (int i = 0; i < list.getLength(); i++)
View Full Code Here

Examples of org.apache.xerces.xs.XSTerm

   {
      Map<String, XSParticle> index = new LinkedHashMap<String, XSParticle>();
      List<XSParticle> newList = new ArrayList<XSParticle>();
      for (XSParticle particle : particles)
      {
         XSTerm term = particle.getTerm();
         if (term instanceof XSElementDeclaration)
            index.put(((XSElementDeclaration)term).getName(), particle);
         else newList.add(particle);
      }
View Full Code Here

Examples of org.apache.xerces.xs.XSTerm

   private void addVariableMappings(Class javaType, JavaXmlTypeMapping javaXmlTypeMapping, List<XSParticle> particles, Map<String, String> reversedNames)
   {
      for (XSParticle particle : particles)
      {
         XSTerm term = particle.getTerm();
         if (term.getType() == XSConstants.MODEL_GROUP)
         {
            XSModelGroup group = (XSModelGroup)term;
            XSObjectList list = group.getParticles();
            ArrayList<XSParticle> baseParticles = new ArrayList<XSParticle>();
            for (int i = 0; i < list.getLength(); i++)
               baseParticles.add((XSParticle)list.item(i));

            addVariableMappings(javaType, javaXmlTypeMapping, baseParticles, null);

            continue;
         }

         String name = term.getName();
         String variableName = name;
         if (reversedNames != null && reversedNames.get(name) != null)
            variableName = reversedNames.get(name);

         VariableMapping mapping = new VariableMapping(javaXmlTypeMapping);
View Full Code Here

Examples of org.apache.xerces.xs.XSTerm

         XSTypeDefinition btype = baseType.getBaseType();
         if (btype != null)
            addBaseTypeParts(btype, xsparts); //Recurse
         //Just add the particles from this basetype as a ModelGroup sequence
         XSParticle part = ((XSComplexTypeDefinition)baseType).getParticle();
         XSTerm term = part.getTerm();
         if (term instanceof XSModelGroup)
         {
            JBossXSParticle p = new JBossXSParticle();
            p.setTerm(term);
            xsparts.add(p);
View Full Code Here

Examples of org.apache.xerces.xs.XSTerm

         particles.add(getXSParticle(name, type, targetNS));
         return;
      }

      XSParticle particle = particles.get(0);
      XSTerm term = particle.getTerm();
      if (term.getType() == XSConstants.MODEL_GROUP)
      {
         JBossXSModelGroup group = (JBossXSModelGroup)term;
         XSObjectList list = group.getParticles();
         ArrayList<XSParticle> baseParticles = new ArrayList<XSParticle>();
         for (int i = 0; i < list.getLength(); i++)
View Full Code Here

Examples of org.apache.xerces.xs.XSTerm

   private void handleContentTypeElementsWithDerivationRestriction(XSComplexTypeDefinition type, XSModel schema, List vars, XSParticle xsparticle) throws IOException
   {
      if (xsparticle != null)
      {
         XSTerm xsterm = xsparticle.getTerm();
         if (xsterm instanceof XSModelGroup)
         {
            XSModelGroup xsm = (XSModelGroup)xsterm;
            XSObjectList xparts = xsm.getParticles();
            //Ignore the first item - that will be a modelgroup for basetype
            XSParticle xspar = (XSParticle)xparts.item(1);
            XSTerm xterm = xspar.getTerm();
            if (xterm instanceof XSElementDeclaration)
            {
               vars.addAll(createVARforXSElementDeclaration(xterm, schemautils.isArrayType(xspar), schema, type));
            }
            else if (xterm instanceof XSModelGroup)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.