001/*
002 * Copyright 2021 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.dwc.terms;
017
018import java.io.Serializable;
019import java.net.URI;
020import java.util.ArrayList;
021import java.util.List;
022
023/**
024 * Terms defined in the DNA extension.
025 *
026 * They aren't using the versioned namespace, which ought to be corrected in a future edition of the extension.
027 */
028public enum GbifDnaTerm implements Term, AlternativeNames, Serializable {
029  dna_sequence,
030  pcr_primer_forward,
031  pcr_primer_name_forward,
032  pcr_primer_name_reverse,
033  pcr_primer_reference,
034  pcr_primer_reverse;
035
036  private static final String PREFIX = "gbifdna";
037  private static final String NS = "http://rs.gbif.org/terms/";
038  private static final URI NS_URI = URI.create(NS);
039  public final String[] alternatives;
040
041  @Override
042  public String toString() {
043    return prefixedName();
044  }
045
046  @Override
047  public String simpleName() {
048    return name();
049  }
050
051  @Override
052  public String[] alternativeNames() {
053    return alternatives;
054  }
055
056  @Override
057  public boolean isClass() {
058    return false;
059  }
060
061  @Override
062  public String prefix() {
063    return PREFIX;
064  }
065
066  @Override
067  public URI namespace() {
068    return NS_URI;
069  }
070
071  GbifDnaTerm(String... alternatives) {
072    this.alternatives = alternatives;
073  }
074}