Examples of tag()


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

            return "";
        }

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

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

            } else {
                // path doesn't exist in the specified revisions
                return "";
            }
        } else if (after == null) {
            buff.tag('-');
            buff.value(path);
            return buff.newline().toString();
        }

        TraversingNodeDiffHandler diffHandler = new TraversingNodeDiffHandler(rp) {
View Full Code Here

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

            int levels = depth < 0 ? Integer.MAX_VALUE : depth;
            @Override
            public void propAdded(String propName, String value) {
                String p = PathUtils.concat(getCurrentPath(), propName);
                if (p.startsWith(pathFilter)) {
                    buff.tag('^').
                            key(p).
                            encodedValue(value).
                            newline();
                }
            }
View Full Code Here

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

            @Override
            public void propChanged(String propName, String oldValue, String newValue) {
                String p = PathUtils.concat(getCurrentPath(), propName);
                if (p.startsWith(pathFilter)) {
                    buff.tag('^').
                            key(p).
                            encodedValue(newValue).
                            newline();
                }
            }
View Full Code Here

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

                String p = PathUtils.concat(getCurrentPath(), propName);
                if (p.startsWith(pathFilter)) {
                    // since property and node deletions can't be distinguished
                    // using the "- <path>" notation we're representing
                    // property deletions as "^ <path>:null"
                    buff.tag('^').
                            key(p).
                            value(null).
                            newline();
                }
            }
View Full Code Here

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

                        // move detected
                        String removedPath = removedPaths.remove(0);
                        if (removedPaths.isEmpty()) {
                            removedNodes.remove(added.getId());
                        }
                        buff.tag('>').
                                // path/to/deleted/node
                                key(removedPath).
                                // path/to/added/node
                                value(p).
                                newline();
View Full Code Here

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

                        // move detected
                        String addedPath = addedPaths.remove(0);
                        if (addedPaths.isEmpty()) {
                            addedNodes.remove(deleted.getId());
                        }
                        buff.tag('>').
                                // path/to/deleted/node
                                key(p).
                                // path/to/added/node
                                value(addedPath).
                                newline();
View Full Code Here

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

                    --levels;
                    if (levels >= 0) {
                        // recurse
                        super.childNodeChanged(changed, newId);
                    } else {
                        buff.tag('^');
                        buff.key(p);
                        buff.object().endObject();
                        buff.newline();
                    }
                    ++levels;
View Full Code Here

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

        diffHandler.start(before, after, path);

        // finally process remaining added nodes ...
        for (Map.Entry<Id, ArrayList<String>> entry : addedNodes.entrySet()) {
            for (String p : entry.getValue()) {
                buff.tag('+').
                        key(p).object();
                toJson(buff, rp.getNode(entry.getKey()), depth);
                buff.endObject().newline();
            }
        }
View Full Code Here

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

            }
        }
        //  ... and removed nodes
        for (Map.Entry<Id, ArrayList<String>> entry : removedNodes.entrySet()) {
            for (String p : entry.getValue()) {
                buff.tag('-');
                buff.value(p);
                buff.newline();
            }
        }
        return buff.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.