if (hash.containsKey("mime-type")) r.setMimeType((String) hash.get("mime-type"));
	public Resource getResource(String name) throws XMLDBException {	    Vector params = new Vector();		params.addElement(getPath() + '/' + name);		Hashtable hash;		try {			hash = (Hashtable) rpcClient.execute("describeResource", params);		} catch (XmlRpcException xre) {			throw new XMLDBException(ErrorCodes.VENDOR_ERROR, xre.getMessage(), xre);		} catch (IOException ioe) {			throw new XMLDBException(ErrorCodes.INVALID_COLLECTION, "an io error occurred", ioe);		}		String docName = (String) hash.get("name");		if(docName == null)			return null;	// resource does not exist!		int p;			if ((p = docName.lastIndexOf('/')) > -1)			docName = docName.substring(p + 1);		Permission perm =			new Permission(				(String) hash.get("owner"),				(String) hash.get("group"),				((Integer) hash.get("permissions")).intValue());		String type = (String)hash.get("type");		int contentLen = 0;		if(hash.containsKey("content-length"))			contentLen = ((Integer)hash.get("content-length")).intValue();		if(type == null || type.equals("XMLResource")) {			RemoteXMLResource r = new RemoteXMLResource(this, -1, -1, docName, null);			r.setPermissions(perm);			r.setContentLength(contentLen);			return r;		} else {			RemoteBinaryResource r = new RemoteBinaryResource(this, docName);			r.setContentLength(contentLen);			r.setPermissions(perm);			return r;		}	}