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.net.URI;
019
020/**
021 * As per CoL Data Submission Format, ver. 4 of 29th September 2014: List of tables and fields
022 */
023public enum AcefTerm implements Term, AlternativeNames {
024  AcceptedSpecies(true),
025  AcceptedTaxonID,
026  Kingdom,
027  Phylum,
028  Class,
029  Order,
030  Superfamily,
031  Family,
032  Genus,
033  SubGenusName,
034  SpeciesEpithet,
035  AuthorString,
036  GSDNameStatus,
037  Sp2000NameStatus,
038  IsFossil,
039  IsRecent,
040  IsExtinct,
041  HasPreHolocene,
042  HasModern,
043  LifeZone,
044  AdditionalData,
045  LTSSpecialist,
046  LTSDate,
047  SpeciesURL,
048  GSDTaxonGUID,
049  GSDNameGUID,
050
051  //
052  AcceptedInfraSpecificTaxa(true),
053  ParentSpeciesID("parentID"),
054  InfraSpeciesEpithet("InfraSpecies"),
055  InfraSpeciesAuthorString,
056  InfraSpeciesMarker,
057  InfraSpeciesURL,
058
059  // SYNONYMS
060  Synonyms(true),
061  ID,
062
063  // COMMON NAMES
064  CommonNames(true, "CommonName"),
065  CommonName,
066  TransliteratedName("TransliteratedNames"),
067  Country,
068  Area("Areas"),
069  Language,
070  ReferenceID,
071
072  // DISTRIBUTION
073  Distribution(true, "Distributions"),
074  DistributionElement,
075  StandardInUse,
076  DistributionStatus,
077
078  // REFERENCE
079  Reference(true, "References"),
080  Author("Authors"),
081  Year,
082  Title,
083  Details("Detail", "Source"),
084
085  // NAME REFERENCES
086  NameReferencesLinks(true, "NameReferences", "NameReferenceLinks", "NameReferenceLink", "NameReferecesLinks"),
087  ReferenceType,
088
089  // SOURCE DATABASE
090  SourceDatabase(true),
091  DatabaseFullName,
092  DatabaseShortName(false, "DatabaseName"),
093  DatabaseVersion,
094  ReleaseDate,
095  AuthorsEditors,
096  TaxonomicCoverage,
097  GroupNameInEnglish,
098  Abstract,
099  Organisation(false, "Organization"),
100  HomeURL,
101  Coverage,
102  Completeness,
103  Confidence,
104  LogoFileName,
105  ContactPerson;
106
107  private static final String PREFIX = "acef";
108  private static final String NS = "https://terms.catalogueoflife.org/acef/";
109  private static final URI NS_URI = URI.create(NS);
110
111  private final boolean isClass;
112  private final String[] alternatives;
113
114  AcefTerm(boolean isClass, String ... alternatives) {
115    this.alternatives = alternatives;
116    this.isClass = isClass;
117  }
118
119  AcefTerm(String ... alternatives) {
120    this(false, alternatives);
121  }
122
123  @Override
124  public String simpleName() {
125    return name();
126  }
127
128  @Override
129  public String toString() {
130    return prefixedName();
131  }
132
133  @Override
134  public String[] alternativeNames() {
135    return this.alternatives;
136  }
137
138  @Override
139  public boolean isClass() {
140    return isClass;
141  }
142
143  @Override
144  public String prefix() {
145    return PREFIX;
146  }
147
148  @Override
149  public URI namespace() {
150    return NS_URI;
151  }
152
153}