I guess instead of checking a couple different variations on mets.xml you could do getDepositDirectory().list() and then "mets.xml".equalsIgnoreCase(filename.getName()) until you find it.