public String removeMetadata() {
CustomTreeNode tnb = (CustomTreeNode) this.metadataTreeModel.getNode();
Metadata selectedMetadata = (Metadata) tnb.getContent();
this.selectedFolder.getMetadatas().remove(selectedMetadata);
MetadataDao metadataDao = MetadataDao.createInstance();
try {
metadataDao.remove(selectedMetadata);
} catch (ObjectLockedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ObjectExistsException e) {
// TODO Auto-generated catch block