@Test public void testBuildSolrQuery() throws Exception{ assertNotNull(solrQueryService.buildSolrQuery("2016-06-01")); assertEquals("http: solrQueryService.buildSolrQuery("2016-06-01")); }
public String buildSolrQuery(String releaseDate) throws IOException{ StringBuilder solrSearchBuilder = new StringBuilder(); solrSearchBuilder.append(server) .append("/select?"); solrSearchBuilder.append("q=") .append("catalogPublishDate%3A%7B") .append(releaseDate) .append("T00%3A00%3A00Z+TO+*%5D"); solrSearchBuilder.append("&fq=") .append("resourcename") .append("%3A") .append("study"); solrSearchBuilder.append("&rows=100") .append("&wt=json"); return solrSearchBuilder.toString(); }
SolrQueryService { public String buildSolrQuery(String releaseDate) throws IOException{ StringBuilder solrSearchBuilder = new StringBuilder(); solrSearchBuilder.append(server) .append("/select?"); solrSearchBuilder.append("q=") .append("catalogPublishDate%3A%7B") .append(releaseDate) .append("T00%3A00%3A00Z+TO+*%5D"); solrSearchBuilder.append("&fq=") .append("resourcename") .append("%3A") .append("study"); solrSearchBuilder.append("&rows=100") .append("&wt=json"); return solrSearchBuilder.toString(); } }
SolrQueryService { public String buildSolrQuery(String releaseDate) throws IOException{ StringBuilder solrSearchBuilder = new StringBuilder(); solrSearchBuilder.append(server) .append("/select?"); solrSearchBuilder.append("q=") .append("catalogPublishDate%3A%7B") .append(releaseDate) .append("T00%3A00%3A00Z+TO+*%5D"); solrSearchBuilder.append("&fq=") .append("resourcename") .append("%3A") .append("study"); solrSearchBuilder.append("&rows=100") .append("&wt=json"); return solrSearchBuilder.toString(); } SolrQueryService(); }
SolrQueryService { public String buildSolrQuery(String releaseDate) throws IOException{ StringBuilder solrSearchBuilder = new StringBuilder(); solrSearchBuilder.append(server) .append("/select?"); solrSearchBuilder.append("q=") .append("catalogPublishDate%3A%7B") .append(releaseDate) .append("T00%3A00%3A00Z+TO+*%5D"); solrSearchBuilder.append("&fq=") .append("resourcename") .append("%3A") .append("study"); solrSearchBuilder.append("&rows=100") .append("&wt=json"); return solrSearchBuilder.toString(); } SolrQueryService(); List<PublishedStudy> getPublishedStudies(); String getLastReleaseDate(); String buildSolrQuery(String releaseDate); List<PublishedStudy> querySolr(String searchString); List<PublishedStudy> processSolrResult(HttpEntity entity); Resource getCatalogStatsFile(); void setCatalogStatsFile(Resource csf); URL getServer(); void setServer(URL server); }
SolrQueryService { public String buildSolrQuery(String releaseDate) throws IOException{ StringBuilder solrSearchBuilder = new StringBuilder(); solrSearchBuilder.append(server) .append("/select?"); solrSearchBuilder.append("q=") .append("catalogPublishDate%3A%7B") .append(releaseDate) .append("T00%3A00%3A00Z+TO+*%5D"); solrSearchBuilder.append("&fq=") .append("resourcename") .append("%3A") .append("study"); solrSearchBuilder.append("&rows=100") .append("&wt=json"); return solrSearchBuilder.toString(); } SolrQueryService(); List<PublishedStudy> getPublishedStudies(); String getLastReleaseDate(); String buildSolrQuery(String releaseDate); List<PublishedStudy> querySolr(String searchString); List<PublishedStudy> processSolrResult(HttpEntity entity); Resource getCatalogStatsFile(); void setCatalogStatsFile(Resource csf); URL getServer(); void setServer(URL server);  }