001/*
002 * Copyright 2020 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.model.common;
017
018import org.gbif.api.vocabulary.Rank;
019
020import javax.annotation.Nullable;
021
022/**
023 * A flat taxonomic classification using the major, Linnean ranks with verbatim names and integer based keys.
024 *
025 * @deprecated
026 */
027@Deprecated
028public interface LinneanClassificationKeys {
029
030  /**
031   * Return the class key for this usage. If the usage is for something above the "class" taxonomic level,
032   * return null.
033   *
034   * @return the classKey
035   */
036  @Nullable
037  Integer getClassKey();
038
039  /**
040   * @param classKey the classKey to set
041   */
042  void setClassKey(Integer classKey);
043
044  /**
045   * Return the family key for this usage. If the usage is for something above the "family" taxonomic level,
046   * return null.
047   *
048   * @return the familyKey
049   */
050  @Nullable
051  Integer getFamilyKey();
052
053  /**
054   * @param familyKey the familyKey to set
055   */
056  void setFamilyKey(Integer familyKey);
057
058  /**
059   * Return the genus key for this usage. If the usage is for something above the "genus" taxonomic level,
060   * return null.
061   *
062   * @return the genusKey
063   */
064  @Nullable
065  Integer getGenusKey();
066
067  /**
068   * @param genusKey the genusKey to set
069   */
070  void setGenusKey(Integer genusKey);
071
072  /**
073   * Return the kingdom key for this usage. If the usage is for something above the "kingdom" taxonomic level,
074   * return null.
075   *
076   * @return the kingdomKey
077   */
078  @Nullable
079  Integer getKingdomKey();
080
081  /**
082   * @param kingdomKey the kingdomKey to set
083   */
084  void setKingdomKey(Integer kingdomKey);
085
086  /**
087   * Return the order key for this usage. If the usage is for something above the "order" taxonomic level,
088   * return null.
089   *
090   * @return the orderKey
091   */
092  @Nullable
093  Integer getOrderKey();
094
095  /**
096   * @param orderKey the orderKey to set
097   */
098  void setOrderKey(Integer orderKey);
099
100  /**
101   * Return the phylum key for this usage. If the usage is for something above the "phylum" taxonomic level,
102   * return null.
103   *
104   * @return the phylumKey
105   */
106  @Nullable
107  Integer getPhylumKey();
108
109  /**
110   * @param phylumKey the phylumKey to set
111   */
112  void setPhylumKey(Integer phylumKey);
113
114  /**
115   * Return the species key for this usage. If the usage is for something above the "species" taxonomic level,
116   * return null.
117   *
118   * @return the speciesKey
119   */
120  @Nullable
121  Integer getSpeciesKey();
122
123  /**
124   * @param speciesKey the speciesKey to set
125   */
126  void setSpeciesKey(Integer speciesKey);
127
128  /**
129   * Return the subgenus key for this usage.
130   * If the usage is for something above the "subgenus" taxonomic level, return null.
131   *
132   * @return subgenusKey
133   */
134  @Nullable
135  Integer getSubgenusKey();
136
137  /**
138   * @param subgenusKey the subgenus usage key
139   */
140  void setSubgenusKey(Integer subgenusKey);
141
142  /**
143   * Gets a higher taxon key by passing the rank of it.
144   * Only Linnean ranks are supported.
145   *
146   * @param rank the higher linnean rank to retrieve
147   *
148   * @return the key of the higher taxon or null if rank doesnt exist
149   */
150  @Nullable
151  Integer getHigherRankKey(Rank rank);
152}