Search in sources :

Example 11 with SeoTags

use of org.nextprot.api.web.seo.domain.SeoTags in project nextprot-api by calipho-sib.

the class SeoTagsServiceImpl method getOneNewsSeoTags.

private SeoTags getOneNewsSeoTags(NextProtNews news) {
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
    String shortDate = sdf.format(news.getPublicationDate());
    String title = "News - " + news.getTitle();
    String h1 = "News - " + shortDate;
    String descr = "News - " + news.getTitle();
    return new SeoTags(title, descr, h1);
}
Also used : SeoTags(org.nextprot.api.web.seo.domain.SeoTags) SimpleDateFormat(java.text.SimpleDateFormat)

Aggregations

SeoTags (org.nextprot.api.web.seo.domain.SeoTags)11 Test (org.junit.Test)6 WebIntegrationBaseTest (org.nextprot.api.web.dbunit.base.mvc.WebIntegrationBaseTest)6 SimpleDateFormat (java.text.SimpleDateFormat)1 NextProtException (org.nextprot.api.commons.exception.NextProtException)1 CvTerm (org.nextprot.api.core.domain.CvTerm)1 Entry (org.nextprot.api.core.domain.Entry)1 Publication (org.nextprot.api.core.domain.Publication)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)1