((Observable) collection).deleteObservers();
if (collection instanceof Observable) ((Observable) collection).deleteObservers();
	private void save() {		new Thread() {			public void run() {				try {					statusMessage.setText("Storing " + resource.getId());					((Observable) collection).addObserver(						new ProgressObserver());					progress.setIndeterminate(true);					resource.setContent(text.getText());					collection.storeResource(resource);					((Observable) collection).deleteObservers();				} catch (XMLDBException e) {					ClientFrame.showErrorMessage(						"XMLDBException: " + e.getMessage(),						e);				}			}		}		.start();	}