use of org.mycore.solr.search.MCRSolrURL in project mycore by MyCoRe-Org.
the class MCRSolrQueryResolver method resolve.
@Override
public Source resolve(String href, String base) throws TransformerException {
String urlQuery = href.substring(href.indexOf(":") + 1);
SolrClient solrClient = MCRSolrClientFactory.getSolrClient();
MCRSolrURL solrURL = new MCRSolrURL((HttpSolrClient) solrClient, urlQuery);
try {
MCRURLContent result = new MCRURLContent(solrURL.getUrl());
return result.getSource();
} catch (IOException e) {
throw new TransformerException("Unable to get input stream from solr: " + solrURL.getUrl(), e);
}
}
Aggregations