public long update(String xupdate) throws XMLDBException { DocumentSet docs = null; DBBroker broker = null;  try { broker = pool.get(); docs = broker.getDocumentsByCollection(user, parent.collection.getName()); } catch (EXistException e) { throw new XMLDBException(ErrorCodes.INVALID_COLLECTION, e.getMessage()); } catch (PermissionDeniedException e) { throw new XMLDBException(ErrorCodes.PERMISSION_DENIED, e.getMessage()); } finally { pool.release(broker); }  try { XUpdateProcessor processor = new XUpdateProcessor(pool, user); Modification modifications[] = processor.parse(new InputSource(new StringReader(xupdate))); long mods = 0; for (int i = 0; i < modifications.length; i++) { mods += modifications[i].process(docs); } return mods; } catch (ParserConfigurationException e) { throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage()); } catch (IOException e) { throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage()); } catch (SAXException e) { throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage()); } catch (PermissionDeniedException e) { throw new XMLDBException( ErrorCodes.PERMISSION_DENIED, e.getMessage()); } catch (EXistException e) { throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage()); }
public long update(String arg1) throws XMLDBException { return updateResource(null, arg1);
	public long update(String xupdate) throws XMLDBException {		DocumentSet docs = null;		DBBroker broker = null;		try {			broker = pool.get();			docs =				broker.getDocumentsByCollection(user, parent.collection.getName());		} catch (EXistException e) {            throw new XMLDBException(ErrorCodes.INVALID_COLLECTION, e.getMessage());		} catch (PermissionDeniedException e) {            throw new XMLDBException(ErrorCodes.PERMISSION_DENIED, e.getMessage());		} finally {            pool.release(broker);		}		try {			XUpdateProcessor processor = new XUpdateProcessor(pool, user);			Modification modifications[] =				processor.parse(new InputSource(new StringReader(xupdate)));			long mods = 0;			for (int i = 0; i < modifications.length; i++) {				mods += modifications[i].process(docs);			}			return mods;		} catch (ParserConfigurationException e) {			throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage());		} catch (IOException e) {			throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage());		} catch (SAXException e) {			throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage());		} catch (PermissionDeniedException e) {			throw new XMLDBException(				ErrorCodes.PERMISSION_DENIED,				e.getMessage());		} catch (EXistException e) {			throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage());		}	}