AdminNode info = (AdminNode)node.getUserObject();
if ( info instanceof HasCollection && ((HasCollection)info).getCollection() != null ) {
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
CollectionClient col = ((HasCollection)info).getCollection();
Stopwatch sw = new Stopwatch("Query Results", true);
String style;
switch ( cmbQueryType.getSelectedIndex() ) {
case 0: style = XPathQueryResolver.STYLE_XPATH; break;
case 1: style = FullTextQueryResolver.STYLE_FULLTEXT; break;
case 2: style = XSLTQueryResolver.STYLE_XSLT; break;
default: style = XUpdateQueryResolver.STYLE_XUPDATE; break;
}
ResultSetClient rs = col.queryCollection(style, query, cfg.getNamespaceMap());
sw.stop();
statusBar.setText(sw.toString());
Document doc = DOMHelper.newDocument();
Element root = doc.createElementNS(Query.NSURI, Query.PREFIX+":"+ResultSetWrapper.RESULTS);
String colName = rs.getCollection().getCanonicalName();
root.setAttribute("xmlns:"+Query.PREFIX, Query.NSURI);