001/*
002 * Licensed under the Apache License, Version 2.0 (the "License");
003 * you may not use this file except in compliance with the License.
004 * You may obtain a copy of the License at
005 *
006 *     http://www.apache.org/licenses/LICENSE-2.0
007 *
008 * Unless required by applicable law or agreed to in writing, software
009 * distributed under the License is distributed on an "AS IS" BASIS,
010 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
011 * See the License for the specific language governing permissions and
012 * limitations under the License.
013 */
014package org.gbif.api.model.checklistbank;
015
016import org.gbif.api.model.common.MediaObject;
017
018import javax.annotation.Nullable;
019
020import io.swagger.v3.oas.annotations.media.Schema;
021
022/**
023 * An extension to the common MediaObject that adds a source taxon key property from checklistbank.
024 */
025public class NameUsageMediaObject extends MediaObject implements NameUsageExtension {
026
027  private Integer taxonKey;
028  private Integer sourceTaxonKey;
029
030  /**
031   * The name usage "taxon" key this description belongs to.
032   */
033  @Schema(description = "The name usage “taxon“ key to which this species profile belongs.")
034  @Override
035  public Integer getTaxonKey() {
036    return taxonKey;
037  }
038
039  @Override
040  public void setTaxonKey(Integer taxonKey) {
041    this.taxonKey = taxonKey;
042  }
043
044  @Schema(description = "The name usage key of the taxon in the checklist including this media object.")
045  @Nullable
046  @Override
047  public Integer getSourceTaxonKey() {
048    return sourceTaxonKey;
049  }
050
051  @Override
052  public void setSourceTaxonKey(Integer sourceTaxonKey) {
053    this.sourceTaxonKey = sourceTaxonKey;
054  }
055}