Package org.apache.jackrabbit.mk.json

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


                    } 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


        JsopReader t = mk.getJournalStream(fromRevisionId, toRevisionId, path);
        if (admin) {
            return t;
        }
        t.read('[');
        if (t.matches(']')) {
            return new JsopTokenizer("[]");
        }
        JsopStream buff = new JsopStream();
        buff.array();
        String revision = fromRevisionId;
View Full Code Here

                } else {
                    String raw = t.readRawValue();
                    //System.out.println(key + ":" + raw);
                    buff.encodedValue(raw);
                }
            } while (t.matches(','));
            buff.endObject();
            t.read('}');
        } while (t.matches(','));
        buff.endArray();
        return buff;
View Full Code Here

                    buff.encodedValue(raw);
                }
            } while (t.matches(','));
            buff.endObject();
            t.read('}');
        } while (t.matches(','));
        buff.endArray();
        return buff;
    }

    @Override
View Full Code Here

                if (":childNodeCount".equals(name)) {
                    childNodeCount =
                            Long.valueOf(reader.read(JsopReader.NUMBER));
                } else if (":hash".equals(name)) {
                    hash = new String(reader.read(JsopReader.STRING));
                } else if (reader.matches('{')) {
                    reader.read('}');
                    String childPath = path + '/' + name;
                    if ("/".equals(path)) {
                        childPath = '/' + name;
                    }
View Full Code Here

                    String childPath = path + '/' + name;
                    if ("/".equals(path)) {
                        childPath = '/' + name;
                    }
                    childPaths.put(name, childPath);
                } else if (reader.matches('[')) {
                    properties.put(name, readArrayProperty(name, reader));
                } else {
                    properties.put(name, readProperty(name, reader));
                }
            } while (reader.matches(','));
View Full Code Here

                } else if (reader.matches('[')) {
                    properties.put(name, readArrayProperty(name, reader));
                } else {
                    properties.put(name, readProperty(name, reader));
                }
            } while (reader.matches(','));
            reader.read('}');
            reader.read(JsopReader.END);
            // optimize for empty childNodes
            if (childPaths.isEmpty()) {
                childPaths = Collections.emptyMap();
View Full Code Here

                JsopReader reader = new JsopTokenizer(json);
                reader.read('{');
                do {
                    String name = StringCache.get(reader.readString());
                    reader.read(':');
                    if (reader.matches('{')) {
                        reader.read('}');
                        String childPath = getChildPath(name);
                        entries.add(new KernelChildNodeEntry(name, childPath));
                    } else if (reader.matches('[')) {
                        while (reader.read() != ']') {
View Full Code Here

                    reader.read(':');
                    if (reader.matches('{')) {
                        reader.read('}');
                        String childPath = getChildPath(name);
                        entries.add(new KernelChildNodeEntry(name, childPath));
                    } else if (reader.matches('[')) {
                        while (reader.read() != ']') {
                            // skip
                        }
                    } else {
                        reader.read();
View Full Code Here

                            // skip
                        }
                    } else {
                        reader.read();
                    }
                } while (reader.matches(','));
                reader.read('}');
                reader.read(JsopReader.END);
                return entries.iterator();
            }
        };
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.