/** * {@inheritDoc} * * @see org.eclipse.smila.search.api.SearchService#xmlSearch(java.lang.String, * org.eclipse.smila.datamodel.record.Record) */ public Document searchAsXml(final String workflowName, final Record query) throws ParserConfigurationException { Document resultDoc = null; try { final SearchResult result = search(workflowName, query); resultDoc = _resultBuilder.buildResult(result); } catch (final ProcessingException ex) { resultDoc = _resultBuilder.buildError(ex); } if (_log.isDebugEnabled()) { _log.debug("XML result:"); _log.debug(XmlHelper.toString(resultDoc)); } return resultDoc; }
/** * {@inheritDoc} * * @see org.eclipse.smila.search.api.SearchService#searchAsXmlString(java.lang.String, * org.eclipse.smila.datamodel.record.Record) */ public String searchAsXmlString(final String workflowName, final Record query) throws ParserConfigurationException { final Document result = searchAsXml(workflowName, query); return XmlHelper.toString(result); }