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 GGBN terms with namespace http://data.ggbn.org/schemas/ggbn/terms/. 023 */ 024public enum GgbnTerm implements Term, AlternativeNames, Serializable { 025 Amplification(true), 026 Preservation(true), 027 Loan(true), 028 Cloning(true), 029 Permit(true), 030 GelImage(true), 031 MaterialSample(true), 032 Preparation(true), 033 034 amplificationDate, 035 amplificationMethod, 036 amplificationStaff, 037 amplificationSuccess, 038 amplificationSuccessDetails, 039 barcodeSequence, 040 blocked, 041 blockedUntil, 042 BOLDProcessID(false), 043 cloneStrain, 044 cloningDate, 045 cloningMethod, 046 cloningStaff, 047 concentration, 048 concentrationUnit, 049 consensusSequence, 050 consensusSequenceChromatogramFileURI, 051 consensusSequenceLength, 052 DNADNAHybridization(false), 053 DNAMeltingPoint(false), 054 DNAThreshold(false), 055 GC_content(false, "GC-content"), 056 gelBuffer, 057 gelConcentration, 058 gelDuration, 059 gelLadder, 060 gelRemarks, 061 gelStain, 062 gelStainConcentration, 063 gelVoltage, 064 geneticAccessionNumber, 065 geneticAccessionURI, 066 haplotype, 067 loanConditions, 068 loanDate, 069 loanDestination, 070 loanIdentifier, 071 marker, 072 markerAccordance, 073 markerSubfragment, 074 materialSampleType, 075 methodDeterminationConcentrationAndRatios, 076 methodDeterminationWeight, 077 percentAboveThreshold, 078 permitStatus, 079 permitStatusQualifier, 080 permitText, 081 permitType, 082 permitURI, 083 plasmid, 084 preparationDate, 085 preparationMaterials, 086 preparationProcess, 087 preparationType, 088 preparedBy, 089 preservationDateBegin, 090 preservationTemperature, 091 preservationType, 092 primerNameForward, 093 primerNameReverse, 094 primerReferenceCitationForward, 095 primerReferenceCitationReverse, 096 primerReferenceLinkForward, 097 primerReferenceLinkReverse, 098 primerSequenceForward, 099 primerSequenceReverse, 100 purificationMethod, 101 quality, 102 qualityCheckDate, 103 qualityRemarks, 104 ratioOfAbsorbance260_230, 105 ratioOfAbsorbance260_280, 106 receivedFrom, 107 sampleDesignation, 108 sequence, 109 stainingMethod, 110 volume, 111 volumeUnit, 112 weight, 113 weightUnit; 114 115 private static final String PREFIX = "ggbn"; 116 private static final String NS = "http://data.ggbn.org/schemas/ggbn/terms/"; 117 private static final URI NS_URI = URI.create(NS); 118 public final boolean isClass; 119 public final String[] alternatives; 120 121 @Override 122 public String toString() { 123 return prefixedName(); 124 } 125 126 @Override 127 public String simpleName() { 128 if (this == GC_content) { 129 return "GC-content"; 130 } 131 return name(); 132 } 133 134 @Override 135 public String[] alternativeNames() { 136 return alternatives; 137 } 138 139 /** 140 * @return true if the GGBN term is defining a class instead of a property, e.g. Amplification 141 */ 142 @Override 143 public boolean isClass() { 144 return isClass; 145 } 146 147 @Override 148 public String prefix() { 149 return PREFIX; 150 } 151 152 @Override 153 public URI namespace() { 154 return NS_URI; 155 } 156 157 GgbnTerm() { 158 this(false); 159 } 160 161 GgbnTerm(Boolean isClass, String... alternatives) { 162 this.isClass = isClass; 163 this.alternatives = alternatives; 164 } 165}