}
}
// Outlier Score access
if(cur instanceof OutlierResult) {
OutlierResult or = (OutlierResult) cur;
if(parts.length >= partpos + 1) {
if("table".equals(parts[partpos])) {
// Handle paging
int offset = 0;
int pagesize = 100;
if(parts.length >= partpos + 2) {
offset = Integer.valueOf(parts[partpos + 1]);
}
if(parts.length >= partpos + 3) {
pagesize = Integer.valueOf(parts[partpos + 2]);
}
re.appendKeyHash("paging");
re.appendKeyValue("offset", offset);
re.appendKeyValue("pagesize", pagesize);
re.closeHash();
if(logger.isDebuggingFiner()) {
re.appendNewline();
}
// Serialize meta
OutlierScoreMeta meta = or.getOutlierMeta();
outlierMetaToJSON(re, meta);
re.appendKeyArray("scores");
Relation<Double> scores = or.getScores();
Iterator<DBID> iter = or.getOrdering().iter(scores.getDBIDs()).iterator();
for(int i = 0; i < offset && iter.hasNext(); i++) {
iter.next();
}
for(int i = 0; i < pagesize && iter.hasNext(); i++) {
DBID id = iter.next();