Examples of InMemoryNodeModel


Examples of org.apache.commons.configuration2.tree.InMemoryNodeModel

     * @return the node model for the clone
     */
    @Override
    protected NodeModel<ImmutableNode> cloneNodeModel()
    {
        InMemoryNodeModel parentModel =
                (InMemoryNodeModel) getParent().getModel();
        parentModel.trackNode(getRootSelector(), getParent());
        return new TrackedNodeModel(getParent(), getRootSelector(), true);
    }
View Full Code Here

Examples of org.apache.commons.configuration2.tree.InMemoryNodeModel

    @BeforeClass
    public static void setUpBeforeClass() throws Exception
    {
        root = new ImmutableNode.Builder().name(ROOT_NAME).create();
        handler = new InMemoryNodeModel(root).getNodeHandler();
    }
View Full Code Here

Examples of org.apache.commons.configuration2.tree.InMemoryNodeModel

        ImmutableNode c2 =
                new ImmutableNode.Builder().name("child_other").create();
        parentBuilder.addChildren(Arrays.asList(c2, c1));
        ImmutableNode parent = parentBuilder.create();
        NodeHandler<ImmutableNode> testHandler =
                new InMemoryNodeModel(parent).getNodeHandler();
        XPathExpressionEngine engine = new XPathExpressionEngine();
        assertEquals("Wrong canonical key", "parent/child[1]",
                engine.canonicalKey(c1, "parent", testHandler));
    }
View Full Code Here

Examples of org.apache.commons.configuration2.tree.InMemoryNodeModel

        ImmutableNode c3 =
                new ImmutableNode.Builder().name("child_other").create();
        parentBuilder.addChildren(Arrays.asList(c1, c2, c3));
        ImmutableNode parent = parentBuilder.create();
        NodeHandler<ImmutableNode> testHandler =
                new InMemoryNodeModel(parent).getNodeHandler();
        XPathExpressionEngine engine = new XPathExpressionEngine();
        assertEquals("Wrong key 1", "parent/child[1]",
                engine.canonicalKey(c1, "parent", testHandler));
        assertEquals("Wrong key 2", "parent/child[2]",
                engine.canonicalKey(c2, "parent", testHandler));
View Full Code Here

Examples of org.apache.commons.configuration2.tree.InMemoryNodeModel

    {
        ImmutableNode.Builder parentBuilder = new ImmutableNode.Builder(1);
        ImmutableNode c1 = new ImmutableNode.Builder().name("child").create();
        ImmutableNode parent = parentBuilder.addChild(c1).create();
        NodeHandler<ImmutableNode> testHandler =
                new InMemoryNodeModel(parent).getNodeHandler();
        XPathExpressionEngine engine = new XPathExpressionEngine();
        assertEquals("Wrong key", "child[1]",
                engine.canonicalKey(c1, null, testHandler));
    }
View Full Code Here

Examples of org.apache.commons.configuration2.tree.InMemoryNodeModel

    public void testCreateContext()
    {
        ImmutableNode node =
                new ImmutableNode.Builder().name("testRoot").create();
        NodeHandler<ImmutableNode> handler =
                new InMemoryNodeModel(node).getNodeHandler();
        JXPathContext context = factory.createContext(node, handler);

        assertTrue("No lenient mode", context.isLenient());
        ConfigurationNodePointerFactory.NodeWrapper<?> wrapper =
                (ConfigurationNodePointerFactory.NodeWrapper<?>) context
View Full Code Here

Examples of org.apache.commons.configuration2.tree.InMemoryNodeModel

        ImmutableNode.Builder ndBuilder = new ImmutableNode.Builder();
        ndBuilder.name("parent").addAttribute(ATTR_NAME, ATTR_VALUE);
        ImmutableNode nd = ndBuilder.create();
        parent =
                new ConfigurationNodePointer<ImmutableNode>(nd, Locale.ENGLISH,
                        new InMemoryNodeModel(nd).getNodeHandler());
        pointer =
                new ConfigurationAttributePointer<ImmutableNode>(parent,
                        ATTR_NAME);
    }
View Full Code Here

Examples of org.apache.commons.configuration2.tree.InMemoryNodeModel

    @Before
    public void setUp() throws Exception
    {
        root = constructHierarchy(LEVEL_COUNT);
        handler = new InMemoryNodeModel(root).getNodeHandler();
    }
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.