Package org.apache.jackrabbit.oak.api

Examples of org.apache.jackrabbit.oak.api.Tree.addChild()


        t.addChild("b").setProperty("pid", "bar");
        t.addChild("c").setProperty("pid", "foo");
        t.addChild("d").setProperty("cid", "foo");

        Tree content = t.addChild("content");
        content.addChild("x").setProperty("pid", "foo");
        content.addChild("y").setProperty("pid", "baz");
        content.addChild("z").setProperty("pid", "bar");
        root.commit();

        setTravesalFallback(false);
View Full Code Here


        t.addChild("c").setProperty("pid", "foo");
        t.addChild("d").setProperty("cid", "foo");

        Tree content = t.addChild("content");
        content.addChild("x").setProperty("pid", "foo");
        content.addChild("y").setProperty("pid", "baz");
        content.addChild("z").setProperty("pid", "bar");
        root.commit();

        setTravesalFallback(false);
        assertQuery("select [jcr:path] from [nt:base] where [cid] = 'foo'",
View Full Code Here

        t.addChild("d").setProperty("cid", "foo");

        Tree content = t.addChild("content");
        content.addChild("x").setProperty("pid", "foo");
        content.addChild("y").setProperty("pid", "baz");
        content.addChild("z").setProperty("pid", "bar");
        root.commit();

        setTravesalFallback(false);
        assertQuery("select [jcr:path] from [nt:base] where [cid] = 'foo'",
                new ArrayList<String>());
View Full Code Here

     * Test for OAK-841
     */
    @Test
    public void emptyStringValue() throws CommitFailedException {
        Tree t = root.getTree("/");
        t.addChild("node-1").setProperty("pid", "value");
        root.commit();

        t = root.getTree("/");
        t.addChild("node-2").setProperty("pid", "");
        root.commit();
View Full Code Here

        Tree t = root.getTree("/");
        t.addChild("node-1").setProperty("pid", "value");
        root.commit();

        t = root.getTree("/");
        t.addChild("node-2").setProperty("pid", "");
        root.commit();

        t = root.getTree("/");
        t.addChild("node-3").setProperty("pid", ":");
        root.commit();
View Full Code Here

        t = root.getTree("/");
        t.addChild("node-2").setProperty("pid", "");
        root.commit();

        t = root.getTree("/");
        t.addChild("node-3").setProperty("pid", ":");
        root.commit();

        setTravesalFallback(false);
        assertQuery("select [jcr:path] from [nt:base] where [pid] = 'value'",
                ImmutableList.of("/node-1"));
View Full Code Here

    }

    @Test
    public void testFullTextTermName() throws Exception {
        Tree c = root.getTree("/").addChild("content");
        c.addChild("testFullTextTermNameSimple");
        c.addChild("testFullTextTermNameFile.txt");
        root.commit();
        assertQuery("//*[jcr:contains(., 'testFullTextTermNameSimple')]",
                "xpath",
                ImmutableList.of("/content/testFullTextTermNameSimple"));
View Full Code Here

    @Test
    public void testFullTextTermName() throws Exception {
        Tree c = root.getTree("/").addChild("content");
        c.addChild("testFullTextTermNameSimple");
        c.addChild("testFullTextTermNameFile.txt");
        root.commit();
        assertQuery("//*[jcr:contains(., 'testFullTextTermNameSimple')]",
                "xpath",
                ImmutableList.of("/content/testFullTextTermNameSimple"));
        assertQuery("//*[jcr:contains(., 'testFullTextTermNameFile.txt')]",
View Full Code Here

    @Test
    public void testMultiNotEqual() throws Exception {
        Tree c = root.getTree("/").addChild("content");

        c.addChild("one").setProperty("prop", "value");
        c.addChild("two").setProperty("prop",
                ImmutableList.of("aaa", "value", "bbb"), Type.STRINGS);
        c.addChild("three").setProperty("prop",
                ImmutableList.of("aaa", "bbb", "ccc"), Type.STRINGS);
        root.commit();
View Full Code Here

    @Test
    public void testMultiNotEqual() throws Exception {
        Tree c = root.getTree("/").addChild("content");

        c.addChild("one").setProperty("prop", "value");
        c.addChild("two").setProperty("prop",
                ImmutableList.of("aaa", "value", "bbb"), Type.STRINGS);
        c.addChild("three").setProperty("prop",
                ImmutableList.of("aaa", "bbb", "ccc"), Type.STRINGS);
        root.commit();
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.