Package org.apache.jackrabbit.mk.json

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


                    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


    void writeCreate() {
        verify();
        tree.modified(this);
        JsopBuilder jsop = new JsopBuilder();
        jsop.tag('+').key(PathUtils.concat(tree.getName(), 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

    void writeCreate() {
        verify();
        tree.modified(this);
        JsopBuilder jsop = new JsopBuilder();
        jsop.tag('+').key(PathUtils.concat(tree.getName(), 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

        }
        json.object();
        String[] pv = propertyValuePairs;
        if (pv != null) {
            for (int i = 0, size = pv.length; i < size; i += 2) {
                json.key(pv[i]).encodedValue(pv[i + 1]);
            }
        }
        if (map.getHash() && id != null) {
            byte[] hash = getHash();
            json.key(HASH).value(StringUtils.convertBytesToHex(hash));
View Full Code Here

                json.key(pv[i]).encodedValue(pv[i + 1]);
            }
        }
        if (map.getHash() && id != null) {
            byte[] hash = getHash();
            json.key(HASH).value(StringUtils.convertBytesToHex(hash));
        }
        if (childNodes != null && childNodes.size() > 0) {
            if (map.getDescendantCount()) {
                if (descendantCount > childNodes.size()) {
                    json.key(DESCENDANT_COUNT).value(descendantCount);
View Full Code Here

            json.key(HASH).value(StringUtils.convertBytesToHex(hash));
        }
        if (childNodes != null && childNodes.size() > 0) {
            if (map.getDescendantCount()) {
                if (descendantCount > childNodes.size()) {
                    json.key(DESCENDANT_COUNT).value(descendantCount);
                }
            }
            childNodes.append(json, map);
        }
        json.endObject();
View Full Code Here

        for (String f : list) {
            FileInputStream in = new FileInputStream(f);
            String id = store.writeBlob(in);
            in.close();
            String name = f.substring(parent.length());
            listing.key(name).value(id);
            listing.newline();
        }
        listing.endObject();
        String l = listing.toString();
        String id = store.writeBlob(new ByteArrayInputStream(l.getBytes("UTF-8")));
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.