InteractiveClient.CollectionName next = (InteractiveClient.CollectionName)collections[i];
ResourceDescriptor next = collections[i];
                public void run() {                    ClientFrame.this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));                    IndexQueryService service;                    try {                        service = (IndexQueryService)                         	client.current.getService("IndexQueryService", "1.0");                        for(int i = 0; i < collections.length; i++) {                            InteractiveClient.CollectionName next = (InteractiveClient.CollectionName)collections[i];                            setStatus("Reindexing collection " + next + "...");                            service.reindexCollection(next.toString());                        }                        setStatus("Reindex completed.");                    } catch (XMLDBException e) {                        showErrorMessage(e.getMessage(), e);                    }                    ClientFrame.this.setCursor(Cursor.getDefaultCursor());                }