4 package eu
.etaxonomy
.cdm
.strategy
.cache
.agent
;
7 import org
.apache
.log4j
.Logger
;
9 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
10 import eu
.etaxonomy
.cdm
.strategy
.StrategyBase
;
16 public class PersonDefaultCacheStrategy
extends StrategyBase
implements
17 INomenclaturalAuthorCacheStrategy
<Person
> {
18 private static final Logger logger
= Logger
.getLogger(PersonDefaultCacheStrategy
.class);
20 final static UUID uuid
= UUID
.fromString("9abda0e1-d5cc-480f-be38-40a510a3f253");
22 static public PersonDefaultCacheStrategy
NewInstance(){
23 return new PersonDefaultCacheStrategy();
29 private PersonDefaultCacheStrategy() {
34 * @see eu.etaxonomy.cdm.strategy.StrategyBase#getUuid()
37 protected UUID
getUuid() {
42 * @see eu.etaxonomy.cdm.strategy.INomenclaturalAuthorCacheStrategy#getNomenclaturalTitle(eu.etaxonomy.cdm.model.name.TaxonNameBase)
44 public String
getNomenclaturalTitle(Person person
) {
45 return person
.getNomenclaturalTitle();
49 * @see eu.etaxonomy.cdm.strategy.INomenclaturalAuthorCacheStrategy#getTitleCache(eu.etaxonomy.cdm.model.name.TaxonNameBase)
51 public String
getTitleCache(Person person
) {
52 if (! (person
.getLastname() == null) && ! (person
.getLastname().trim().equals("")) ){
54 if (person
.getFirstname() != null){
55 result
+= person
.getFirstname() + " ";
57 result
+= person
.getLastname();
60 return person
.getNomenclaturalTitle();