4 package eu
.etaxonomy
.cdm
.strategy
.cache
.agent
;
9 import org
.apache
.log4j
.Logger
;
11 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
12 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
13 import eu
.etaxonomy
.cdm
.strategy
.StrategyBase
;
19 public class TeamDefaultCacheStrategy
extends StrategyBase
implements INomenclaturalAuthorCacheStrategy
<Team
> {
20 private static final long serialVersionUID
= 8375295443642690479L;
21 @SuppressWarnings("unused")
22 private static final Logger logger
= Logger
.getLogger(TeamDefaultCacheStrategy
.class);
24 final static UUID uuid
= UUID
.fromString("1cbda0d1-d5cc-480f-bf38-40a510a3f223");
26 public static final String EMPTY_TEAM
= "-empty team-";
28 static public TeamDefaultCacheStrategy
NewInstance(){
29 return new TeamDefaultCacheStrategy();
35 private TeamDefaultCacheStrategy() {
40 * @see eu.etaxonomy.cdm.strategy.StrategyBase#getUuid()
43 protected UUID
getUuid() {
48 * @see eu.etaxonomy.cdm.strategy.INomenclaturalAuthorCacheStrategy#getNomenclaturalTitle(eu.etaxonomy.cdm.model.name.TaxonNameBase)
50 public String
getNomenclaturalTitle(Team team
) {
52 List
<Person
> teamMembers
= team
.getTeamMembers();
53 for (Person teamMember
: teamMembers
){
54 result
+= teamMember
.getNomenclaturalTitle() + " & ";
56 if (teamMembers
.size() > 0){
57 result
= result
.substring(0, result
.length() - 3);
59 result
= getTitleCache(team
);
65 * @see eu.etaxonomy.cdm.strategy.INomenclaturalAuthorCacheStrategy#getTitleCache(eu.etaxonomy.cdm.model.name.TaxonNameBase)
67 public String
getTitleCache(Team team
) {
68 // TODO is still dummy
70 List
<Person
> teamMembers
= team
.getTeamMembers();
71 for (Person teamMember
: teamMembers
){
72 result
+= teamMember
.getTitleCache() + " & ";
74 if (teamMembers
.size() > 0){
75 result
= result
.substring(0, result
.length() - 3);