Package org.apache.jackrabbit.mk.json

Examples of org.apache.jackrabbit.mk.json.JsopBuilder.endObject()


                }
                json.object();
                json.key("id").value(rev.id);
                json.key("ts").value(rev.timestamp);
                json.key("msg").value(rev.message);
                json.endObject();
            }
        }
        json.endArray();
        return json.toString();
    }
View Full Code Here


                json.object();
                json.key("id").value(rev.id);
                json.key("ts").value(rev.timestamp);
                json.key("msg").value(rev.message);
                json.key("changes").value(jsop);
                json.endObject();
            }
        }
        json.endArray();
        return json.toString();
    }
View Full Code Here

            if (node1 == null) {
                if (node2 != null) {
                    buff.tag('+').key(path).object();
                    toJson(buff, node2, Integer.MAX_VALUE, 0, -1, false);
                    return buff.endObject().newline().toString();
                } else {
                    throw new MicroKernelException("path doesn't exist in the specified revisions: " + path);
                }
            } else if (node2 == null) {
                buff.tag('-');
View Full Code Here

                public void childNodeAdded(String name, NodeState after) {
                    addedNodes.put(rp.getId(after), PathUtils.concat(getCurrentPath(), name));
                    buff.tag('+').
                            key(PathUtils.concat(getCurrentPath(), name)).object();
                    toJson(buff, after, Integer.MAX_VALUE, 0, -1, false);
                    buff.endObject().newline();
                }

                @Override
                public void childNodeDeleted(String name, NodeState before) {
                    removedNodes.put(rp.getId(before), PathUtils.concat(getCurrentPath(), name));
View Full Code Here

                            return;
                        }
                        buff.tag('+').
                                key(PathUtils.concat(getCurrentPath(), name)).object();
                        toJson(buff, after, Integer.MAX_VALUE, 0, -1, false);
                        buff.endObject().newline();
                    }

                    @Override
                    public void childNodeDeleted(String name, NodeState before) {
                        if (addedNodes.containsKey(rp.getId(before))) {
View Full Code Here

        // TODO extract and evaluate filter criteria (such as e.g. ':hash') specified in 'filter' parameter

        try {
            JsopBuilder buf = new JsopBuilder().object();
            toJson(buf, rep.getNodeState(revisionId, path), depth, (int) offset, count, true);
            return buf.endObject().toString();
        } catch (Exception e) {
            throw new MicroKernelException(e);
        }
    }
View Full Code Here

                    json.key(DESCENDANT_COUNT).value(descendantCount);
                }
            }
            childNodes.append(json, map);
        }
        json.endObject();
        if (!inline) {
            json.tag(';');
        }
        return json.toString();
    }
View Full Code Here

        JsopWriter json = new JsopBuilder();
        json.object();
        for (int i = 0; i < size; i++) {
            json.key(names[i]).value(children[i].toString());
        }
        json.endObject();
        return json.toString();
    }

    public NodeList createClone(NodeMap map, long revId) {
        NodeList result = new NodeListSmall(names, children, sort, size);
View Full Code Here

        jsop.key("children").array();
        for (String d : children) {
            jsop.value(d);
        }
        jsop.endArray();
        jsop.endObject();
        jsop.newline();
        tree.buffer(jsop.toString());
    }

    void delete(int pos) {
View Full Code Here

        jsop.key("values").array();
        for (String v : values) {
            jsop.value(v);
        }
        jsop.endArray();
        jsop.endObject();
        jsop.newline();
        tree.buffer(jsop.toString());
    }

}
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.