001package org.gbif.api.vocabulary;
002
003import org.gbif.api.util.VocabularyUtils;
004
005/**
006 * Enumeration for describing the frequency with which changes and additions are made to the dataset after the initial
007 * dataset is completed. Based on the EML v2.1.1 MaintUpFreqType enumeration.
008 *
009 * @see <a href="http://rs.gbif.org/vocabulary/eml/update_frequency.xml">rs.gbif.org vocabulary</a>
010 * @see <a href="https://knb.ecoinformatics.org/#external//emlparser/docs/eml-2.1.1/./eml-dataset.html#MaintUpFreqType">EML
011 * Enumeration</a>
012 */
013public enum MaintenanceUpdateFrequency {
014  /**
015   * Updated 1 time each day.
016   */
017  DAILY,
018  /**
019   * Updated 1 time each week.
020   */
021  WEEKLY,
022  /**
023   * Updated 1 time each month.
024   */
025  MONTHLY,
026  /**
027   * Updated 2 times each year.
028   */
029  BIANNUALLY,
030  /**
031   * Updated 1 time each year.
032   */
033  ANNUALLY,
034  /**
035   * Updated as needed.
036   */
037  AS_NEEDED,
038  /**
039   * Updated continually.
040   */
041  CONTINUALLY,
042  /**
043   * Updated at irregular intervals.
044   */
045  IRREGULAR,
046  /**
047   * Further updates are not planned.
048   */
049  NOT_PLANNED,
050  /**
051   * Further updates may still happen, but it is not known for sure. Note: typo matches EML enumeration.
052   */
053  UNKOWN,
054  /**
055   * Updated according to some other interval.
056   */
057  OTHER_MAINTENANCE_PERIOD;
058
059  /**
060   * @return the matching MaintenanceUpdateFrequency or null
061   */
062  public static MaintenanceUpdateFrequency fromString(String frequency) {
063    return (MaintenanceUpdateFrequency) VocabularyUtils.lookupEnum(frequency, MaintenanceUpdateFrequency.class);
064  }
065}