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

Examples of org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding.addElement()


            if(type == null)
            {
               fail("Type " + typeName + " not found in the schema!");
            }
           
            schema.addElement(rootQName, type);
           
            return schema;
         }

         public LSInput resolveAsLSInput(String nsUri, String baseUri, String schemaLocation)
View Full Code Here


      schema.setIgnoreUnresolvedFieldOrClass(false);
      String ns = "http://www.jboss.org/test/xml/collections";
      QName rootQName = new QName(ns, "collections");
      TypeBinding type = schema.getType(rootQName);
      assertNotNull(type);
      schema.addElement(rootQName, type);

      Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
      Collections collections;
      collections = (Collections)unmarshaller.unmarshal(xmlReader, schema);
      assertEquals(Collections.getInstance(), collections);
View Full Code Here

         }
      }
      );

      SchemaBinding cursor = new SchemaBinding();
      cursor.addElement(new QName("config"), configType);

      Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
      Object config = unmarshaller.unmarshal(getXmlUrl("xml/newmetadata.xml"), cursor);

      //log.debug("unmarshalled: " + config);
View Full Code Here

      entryParticle.setMinOccurs(0);
      entryParticle.setMaxOccursUnbounded(true);
      mapType.addParticle(entryParticle);

      mapType.addElement(QNAME_SUBMAP, mapType, 0, true);
      schema.addElement(QNAME_MAP, mapType);

      // Handler implementations
      mapType.setHandler(new DefaultElementHandler()
      {
         public Object startElement(Object parent, QName name, ElementBinding element)
View Full Code Here

      schema.setIgnoreUnresolvedFieldOrClass(false);
      String ns = "http://www.jboss.org/test/xml/collections";
      QName rootQName = new QName(ns, "collections");
      TypeBinding type = schema.getType(rootQName);
      assertNotNull(type);
      schema.addElement(rootQName, type);

      Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
      Collections collections;
      collections = (Collections)unmarshaller.unmarshal(xmlReader, schema);
      assertEquals(Collections.getInstance(), collections);
View Full Code Here

            {
               String xsd = getFullPath("xml/collections.xsd");
               schema = XsdBinder.bind(xsd);
               QName rootQName = new QName(ns, "collections");
               TypeBinding type = schema.getType(rootQName);
               schema.addElement(rootQName, type);
            }
            return schema;
         }

         public LSInput resolveAsLSInput(String nsUri, String baseUri, String schemaLocation)
View Full Code Here

      entryParticle.setMinOccurs(0);
      entryParticle.setMaxOccursUnbounded(true);
      mapType.addParticle(entryParticle);

      mapType.addElement(QNAME_SUBMAP, mapType, 0, true);
      schema.addElement(QNAME_MAP, mapType);

      // Handler implementations
      mapType.setHandler(new DefaultElementHandler()
      {
         public Object startElement(Object parent, QName name, ElementBinding element)
View Full Code Here

         }
      }
      );

      SchemaBinding cursor = new SchemaBinding();
      cursor.addElement(new QName("config"), configType);

      Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
      Object config = unmarshaller.unmarshal(getXmlUrl("xml/newmetadata.xml"), cursor);

      //log.debug("unmarshalled: " + config);
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.