int howmany, int start, Properties outputProperties, int enclose)
int howmany, int start, Properties outputProperties, boolean wrap)
	protected String search(DBBroker broker, String query, String path,			int howmany, int start, Properties outputProperties, int enclose)	throws BadRequestException, PermissionDeniedException {		String result = null;		try {			Source source = new StringSource(query);			XQuery xquery = broker.getXQueryService();			XQueryPool pool = xquery.getXQueryPool();			CompiledXQuery compiled = pool.borrowCompiledXQuery(source);			XQueryContext context;			if(compiled == null)			    context = xquery.newContext();			else			    context = compiled.getContext();			context.setStaticallyKnownDocuments(new String[] { path });						if(compiled == null)			    compiled = xquery.compile(context, source);			checkPragmas(context, outputProperties);			try {			    long startTime = System.currentTimeMillis();			    Sequence resultSequence = xquery.execute(compiled, null);			    long queryTime = System.currentTimeMillis() - startTime;				LOG.debug("Found " + resultSequence.getLength() + " in " + queryTime + "ms.");				return printResults(broker, resultSequence, howmany, start,						queryTime, outputProperties, enclose);			} finally {			    pool.returnCompiledXQuery(source, compiled);			}		} catch (XPathException e) {			throw new BadRequestException(e.getMessage(), e);		} catch (IOException e) {		    throw new BadRequestException(e.getMessage(), e);        }	}