hash.put("permissions", new Integer(perms.getPermissions()));
hash .put("permissions", new Integer(perms .getPermissions())); hash.put("type", doc.getResourceType() == DocumentImpl.BINARY_FILE ? "BinaryResource" : "XMLResource");
	public Hashtable getCollectionDesc(User user, String rootCollection)		throws Exception {		DBBroker broker = brokerPool.get(user);		try {			if (rootCollection == null)				rootCollection = "/db";			Collection collection = broker.getCollection(rootCollection);			if (collection == null)				throw new EXistException("collection " + rootCollection + " not found!");			Hashtable desc = new Hashtable();			Vector docs = new Vector();			Vector collections = new Vector();			if (collection.getPermissions().validate(user, Permission.READ)) {				DocumentImpl doc;				Hashtable hash;				Permission perms;				for (Iterator i = collection.iterator(); i.hasNext();) {					doc = (DocumentImpl) i.next();					perms = doc.getPermissions();					hash = new Hashtable(4);					hash.put("name", doc.getFileName());					hash.put("owner", perms.getOwner());					hash.put("group", perms.getOwnerGroup());					hash.put("permissions", new Integer(perms.getPermissions()));					docs.addElement(hash);				}				for (Iterator i = collection.collectionIterator(); i.hasNext();)					collections.addElement((String) i.next());			}			Permission perms = collection.getPermissions();			desc.put("collections", collections);			desc.put("documents", docs);			desc.put("name", collection.getName());			desc.put("created", Long.toString(collection.getCreationTime()));			desc.put("owner", perms.getOwner());			desc.put("group", perms.getOwnerGroup());			desc.put("permissions", new Integer(perms.getPermissions()));			return desc;		} finally {			brokerPool.release(broker);		}	}