Collection collection = broker.getCollection(collectionName);
collection = broker.openCollection(collectionName, Lock.READ_LOCK);
	public Vector scanIndexTerms(User user, String collectionName,			String start, String end, boolean inclusive)			throws PermissionDeniedException, EXistException {		DBBroker broker = null;		try {			broker = brokerPool.get(user);			Collection collection = broker.getCollection(collectionName);			if (collection == null)				throw new EXistException("collection " + collectionName						+ " not found");			Occurrences occurrences[] = broker.getTextEngine().scanIndexTerms(					user, collection, start, end, inclusive);			Vector result = new Vector(occurrences.length);			Vector temp;			for (int i = 0; i < occurrences.length; i++) {				temp = new Vector(2);				temp.addElement(occurrences[i].getTerm().toString());				temp.addElement(new Integer(occurrences[i].getOccurrences()));				result.addElement(temp);			}			return result;		} finally {			brokerPool.release(broker);		}	}