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
020public enum GadmTerm implements Term, AlternativeNames {
021  level0Gid(DwcTerm.GROUP_LOCATION),
022  level0Name(DwcTerm.GROUP_LOCATION),
023  level1Gid(DwcTerm.GROUP_LOCATION),
024  level1Name(DwcTerm.GROUP_LOCATION),
025  level2Gid(DwcTerm.GROUP_LOCATION),
026  level2Name(DwcTerm.GROUP_LOCATION),
027  level3Gid(DwcTerm.GROUP_LOCATION),
028  level3Name(DwcTerm.GROUP_LOCATION);
029
030  private static final String PREFIX = "gadm";
031  private static final String NS = "http://rs.gbif.org/terms/gadm/3.0/";
032  private static final URI NS_URI = URI.create(NS);
033
034  public final String[] normAlts;
035
036  GadmTerm(String... alternatives) {
037    normAlts = alternatives;
038  }
039
040  @Override
041  public String simpleName() {
042    return name();
043  }
044
045  @Override
046  public String[] alternativeNames() {
047    return normAlts;
048  }
049
050  @Override
051  public String toString() {
052    return prefixedName();
053  }
054
055  @Override
056  public String prefix() {
057    return PREFIX;
058  }
059
060  @Override
061  public URI namespace() {
062    return NS_URI;
063  }
064
065  @Override
066  public boolean isClass() {
067    return false;
068  }
069}