Project

General

Profile

Download (1.98 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2017 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
package eu.etaxonomy.cdm.strategy.cache.name;
10

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

    
15
import org.apache.log4j.Logger;
16

    
17
import eu.etaxonomy.cdm.model.name.IViralName;
18
import eu.etaxonomy.cdm.strategy.cache.TagEnum;
19
import eu.etaxonomy.cdm.strategy.cache.TaggedText;
20

    
21
/**
22
 * @author a.mueller
23
 * @date 07.05.2017
24
 *
25
 */
26
public class ViralNameDefaultCacheStrategy
27
        extends NameCacheStrategyBase<IViralName>
28
        implements IViralNameCacheStrategy<IViralName> {
29

    
30
    private static final long serialVersionUID = 2732652334900146554L;
31
    @SuppressWarnings("unused")
32
    private static final Logger logger = Logger.getLogger(ViralNameDefaultCacheStrategy.class);
33

    
34
    final static UUID uuid = UUID.fromString("1cdda0d1-d5bc-480f-bf08-40a510a2f223");
35

    
36

    
37
    @Override
38
    protected UUID getUuid() {
39
        return uuid;
40
    }
41

    
42
    /**
43
     * Factory method
44
     * @return NonViralNameDefaultCacheStrategy A new instance of  NonViralNameDefaultCacheStrategy
45
     */
46
    public static ViralNameDefaultCacheStrategy NewInstance(){
47
        return new ViralNameDefaultCacheStrategy();
48
    }
49

    
50

    
51
    /**
52
     * {@inheritDoc}
53
     */
54
    @Override
55
    protected List<TaggedText> doGetTaggedTitle(IViralName viralName) {
56
        List<TaggedText> tags = new ArrayList<>();
57
        String acronym = viralName.getAcronym();
58
        tags.add(new TaggedText(TagEnum.name, acronym));
59
        return tags;
60
    }
61

    
62
    /**
63
     * {@inheritDoc}
64
     */
65
    @Override
66
    public List<TaggedText> getTaggedName(IViralName taxonName) {
67
        return null /*this.getTaggedTitle(taxonName)*/;
68
    }
69

    
70
    /**
71
     * {@inheritDoc}
72
     */
73
    @Override
74
    public String getAuthorshipCache(IViralName nonViralName) {
75
        return null;
76
    }
77

    
78

    
79
}
(9-9/11)