Project

General

Profile

Download (1.8 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9

    
10
package eu.etaxonomy.cdm.strategy.cache.name;
11

    
12
import java.util.List;
13
import java.util.UUID;
14

    
15
import org.apache.commons.lang.StringUtils;
16
import org.apache.log4j.Logger;
17

    
18
import eu.etaxonomy.cdm.model.name.INonViralName;
19
import eu.etaxonomy.cdm.model.name.IZoologicalName;
20
import eu.etaxonomy.cdm.strategy.cache.TagEnum;
21
import eu.etaxonomy.cdm.strategy.cache.TaggedText;
22

    
23
public class ZooNameNoMarkerCacheStrategy extends ZooNameDefaultCacheStrategy {
24
	@SuppressWarnings("unused")
25
	private static final Logger logger = Logger.getLogger(ZooNameNoMarkerCacheStrategy.class);
26
	private static final long serialVersionUID = 2821727191810867550L;
27

    
28
	final static UUID uuid = UUID.fromString("8ffa5f04-0303-4875-be44-dac5ff95b874");
29

    
30

    
31
	@Override
32
	public UUID getUuid(){
33
		return uuid;
34
	}
35

    
36

    
37
	/**
38
	 * Factory method
39
	 * @return
40
	 */
41
	public static ZooNameNoMarkerCacheStrategy NewInstance(){
42
		return new ZooNameNoMarkerCacheStrategy();
43
	}
44

    
45
	/**
46
	 * Constructor
47
	 */
48
	private ZooNameNoMarkerCacheStrategy(){
49
		super();
50
	}
51

    
52

    
53
	@Override
54
	protected List<TaggedText> getInfraSpeciesTaggedNameCache(IZoologicalName nonViralName){
55
		boolean includeMarker = false;
56
		return getInfraSpeciesTaggedNameCache(nonViralName, includeMarker);
57
	}
58

    
59

    
60
	@Override
61
	protected void addInfraGenericPart(INonViralName name, List<TaggedText> tags, String infraGenericMarker, String infraGenEpi) {
62
		//add epitheton
63
		if (StringUtils.isNotBlank(infraGenEpi)){
64
	        tags.add(new TaggedText(TagEnum.name, "(" + infraGenEpi + ")"));
65
        }
66
	}
67

    
68

    
69
}
(9-9/9)