response.getWriter().append("null") ;
}
else {
final IConceptVector ncv = esa.getNormalVector(cv, limit);
final IConceptIterator it = ncv.orderedIterator();
HashMap<Integer, Double> vals = new HashMap<Integer, Double>(10);
HashMap<Integer, String> titles = new HashMap<Integer, String>(10);
String inPart = "(";
int count = 0;
while(it.next() && count < limit){
inPart += it.getId() + ",";
vals.put(it.getId(),it.getValue());
count++;
}
inPart = inPart.substring(0,inPart.length()-1) + ")";
ResultSet r = stmtQuery.executeQuery(strTitles + inPart);
while(r.next()){
titles.put(r.getInt(1), new String(r.getBytes(2),"UTF-8"));
}
it.reset();
count = 0;
while(it.next() && count < limit){
int id = it.getId();
response.getWriter().append(id + "\t" + titles.get(id) + "\t" + df.format(vals.get(id)) + "\n") ;
count++;
}
}
return ;