2 * Copyright (C) 2019 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
9 package eu
.etaxonomy
.taxeditor
.editor
.view
.checklist
.e4
;
11 import eu
.etaxonomy
.cdm
.model
.description
.PresenceAbsenceTerm
;
12 import eu
.etaxonomy
.cdm
.model
.metadata
.TermDisplayEnum
;
13 import eu
.etaxonomy
.taxeditor
.preference
.PreferencesUtil
;
20 public class StatusHelper
{
21 PresenceAbsenceTerm term
;
24 public StatusHelper(PresenceAbsenceTerm term
){
26 TermDisplayEnum display
= TermDisplayEnum
.valueOf(PreferencesUtil
.displayStatusInChecklistEditor());
27 if (display
.equals(TermDisplayEnum
.IdInVocabulary
) && term
.getIdInVocabulary() != null){
28 label
= "[" + term
.getIdInVocabulary()+ "] " + term
.getTitleCache();
29 }else if (display
.equals(TermDisplayEnum
.Symbol1
) && term
.getSymbol() != null){
30 label
= "[" + term
.getSymbol()+ "] " + term
.getTitleCache();
31 } else if (display
.equals(TermDisplayEnum
.Symbol2
) && term
.getSymbol2() != null){
32 label
= "[" + term
.getSymbol2()+ "] " + term
.getTitleCache();
34 label
= term
.getTitleCache();
38 public String
toString(){