128129130131132133134135136137138
for (String d : children) { jsop.value(d); } jsop.endArray(); jsop.endObject(); jsop.newline(); tree.buffer(jsop.toString()); } void delete(int pos) { tree.modified(this);
136137138139140141142143144145146
for (String d : data) { jsop.value(d); } jsop.endArray(); } jsop.newline(); indexer.buffer(jsop.toString()); } void bufferMove(String path, String newPath) { JsopBuilder jsop = new JsopBuilder();
143144145146147148149150151152153
} void bufferMove(String path, String newPath) { JsopBuilder jsop = new JsopBuilder(); jsop.tag('>').key(path).value(newPath); jsop.newline(); indexer.buffer(jsop.toString()); } void bufferDelete(String path) { JsopBuilder jsop = new JsopBuilder();
150151152153154155156157158159160
} void bufferDelete(String path) { JsopBuilder jsop = new JsopBuilder(); jsop.tag('-').value(PathUtils.concat(name, path)); jsop.newline(); indexer.buffer(jsop.toString()); } void buffer(String jsop) { indexer.buffer(jsop);
90919293949596979899100
for (String v : values) { jsop.value(v); } jsop.endArray(); jsop.endObject(); jsop.newline(); tree.buffer(jsop.toString()); } void verify() { if (values.length != keys.length) {
6667686970717273747576
return ""; } } else if (after == null) { buff.tag('-'); buff.value(path); return buff.newline().toString(); } TraversingNodeDiffHandler diffHandler = new TraversingNodeDiffHandler(store) { @Override public void propertyAdded(PropertyState after) {
125126127128129130131132133134135
String p = PathUtils.concat(getCurrentPath(), name); if (p.startsWith(pathFilter)) { removedNodes.put(before, p); buff.tag('-'); buff.value(p); buff.newline(); } } @Override public void childNodeChanged(String name, NodeState before, NodeState after) {
215216217218219220221222223224225
} String p = PathUtils.concat(getCurrentPath(), name); if (p.startsWith(pathFilter)) { buff.tag('-'); buff.value(p); buff.newline(); } } @Override public void childNodeChanged(String name, NodeState before, NodeState after) {
313314315316317318319320321322323
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"))); return id;
170171172173174175176177178179180
for (String d : children) { jsop.value(d); } jsop.endArray(); jsop.endObject(); jsop.newline(); return jsop.toString(); } @Override public String toString() {