throw new EXistException("Collection " + collectionName + " not found"); collection.removeDocument(broker, docName);
throw new EXistException("Collection " + collectionName + " not found"); DocumentImpl doc = collection.getDocument(docName); if(doc == null) throw new EXistException("Document " + docName + " not found"); docName = docName.substring(p + 1); if(doc.getResourceType() == DocumentImpl.BINARY_FILE) collection.removeBinaryResource(broker, doc); else collection.removeDocument(broker, docName);
	public void remove(User user, String docName) throws Exception {		DBBroker broker = null;		try {			broker = brokerPool.get(user);			int p = docName.lastIndexOf('/');			if (p < 0 || p == docName.length() - 1)				throw new EXistException("Illegal document path");			String collectionName = docName.substring(0, p);			docName = docName.substring(p + 1);			Collection collection = broker.getCollection(collectionName);			if (collection == null)				throw new EXistException("Collection " + collectionName + " not found");			collection.removeDocument(broker, docName);		} finally {			brokerPool.release(broker);		}	}