- CompositeNodeWrapper data = new CompositeNodeWrapper(new URI("urn:ietf:params:xml:ns:netconf:base:1.0"), "data");
-
- URI uriModule1 = new URI("module:one");
- CompositeNodeWrapper cont_m1 = new CompositeNodeWrapper(uriModule1, "cont_m1");
- SimpleNodeWrapper lf1_m1 = new SimpleNodeWrapper(uriModule1, "lf1_m1", "lf1 m1 value");
- cont_m1.addValue(lf1_m1);
- CompositeNodeWrapper contB_m1 = new CompositeNodeWrapper(uriModule1, "contB_m1");
-
- data.addValue(contB_m1);
- data.addValue(cont_m1);
-
- URI uriModule2 = new URI("module:two");
- CompositeNodeWrapper cont_m2 = new CompositeNodeWrapper(uriModule2, "cont_m2");
- SimpleNodeWrapper lf1_m2 = new SimpleNodeWrapper(uriModule2, "lf1_m2", "lf1 m2 value");
- cont_m2.addValue(lf1_m2);
- CompositeNodeWrapper contB_m2 = new CompositeNodeWrapper(uriModule2, "contB_m2");
- data.addValue(contB_m2);
- data.addValue(cont_m2);
+ String uri1 = "module:one";
+ String rev1 = "2014-01-17";
+
+ MutableCompositeNode data = NodeFactory.createMutableCompositeNode(
+ TestUtils.buildQName("data", "urn:ietf:params:xml:ns:netconf:base:1.0", "2000-01-01"), null, null,
+ null, null);
+
+ MutableCompositeNode cont_m1 = NodeFactory.createMutableCompositeNode(
+ TestUtils.buildQName("cont_m1", uri1, rev1), data, null, null, null);
+ data.getValue().add(cont_m1);
+
+ MutableSimpleNode<?> lf1_m1 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1_m1", uri1, rev1),
+ cont_m1, "lf1 m1 value", null, null);
+ cont_m1.getValue().add(lf1_m1);
+ cont_m1.init();
+
+ MutableCompositeNode contB_m1 = NodeFactory.createMutableCompositeNode(
+ TestUtils.buildQName("contB_m1", uri1, rev1), data, null, null, null);
+ data.getValue().add(contB_m1);
+ contB_m1.init();
+
+ String uri2 = "module:two";
+ String rev2 = "2014-01-17";
+ MutableCompositeNode cont_m2 = NodeFactory.createMutableCompositeNode(
+ TestUtils.buildQName("cont_m2", uri2, rev2), data, null, null, null);
+ data.getValue().add(cont_m2);
+
+ MutableSimpleNode<?> lf1_m2 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1_m2", uri2, rev2),
+ cont_m1, "lf1 m2 value", null, null);
+ cont_m2.getValue().add(lf1_m2);
+ cont_m2.init();
+
+ MutableCompositeNode contB_m2 = NodeFactory.createMutableCompositeNode(
+ TestUtils.buildQName("contB_m2", uri2, rev2), data, null, null, null);
+ data.getValue().add(contB_m2);
+ contB_m2.init();
+
+ data.init();