System.out.println("table(3, Dec) = " + cat.getValueAt(3, "Dec"));
try {
System.out.println("");
System.out.println("test query: of GSC0285601186");
QueryArgs q = new BasicQueryArgs(cat);
q.setId("GSC0285601186");
QueryResult r = cat.query(q);
if (r instanceof AstroCatTable) {
AstroCatTable table = (AstroCatTable) r;
System.out.println("Number of result rows: " + table.getRowCount());
if (table.getRowCount() != 0)
System.out.println("result: " + r.toString());
} else {
System.out.println("Failed search by ID");
}
System.out.println("");
System.out.println("test query: at center position/radius: ");
q = new BasicQueryArgs(cat);
q.setRegion(new CoordinateRadius(new WorldCoords("03:19:44.44", "+41:30:58.21"), 1.));
r = cat.query(q);
if (r instanceof AstroCatTable) {
AstroCatTable table = (AstroCatTable) r;
System.out.println("Number of result rows: " + table.getRowCount());