Package org.apache.jackrabbit.mk.json

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


            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")));
        return id;
    }
View Full Code Here


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

    @Override
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

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

    @Override
View Full Code Here

            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")));
        return id;
    }
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();
    }

    @Override
    public NodeList createClone(NodeMap map, long revId) {
View Full Code Here

                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;
        }
        return jsop.substring(start);
    }
View Full Code Here

        if (before == null) {
            if (after != null) {
                buff.tag('+').key(path).object();
                toJson(buff, after);
                return buff.endObject().newline().toString();
            } else {
                // path doesn't exist in the specified revisions
                return "";
            }
        } else if (after == null) {
View Full Code Here

                if (p.startsWith(pathFilter)) {
                    addedNodes.put(after, p);
                    buff.tag('+').
                            key(p).object();
                    toJson(buff, after);
                    buff.endObject().newline();
                }
            }

            @Override
            public void childNodeDeleted(String name, NodeState before) {
View Full Code Here

                    String p = PathUtils.concat(getCurrentPath(), name);
                    if (p.startsWith(pathFilter)) {
                        buff.tag('+').
                                key(p).object();
                        toJson(buff, after);
                        buff.endObject().newline();
                    }
                }

                @Override
                public void childNodeDeleted(String name, NodeState before) {
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.