]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
6b9844d420a98c5f3ccdd7c98a88b770fde2c4cf
[tmp/jakarta-migration.git] /
1 package org.collectionspace.services.advancedsearch.model;
2
3 import java.util.List;
4
5 import org.collectionspace.services.collectionobject.TitleGroup;
6 import org.collectionspace.services.collectionobject.TitleGroupList;
7
8 public class TitleGroupListModel {
9         public static String titleGroupListToDisplayString(TitleGroupList tlList) {
10                 String returnString = "";
11                 List<TitleGroup> titleGroups = tlList.getTitleGroup();
12                 // "Title: Display 1st Title OR 1st Controlled Nomenclature combined with Uncontrolled Nomenclature OR 1st Taxon with Preservation Form" from https://docs.google.com/spreadsheets/d/103jyxa2oCtt8U0IQ25xsOyIxqwKvPNXlcCtcjGlT5tQ/edit?gid=0#gid=0
13                 // FIXME: we are not fully implementing the above logic below
14                 if(null != titleGroups) {
15                         if(!titleGroups.isEmpty()) {
16                                 TitleGroup titleGroup = titleGroups.get(0);
17                                 if(null != titleGroup.getTitle()) {
18                                         returnString = titleGroup.getTitle();
19                                 }
20                         }
21                 }
22
23                 return returnString;
24         }
25 }