if (multigetRef.get() == null) {
return null;
}
Map<String, Object> docMap = multigetRef.get().get(duration, units);
final ViewResponseWithDocs viewResp = (ViewResponseWithDocs) objRef.get();
Collection<ViewRow> rows = new LinkedList<ViewRow>();
Iterator<ViewRow> itr = viewResp.iterator();
while (itr.hasNext()) {
ViewRow r = itr.next();
if(view instanceof SpatialView) {
rows.add(new SpatialViewRowWithDocs(r.getId(), r.getBbox(),
r.getGeometry(), r.getValue(), docMap.get(r.getId())));
} else {
rows.add(new ViewRowWithDocs(r.getId(), r.getKey(), r.getValue(),
docMap.get(r.getId())));
}
}
return new ViewResponseWithDocs(rows, viewResp.getErrors(),
viewResp.getTotalRows());
}