Package org.apache.jackrabbit.mk.json

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


            commitBuff.object()
            .key("id").value(MongoUtil.fromMongoRepresentation(commit.getRevisionId()))
            .key("ts").value(commit.getTimestamp())
            .key("msg").value(commit.getMessage());
            if (commit.getBranchId() != null) {
                commitBuff.key("branchRootId").value(commit.getBranchId().toString());
            }
            commitBuff.key("changes").value(diff).endObject();
        }
        return commitBuff.endArray().toString();
    }
View Full Code Here


            .key("ts").value(commit.getTimestamp())
            .key("msg").value(commit.getMessage());
            if (commit.getBranchId() != null) {
                commitBuff.key("branchRootId").value(commit.getBranchId().toString());
            }
            commitBuff.key("changes").value(diff).endObject();
        }
        return commitBuff.endArray().toString();
    }

    private MongoCommit extractCommit(List<MongoCommit> commits, long revisionId) {
View Full Code Here

                    if (buff.length() > 0) {
                        buff.append(',');
                    }
                    buff.append(e.getValue().length());
                }
                w.key(LENGTHS_KEY).value(buff.toString());
            }
            for (Entry<String, String> e : map.entrySet()) {
                w.key(e.getKey()).encodedValue(e.getValue());
            }
            w.endObject();
View Full Code Here

                    buff.append(e.getValue().length());
                }
                w.key(LENGTHS_KEY).value(buff.toString());
            }
            for (Entry<String, String> e : map.entrySet()) {
                w.key(e.getKey()).encodedValue(e.getValue());
            }
            w.endObject();
            jsop = w.toString();
            start = 0;
        }
View Full Code Here

    @Override
    public String toString() {
        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();
    }
View Full Code Here

    }

    private String getJsop() {
        JsopBuilder jsop = new JsopBuilder();
        jsop.tag('+').key(PathUtils.concat(tree.getName(), INDEX_CONTENT, getPath())).object();
        jsop.key("keys").array();
        for (String k : keys) {
            jsop.value(k);
        }
        jsop.endArray();
        jsop.key("values").array();
View Full Code Here

        jsop.key("keys").array();
        for (String k : keys) {
            jsop.value(k);
        }
        jsop.endArray();
        jsop.key("values").array();
        for (String v : values) {
            jsop.value(v);
        }
        jsop.endArray();
        // could just use child node list, but then
View Full Code Here

        jsop.endArray();
        // could just use child node list, but then
        // new children need to be ordered at the right position,
        // and we would need a way to distinguish empty lists
        // from a leaf
        jsop.key("children").array();
        for (String d : children) {
            jsop.value(d);
        }
        jsop.endArray();
        jsop.endObject();
View Full Code Here

    }

    private String getJsop() {
        JsopBuilder jsop = new JsopBuilder();
        jsop.tag('+').key(PathUtils.concat(tree.getName(), INDEX_CONTENT, getPath())).object();
        jsop.key("keys").array();
        for (String k : keys) {
            jsop.value(k);
        }
        jsop.endArray();
        jsop.key("values").array();
View Full Code Here

        jsop.key("keys").array();
        for (String k : keys) {
            jsop.value(k);
        }
        jsop.endArray();
        jsop.key("values").array();
        for (String v : values) {
            jsop.value(v);
        }
        jsop.endArray();
        jsop.endObject();
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.