use of org.nextprot.api.web.domain.NextProtNews in project nextprot-api by calipho-sib.
the class GitHubServiceUnitTest method shouldReturnNullIfDateIsNotInCorrectFormat.
@Test
public void shouldReturnNullIfDateIsNotInCorrectFormat() throws Exception {
NextProtNews n = GitHubServiceImpl.parseGitHubNewsFilePath("2014/August/25/Google OAuth Support.md");
assertTrue(n == null);
}
use of org.nextprot.api.web.domain.NextProtNews in project nextprot-api by calipho-sib.
the class SitemapServiceImpl method getSitemapUrlSet.
@Override
public SitemapUrlSet getSitemapUrlSet() {
// TODO set this elsewhere !
String base = "https://www.nextprot.org";
SitemapUrlSet urlSet = new SitemapUrlSet();
// news urls
for (NextProtNews n : githubService.getNews()) {
urlSet.add(new SitemapUrl(base + "/news/" + n.getUrl()));
}
// other application urls (help, about, home, portals, ...)
for (SeoTagsAndUrl tag : seoTagService.getGitHubSeoTags()) {
// blocked by robots.txt, thus removed from sitemap
if ("/user/proteins/lists".equals(tag.getUrl()))
continue;
// blocked by robots.txt, thus removed from sitemap
if ("/user/queries".equals(tag.getUrl()))
continue;
urlSet.add(new SitemapUrl(base + tag.getUrl()));
}
// entry function urls
Set<String> acs = masterIdentifierService.findUniqueNames();
for (String ac : acs) {
urlSet.add(new SitemapUrl(base + "/entry/" + ac));
}
return urlSet;
}
Aggregations