if (!name.startsWith("/db")) name = "/db" + name;
name = NativeBroker.checkPath(name, "/db");
    public Hashtable listDocumentPermissions(User user, String name)    throws EXistException, PermissionDeniedException {        DBBroker broker = null;        Collection collection = null;        try {            broker = brokerPool.get(user);            if (!name.startsWith("/"))                name = '/' + name;            if (!name.startsWith("/db"))                name = "/db" + name;            collection = broker.openCollection(name, Lock.READ_LOCK);            if (collection == null)                throw new EXistException("Collection " + name + " not found");            if (!collection.getPermissions().validate(user, Permission.READ))                throw new PermissionDeniedException(                        "not allowed to read collection " + name);            Hashtable result = new Hashtable(collection.getDocumentCount());            DocumentImpl doc;            Permission perm;            Vector tmp;            String docName;            for (Iterator i = collection.iterator(broker); i.hasNext(); ) {                doc = (DocumentImpl) i.next();                perm = doc.getPermissions();                tmp = new Vector(3);                tmp.addElement(perm.getOwner());                tmp.addElement(perm.getOwnerGroup());                tmp.addElement(new Integer(perm.getPermissions()));                docName = doc.getFileName();                result.put(docName, tmp);            }            return result;        } finally {            if(collection != null)                collection.release();            brokerPool.release(broker);        }    }