broker.removeCollection(path);
broker.removeCollection(collection);
	public Response doDelete(DBBroker broker, String path) 	throws PermissionDeniedException, NotFoundException {		Response response;		try {			Collection collection = broker.getCollection(path);			if(collection != null) {				// remove the collection				LOG.debug("removing collection " + path);				broker.removeCollection(path);				response = new Response();				response.setDescription("Collection " + path + " removed.");			} else {				DocumentImpl doc = (DocumentImpl)broker.getDocument(path);				if(doc == null)					throw new NotFoundException("No document or collection found " +							"for path: " + path);				else {					// remove the document					LOG.debug("removing document " + path);					int p = path.lastIndexOf('/');					String docName = p < 0 || p == path.length() - 1 ? path : path.substring(p + 1);					if(doc.getResourceType() == DocumentImpl.BINARY_FILE)						doc.getCollection().removeBinaryResource(broker, docName);					else						doc.getCollection().removeDocument(broker, docName);					response = new Response();					response.setDescription("Document " + path + " removed.");				}			}		} catch (TriggerException e) {			throw new PermissionDeniedException("Trigger failed: " + e.getMessage());		} catch (LockException e) {			throw new PermissionDeniedException("Could not acquire lock: " + e.getMessage());		}		return response;	}