View Javadoc
1   /*
2    * Copyright (C) 2021 INRAE AgroClim
3    *
4    * This file is part of Indicators.
5    *
6    * Indicators is free software: you can redistribute it and/or modify
7    * it under the terms of the GNU General Public License as published by
8    * the Free Software Foundation, either version 3 of the License, or
9    * (at your option) any later version.
10   *
11   * Indicators is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14   * GNU General Public License for more details.
15   *
16   * You should have received a copy of the GNU General Public License
17   * along with Indicators. If not, see <http://www.gnu.org/licenses/>.
18   */
19  package fr.inrae.agroclim.indicators.model;
20  
21  import java.util.Locale;
22  
23  import fr.inrae.agroclim.indicators.util.NameableEnumUtils;
24  import jakarta.xml.bind.annotation.XmlEnum;
25  import jakarta.xml.bind.annotation.XmlType;
26  
27  /**
28   * Timescale of indicators.
29   *
30   * Last change $Date$
31   *
32   * @author $Author$
33   * @version $Revision$
34   */
35  @XmlType(name = "timescale")
36  @XmlEnum
37  public enum TimeScale implements Nameable {
38      /**
39       * Hourly.
40       */
41      HOURLY,
42      /**
43       * Daily.
44       */
45      DAILY;
46  
47      @Override
48      public String getName() {
49          return NameableEnumUtils.getName(this);
50      }
51  
52      @Override
53      public String getName(final Locale locale) {
54          return NameableEnumUtils.getName(this, locale);
55      }
56  }