@Override public void datastoreClosed(CreoleEvent e) { if (!e.getDatastore().equals(this.getDataStore())) return; if (this.getDataStore() != null) this.getDataStore().removeDatastoreListener(this); // close this corpus, since it cannot stay open when the DS it comes // from // is closed Factory.deleteResource(this); }