try { CollectionManagementServiceImpl service = (CollectionManagementServiceImpl) client.current.getService("CollectionManagementService", "1.0"); for(int i = 0; i < res.length; i++) { setStatus("Copying " + res[i].toString() + " to " + destinationPath + "..."); if(res[i] instanceof InteractiveClient.CollectionName) service.copy(res[i].toString(), destinationPath, null); else service.copyResource(res[i].toString(), destinationPath, null); } client.reloadCollection(); } catch (XMLDBException e) { showErrorMessage(e.getMessage(), e); } setStatus("Move completed."); }
try { CollectionManagementServiceImpl service = (CollectionManagementServiceImpl) client.current.getService("CollectionManagementService", "1.0"); for(int i = 0; i < res.length; i++) { setStatus("Copying " + res[i].getName() + " to " + destinationPath + "..."); if(res[i].isCollection()) service.copy(res[i].getName(), destinationPath, null); else service.copyResource(res[i].getName(), destinationPath, null); } client.reloadCollection(); } catch (XMLDBException e) { showErrorMessage(e.getMessage(), e); } setStatus("Move completed."); }
			public void run() {				try {				    CollectionManagementServiceImpl service = (CollectionManagementServiceImpl)                		client.current.getService("CollectionManagementService", "1.0");		            for(int i = 0; i < res.length; i++) {		                setStatus("Copying " + res[i].toString() + " to " + destinationPath + "...");		                if(res[i] instanceof InteractiveClient.CollectionName)		                    service.copy(res[i].toString(), destinationPath, null);		                else		                    service.copyResource(res[i].toString(), destinationPath, null);		            }		            client.reloadCollection();		        } catch (XMLDBException e) {		            showErrorMessage(e.getMessage(), e);		        }		        setStatus("Move completed.");			}