Package org.apache.jackrabbit.mk.json

Examples of org.apache.jackrabbit.mk.json.JsopTokenizer.matches()


                    String childPath = path + '/' + name;
                    if ("/".equals(path)) {
                        childPath = '/' + name;
                    }
                    childNodes.put(name, new KernelNodeState(kernel, valueFactory, childPath, revision));
                } else if (reader.matches('[')) {
                    properties.put(name, new PropertyStateImpl(name, CoreValueMapper.listFromJsopReader(reader, valueFactory)));
                } else {
                    CoreValue cv = CoreValueMapper.fromJsopReader(reader, valueFactory);
                    properties.put(name, new PropertyStateImpl(name, cv));
                }
View Full Code Here


                    properties.put(name, new PropertyStateImpl(name, CoreValueMapper.listFromJsopReader(reader, valueFactory)));
                } else {
                    CoreValue cv = CoreValueMapper.fromJsopReader(reader, valueFactory);
                    properties.put(name, new PropertyStateImpl(name, cv));
                }
            } while (reader.matches(','));
            reader.read('}');
            reader.read(JsopReader.END);
        }
    }
View Full Code Here

                buff.append(changes);
            }
            // the first revision isn't new, all others are
            isNew = true;
            t.read('}');
        } while (t.matches(','));
        return buff.toString();
    }

}
View Full Code Here

    }

    public static NodeImpl fromString(NodeMap map, String s) {
        JsopTokenizer t = new JsopTokenizer(s);
        NodeImpl node = new NodeImpl(map, 0);
        if (!t.matches('{')) {
            node.id = map.parseId(t.readRawValue());
            t.read('=');
            t.read('{');
        }
        boolean descendantCountSet = false;
View Full Code Here

            node.id = map.parseId(t.readRawValue());
            t.read('=');
            t.read('{');
        }
        boolean descendantCountSet = false;
        if (!t.matches('}')) {
            do {
                String key = t.readString();
                t.read(':');
                String value = t.readRawValue();
                if (key.length() > 0 && key.charAt(0) == ':') {
View Full Code Here

                        node.descendantInlineCount += 1 + id.getNode(map).descendantInlineCount;
                    }
                } else {
                    node.setProperty(key, value);
                }
            } while (t.matches(','));
            t.read('}');
        }
        return node;
    }
View Full Code Here

        String result = mk.getNodes("/", mk.getHeadRevision(), 0, 0, -1, null);
        List<String> names = new ArrayList<String>();
        List<String> properties = new ArrayList<String>();
        JsopReader t = new JsopTokenizer(result);
        t.read('{');
        if (!t.matches('}')) {
            do {
                String key = t.readString();
                t.read(':');
                if (t.matches('{')) {
                    names.add(key);
View Full Code Here

        t.read('{');
        if (!t.matches('}')) {
            do {
                String key = t.readString();
                t.read(':');
                if (t.matches('{')) {
                    names.add(key);
                    NodeImpl.parse(new NodeMap(), t, 0);
                } else {
                    if (!key.equals(":childNodeCount")) {
                        properties.add(key);
View Full Code Here

                    } else if (!key.equals(":hash")) {
                        properties.add(key);
                    }
                    t.readRawValue();
                }
            } while (t.matches(','));
            t.read('}');
        }
        if (!names.isEmpty()) {
            JsopBuilder buff = new JsopBuilder();
            for (String name : names) {
View Full Code Here

                    case '^': {
                        pos = t.getLastPos();
                        String subPath = t.readString();
                        t.read(':');
                        String value;
                        if (t.matches(JsopReader.NULL)) {
                            value = null;
                        } else {
                            value = t.readRawValue().trim();
                        }
                        String targetPath = PathUtils.concat(path, subPath);
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.