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.checklistbank;
017
018import javax.annotation.Nullable;
019
020public interface NameUsageExtension {
021
022  /**
023   * The name usage "taxon" key this extension record belongs to.
024   */
025  Integer getTaxonKey();
026
027  void setTaxonKey(Integer taxonKey);
028
029  /**
030   * @return a source reference string
031   */
032  @Nullable
033  String getSource();
034
035  void setSource(String source);
036
037  /**
038   * If the source is another name usage this is the taxonKey of that usage.
039   * Only useful for the backbone dataset.
040   *
041   * @return The key of the name usage this instance is derived from.
042   */
043  @Nullable
044  Integer getSourceTaxonKey();
045
046  void setSourceTaxonKey(Integer sourceTaxonKey);
047}