View Javadoc

1   package org.cateproject.service.format.reference;
2   
3   import eu.etaxonomy.cdm.model.reference.BookSection;
4   
5   public class BookSectionFormatter extends NomenclaturalReferenceBaseFormatter<BookSection> {
6   
7   	public String getTitleCache(BookSection bookSection) {
8   		StringBuilder stringBuilder = formatStrictCitation(bookSection);
9   		if(bookSection.getInBook() != null) {
10  			if(bookSection.getInBook().getStandardAbbreviation() != null) {
11  				stringBuilder.append(" in " + bookSection.getInBook().getStandardAbbreviation());
12  			} else {
13  			    stringBuilder.append(" in " + bookSection.getInBook().getCitation());
14  			}
15  		}
16  		return stringBuilder.toString();
17  	}
18  }