1 package org.collectionspace.services.advancedsearch.model;
5 import org.collectionspace.services.collectionobject.BriefDescriptionList;
7 public class BriefDescriptionListModel {
8 private static int DESCRIPTION_LENGTH = 55;
9 public static String briefDescriptionListToDisplayString(BriefDescriptionList bdList) {
10 List<String> bds = bdList.getBriefDescription();
11 String returnString = "";
12 // "Display first 55 (?) characters..." from https://docs.google.com/spreadsheets/d/103jyxa2oCtt8U0IQ25xsOyIxqwKvPNXlcCtcjGlT5tQ/edit?gid=0#gid=0
13 // FIXME the above business logic is inadequate because there are numerous brief descriptions
16 // get the 1st 55 characters of the 1st defined brief description if there is one
17 if(null != bds.get(0)) {
18 int length = bds.get(0).length();
19 returnString = bds.get(0).substring(0, (length >= DESCRIPTION_LENGTH) ? DESCRIPTION_LENGTH : length);