Package org.jboss.xb.binding.sunday.unmarshalling

Examples of org.jboss.xb.binding.sunday.unmarshalling.AllBinding


      ParticleBinding particle = typeBinding.getParticle();
      assertNotNull(particle);
      TermBinding term = particle.getTerm();
      assertNotNull(term);
      assertTrue(term instanceof AllBinding);
      AllBinding all = (AllBinding) term;
      Set<QName> elements = new HashSet<QName>();
      Collection<ParticleBinding> particles = all.getParticles();
      for (ParticleBinding p : particles)
      {
         term = p.getTerm();
         assertTrue(term instanceof ElementBinding);
         elements.add(((ElementBinding) term).getQName());
View Full Code Here


      ModelGroupBinding model = null;
      if (allBinding)
      {
         if (trace)
            log.trace("AllBinding for type=" + beanInfo.getName());
         model = new AllBinding(schemaBinding);
      }
      else
      {
         if (trace)
            log.trace("SequenceBinding for type=" + beanInfo.getName());
View Full Code Here

               {
                  propertyGroup = new ChoiceBinding(schemaBinding);
               }
               else if (xmlModelGroup.kind().equals(JBossXmlConstants.MODEL_GROUP_ALL))
               {
                  propertyGroup = new AllBinding(schemaBinding);
               }
               else
               {
                  throw new IllegalStateException("Unexpected JBossXmlModelGroup.kind=" + xmlModelGroup.kind());
               }
View Full Code Here

/*  950 */     ModelGroupBinding model = null;
/*  951 */     if (allBinding)
/*      */     {
/*  953 */       if (this.trace)
/*  954 */         log.trace("AllBinding for type=" + beanInfo.getName());
/*  955 */       model = new AllBinding(this.schemaBinding);
/*      */     }
/*      */     else
/*      */     {
/*  959 */       if (this.trace)
/*  960 */         log.trace("SequenceBinding for type=" + beanInfo.getName());
View Full Code Here

/*      */           {
/* 1267 */             propertyGroup = new ChoiceBinding(this.schemaBinding);
/*      */           }
/* 1269 */           else if (xmlModelGroup.kind().equals("all"))
/*      */           {
/* 1271 */             propertyGroup = new AllBinding(this.schemaBinding);
/*      */           }
/*      */           else
/*      */           {
/* 1275 */             throw new IllegalStateException("Unexpected JBossXmlModelGroup.kind=" + xmlModelGroup.kind());
/*      */           }
View Full Code Here

      ModelGroupBinding model = null;
      boolean propOrderMissing = propertyNames.size() > 1 && determinePropertyOrder && accessOrder == XmlAccessOrder.UNDEFINED;
      if(jbossXmlType != null && !JBossXmlConstants.DEFAULT.equals(jbossXmlType.modelGroup()))
         model = createModelGroup(jbossXmlType.modelGroup(), typeInfo, propOrderMissing, propertyOrder);
      else if (allBinding)
         model = new AllBinding(schemaBinding);
      else
      {
         if(propOrderMissing)
            assertPropOrderNotRequired(typeInfo, propertyOrder);
         model = groupFactory.createSequence(schemaBinding);
View Full Code Here

      else if (kind.equals(JBossXmlConstants.MODEL_GROUP_UNORDERED_SEQUENCE))
         group = new UnorderedSequenceBinding(schemaBinding);
      else if (kind.equals(JBossXmlConstants.MODEL_GROUP_CHOICE))
         group = new ChoiceBinding(schemaBinding);
      else if (kind.equals(JBossXmlConstants.MODEL_GROUP_ALL))
         group = new AllBinding(schemaBinding);
      else
         throw new IllegalStateException("Unexpected JBossXmlModelGroup.kind=" + kind + " for type " + type.getName());
      return group;
   }
View Full Code Here

      setStrictSchema(true);

      // The bootstrap type
      TypeBinding bootstrapType = new TypeBinding(new QName(NAMESPACE, "bootstrapType"));
      bootstrapType.setSimple(false);
      AllBinding bootstrapModel = new AllBinding(this);
      ParticleBinding bootstrapParticle = new ParticleBinding(bootstrapModel, 1, 1, false);
      bootstrapType.setParticle(bootstrapParticle);
      ClassMetaData bootstrapClassMetaData = new ClassMetaData();
      bootstrapClassMetaData.setImpl(BootstrapMetaData.class.getName());
      bootstrapType.setClassMetaData(bootstrapClassMetaData);

      // Bootstrap can take some urls
      ElementBinding urlElement = new ElementBinding(this, new QName(NAMESPACE, "url"), stringType);
      ParticleBinding urlParticle = new ParticleBinding(urlElement, 0, 1, true);
      bootstrapModel.addParticle(urlParticle);
      bootstrapType.pushInterceptor(urlElement.getQName(), new DefaultElementInterceptor()
      {
         public void add(Object parent, Object child, QName name)
         {
            BootstrapMetaData bootstrap = (BootstrapMetaData) parent;
View Full Code Here

TOP

Related Classes of org.jboss.xb.binding.sunday.unmarshalling.AllBinding

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.