Package org.jboss.test.xml.immutable

Examples of org.jboss.test.xml.immutable.Parent


      List child2 = Arrays.asList(new Object[]{new Child2("child2_1"), new Child2("child2_2")});
      List others = Arrays.asList(new Object[]{new Child3("child3_1"), new Child3("child3_2"), new Child3("child3_3")});
      List choice = Arrays.asList(
         new Object[]{new ImmutableChoice("choice1"), new ImmutableChoice(new Child1("child1"))}
      );
      Parent parent = new Parent(child1, child2, others, choice);

      StringWriter writer = new StringWriter();
      marshaller.declareNamespace("imm", "http://www.jboss.org/test/xml/immutable/");
      //marshaller.setProperty(Marshaller.PROP_OUTPUT_INDENTATION, "false");
      marshaller.marshal(xsdUrl.toExternalForm(),
View Full Code Here


      log.debug("testImmutable> started");
      long startTime = System.currentTimeMillis();

      String xsd = getXsd("xml/immutable.xsd");

      Parent parent = newImmutableParent();
      String xml = marshalImmutableParent(xsd, parent);

      StringReader reader = new StringReader(xml);
      Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
      Parent unmarshalled = (Parent)unmarshaller.unmarshal(reader, new MappingObjectModelFactory(), null);
      log.info("unmarhalled:\n" + unmarshalled);

      assertEquals(parent, unmarshalled);

      log.debug("testImmutable> done in " + (System.currentTimeMillis() - startTime));
View Full Code Here

      List child2 = Arrays.asList(new Object[]{new Child2("child2_1"), new Child2("child2_2")});
      List others = Arrays.asList(new Object[]{new Child3("child3_1"), new Child3("child3_2"), new Child3("child3_3")});
      List choice = Arrays.asList(
         new Object[]{new ImmutableChoice("choice1"), new ImmutableChoice(new Child1("child1"))}
      );
      Parent parent = new Parent(child1, child2, others, choice);
      return parent;
   }
View Full Code Here

      log.debug("testImmutable> started");
      long startTime = System.currentTimeMillis();

      String xsd = getXsd("xml/immutable.xsd");

      Parent parent = newImmutableParent();
      String xml = marshalImmutableParent(xsd, parent);

      StringReader reader = new StringReader(xml);
      Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
      Parent unmarshalled = (Parent)unmarshaller.unmarshal(reader, new MappingObjectModelFactory(), null);
      assertEquals(parent, unmarshalled);

      log.debug("testImmutable> done in " + (System.currentTimeMillis() - startTime));
   }
View Full Code Here

      List<Object> child2 = Arrays.asList(new Object[]{new Child2("child2_1"), new Child2("child2_2")});
      List<Object> others = Arrays.asList(new Object[]{new Child3("child3_1"), new Child3("child3_2"), new Child3("child3_3")});
      List<Object> choice = Arrays.asList(
         new Object[]{new ImmutableChoice("choice1"), new ImmutableChoice(new Child1("child1"))}
      );
      Parent parent = new Parent(child1, child2, others, choice);
      return parent;
   }
View Full Code Here

      List<Object> child2 = Arrays.asList(new Object[]{new Child2("child2_1"), new Child2("child2_2")});
      List<Object> others = Arrays.asList(new Object[]{new Child3("child3_1"), new Child3("child3_2"), new Child3("child3_3")});
      List<Object> choice = Arrays.asList(
         new Object[]{new ImmutableChoice("choice1"), new ImmutableChoice(new Child1("child1"))}
      );
      Parent parent = new Parent(child1, child2, others, choice);

      StringWriter writer = new StringWriter();
      marshaller.declareNamespace("imm", "http://www.jboss.org/test/xml/immutable/");
      //marshaller.setProperty(Marshaller.PROP_OUTPUT_INDENTATION, "false");
      marshaller.marshal(xsdUrl.toExternalForm(),
View Full Code Here

TOP

Related Classes of org.jboss.test.xml.immutable.Parent

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.