code: @Override
      public boolean deleteDocument(URI documentUri) throws DocumentException {
          // delete from hard disk
          URI fileUri = this.getDocumentInternalUri(documentUri);
          File file = new File(fileUri);
          if (file.exists()) {
              try {
                  FileUtils.deleteDirectory(file);
                  log.info("File deleted: " + file.getName());
                  //delete entry in mediatype map
  
                  for (String filePath : fileMediatypeMap.keySet()) {
                      if (filePath.matches(new StringBuilder(file.getAbsolutePath()).append(".*").toString())) {
                          fileMediatypeMap.remove(filePath);
                      }
                  }
                  if (fileMediatypeMap instanceof InMemoryCache) {
                      writeMediaTypeMapToDisk(fileMediatypeMap);
                  }
                  // Generate Event
                  this.getEventBus().post(new DocumentDeletedEvent(new Date(), documentUri));
                  return true;
              } catch (IOException e) {
                  log.warn("File does not exist. Unable to delete it: " + file.getAbsolutePath());
                  e.printStackTrace();
  
              }
  
          }
          return false;
      }
docs: /* (non-Javadoc)
  @see uk.ac.open.kmi.iserve.sal.manager.DocumentManager#deleteDocument(java.net.URI)