Package org.apache.jackrabbit.mk.json.fast

Examples of org.apache.jackrabbit.mk.json.fast.JsopObject


            c.create();
            head = mk.getHeadRevision();
            String json = JsopBuilder.prettyPrint(mk.getNodes("/test" + i, head, Integer.MAX_VALUE, 0, -1, null));
            NodeImpl n = NodeImpl.parse(json);
            long count = count(n);
            JsopObject o = (JsopObject) Jsop.parse(json);
            Object d = o.get(NodeImpl.DESCENDANT_COUNT);
            if (d != null) {
                long descendants = Long.parseLong(d.toString());
                if (count != descendants) {
                    assertEquals(json, count, descendants + 1);
                }
                d = o.get(NodeImpl.DESCENDANT_INLINE_COUNT);
                long inline = Long.parseLong(d.toString());
                if (inline <= 0) {
                    // at least 1
                    assertEquals(json, 1, inline);
                }
View Full Code Here


            assertEquals(i, Integer.parseInt(node.getProperty("id")));
            String journal = mk.getJournal(last, rev, null);
            JsopArray array = (JsopArray) Jsop.parse(journal);
            assertEquals(last + ".." + rev + ": " + journal,
                    2, array.size());
            JsopObject obj = (JsopObject) array.get(0);
            assertEquals("\"" + (i - 1) + "\"", obj.get("msg"));
            obj = (JsopObject) array.get(1);
            assertEquals("\"" + i + "\"", obj.get("msg"));
            last = rev;
            i++;
        }
    }
View Full Code Here

            assertEquals(i, Integer.parseInt(node.getProperty("id")));
            String journal = mk.getJournal(last, rev, null);
            JsopArray array = (JsopArray) Jsop.parse(journal);
            assertEquals(last + ".." + rev + ": " + journal,
                    2, array.size());
            JsopObject obj = (JsopObject) array.get(0);
            assertEquals("\"" + (i - 1) + "\"", obj.get("msg"));
            obj = (JsopObject) array.get(1);
            assertEquals("\"" + i + "\"", obj.get("msg"));
            last = rev;
            i++;
        }
    }
View Full Code Here

            c.create();
            head = mk.getHeadRevision();
            String json = JsopBuilder.prettyPrint(mk.getNodes("/test" + i, head, Integer.MAX_VALUE, 0, -1, null));
            NodeImpl n = NodeImpl.parse(json);
            long count = count(n);
            JsopObject o = (JsopObject) Jsop.parse(json);
            Object d = o.get(NodeImpl.DESCENDANT_COUNT);
            if (d != null) {
                long descendants = Long.parseLong(d.toString());
                if (count != descendants) {
                    assertEquals(json, count, descendants + 1);
                }
                d = o.get(NodeImpl.DESCENDANT_INLINE_COUNT);
                long inline = Long.parseLong(d.toString());
                if (inline <= 0) {
                    // at least 1
                    assertEquals(json, 1, inline);
                }
View Full Code Here

            c.create();
            head = mk.getHeadRevision();
            String json = JsopBuilder.prettyPrint(mk.getNodes("/test" + i, head, Integer.MAX_VALUE, 0, -1, null));
            NodeImpl n = NodeImpl.parse(json);
            long count = count(n);
            JsopObject o = (JsopObject) Jsop.parse(json);
            Object d = o.get(NodeImpl.DESCENDANT_COUNT);
            if (d != null) {
                long descendants = Long.parseLong(d.toString());
                if (count != descendants) {
                    assertEquals(json, count, descendants + 1);
                }
                d = o.get(NodeImpl.DESCENDANT_INLINE_COUNT);
                long inline = Long.parseLong(d.toString());
                if (inline <= 0) {
                    // at least 1
                    assertEquals(json, 1, inline);
                }
View Full Code Here

            assertEquals(i, Integer.parseInt(node.getProperty("id")));
            String journal = mk.getJournal(last, rev, null);
            JsopArray array = (JsopArray) Jsop.parse(journal);
            assertEquals(last + ".." + rev + ": " + journal,
                    2, array.size());
            JsopObject obj = (JsopObject) array.get(0);
            assertEquals("\"" + (i - 1) + "\"", obj.get("msg"));
            obj = (JsopObject) array.get(1);
            assertEquals("\"" + i + "\"", obj.get("msg"));
            last = rev;
            i++;
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.mk.json.fast.JsopObject

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.