}
@Override
public JsopReader getJournalStream(String fromRevisionId, String toRevisionId, String path) {
rightsRevision = getHeadRevision();
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;
do {
t.read('{');
buff.object();
do {
String key = t.readString();
buff.key(key);
t.read(':');
if (key.equals("id")) {
t.read();
String value = t.getToken();
revision = value;
buff.value(value);
} else if (key.equals("changes")) {
t.read();
String value = t.getToken();
value = filterDiff(new JsopTokenizer(value), revision).toString();
buff.value(value);
} 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;
}