001/* 002 * Copyright 2024 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; 020 021/** 022 * All International Press Telecommunications Council terms with namespace http://iptc.org/std/Iptc4xmpExt/2008-02-29/. 023 */ 024public enum IptcTerm implements Term, AlternativeNames, Serializable { 025 City, 026 CountryCode, 027 CountryName, 028 CVterm, 029 LocationCreated, 030 LocationShown, 031 ProvinceState, 032 Sublocation, 033 WorldRegion; 034 035 private static final String PREFIX = "iptc"; 036 private static final String NS = "http://iptc.org/std/Iptc4xmpExt/2008-02-29/"; 037 private static final URI NS_URI = URI.create(NS); 038 public final String[] alternatives; 039 040 @Override 041 public String toString() { 042 return prefixedName(); 043 } 044 045 @Override 046 public String simpleName() { 047 return name(); 048 } 049 050 @Override 051 public String[] alternativeNames() { 052 return alternatives; 053 } 054 055 @Override 056 public boolean isClass() { 057 return false; 058 } 059 060 @Override 061 public String prefix() { 062 return PREFIX; 063 } 064 065 @Override 066 public URI namespace() { 067 return NS_URI; 068 } 069 070 IptcTerm(String... alternatives) { 071 this.alternatives = alternatives; 072 } 073}