001/*
002 * Copyright 2014 Global Biodiversity Information Facility (GBIF)
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.gbif.api.vocabulary;
017
018/**
019 * The taxonomic status of a taxon.
020 * For synonyms more detailed status values are provided which "subclass" synonym.
021 *
022 * @see <a href="http://rs.gbif.org/vocabulary/gbif/taxonomic_status.xml">rs.gbif.org vocabulary</a>
023 */
024public enum TaxonomicStatus {
025
026  ACCEPTED,
027
028  /**
029   * Treated as accepted, but doubtful whether this is correct.
030   */
031  DOUBTFUL,
032
033  /**
034   * A general synonym, the exact type is unknown.
035   */
036  SYNONYM,
037
038  /**
039   * More specific subclass of SYNONYM.
040   */
041  HETEROTYPIC_SYNONYM,
042
043  /**
044   * More specific subclass of SYNONYM.
045   */
046  HOMOTYPIC_SYNONYM,
047
048  /**
049   * More specific subclass of SYNONYM.
050   */
051  PROPARTE_SYNONYM,
052
053  /**
054   * More specific subclass of SYNONYM.
055   */
056  MISAPPLIED,
057
058  /**
059   * Used in nub only.
060   */
061  @Deprecated
062  INTERMEDIATE_RANK_SYNONYM,
063
064  /**
065   * Used for unknown child taxa referred to via spec, ssp, ...
066   */
067  @Deprecated
068  DETERMINATION_SYNONYM;
069
070  public boolean isSynonym() {
071    return !isAccepted();
072  }
073
074  public boolean isAccepted() {
075    return this == ACCEPTED || this == DOUBTFUL;
076  }
077}