001/*
002 * Copyright 2014 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.api.vocabulary;
017
018import static org.gbif.api.vocabulary.TagNamespace.CHECKLISTBANK;
019import static org.gbif.api.vocabulary.TagNamespace.CRAWLER;
020import static org.gbif.api.vocabulary.TagNamespace.GBIF;
021import static org.gbif.api.vocabulary.TagNamespace.GBIF_HARVESTING;
022
023/**
024 * Known {@link org.gbif.api.model.registry.MachineTag#getName()} name value.
025 * The tag names listed here are used/recognized by different services.
026 */
027public enum TagName {
028
029  /**
030   * BioCASE (ABCD 2.0.6) metadata response element: the dataset disclaimer.
031   * </p>
032   * This predicate belongs to the HIT namespace.
033   */
034  DISCLAIMER("Disclaimer", GBIF_HARVESTING),
035
036  /**
037   * BioCASE (ABCD 1.2 & 2.0.6) metadata response element: the dataset's owning organization name.
038   * </p>
039   * This predicate belongs to the HIT namespace.
040   */
041  ORGANISATION_NAME("OrganisationName", GBIF_HARVESTING),
042
043  /**
044   * BioCASE (ABCD 2.0.6) metadata response element: the dataset owner URL.
045   * </p>
046   * This predicate belongs to the HIT namespace.
047   */
048  OWNER_URL("OwnerURL", GBIF_HARVESTING),
049
050  /**
051   * BioCASE (ABCD 1.2) metadata response element: the dataset rights URL.
052   * </p>
053   * This predicate belongs to the HIT namespace.
054   */
055  RIGHTS_URL("RightsURL", GBIF_HARVESTING),
056
057  /**
058   * BioCASE (ABCD 1.2) metadata response element: the supplier URL.
059   * </p>
060   * This predicate belongs to the HIT namespace.
061   */
062  SUPPLIER_URL("SupplierURL", GBIF_HARVESTING),
063
064  /**
065   * BioCASE (ABCD 1.2 & 2.0.6) metadata response element: the dataset's terms of usage.
066   * </p>
067   * This predicate belongs to the HIT namespace.
068   */
069  TERMS_OF_USE("TermsOfUse", GBIF_HARVESTING),
070
071  /**
072   * TAPIR and BioCASE (ABCD 1.2 & 2.0.6) metadata response element: the intellectual property rights description.
073   * </p>
074   * This predicate belongs to the HIT namespace.
075   */
076  IPR_DECLARATION("IPRDeclaration", GBIF_HARVESTING),
077
078  /**
079   * TAPIR metadata response indexing preferences attribute: the frequency the publisher wishes the resource to be
080   * re-indexed.
081   * For example: frequency="P7D"
082   * </p>
083   * This predicate belongs to the HIT namespace.
084   */
085  FREQUENCY("frequency", GBIF_HARVESTING),
086
087  /**
088   * TAPIR metadata response indexing preferences attribute: the maximum duration permitted for indexing.
089   * For example: maxDuration="PT1H"
090   * </p>
091   * This predicate belongs to the HIT namespace.
092   */
093  MAX_DURATION("maxDuration", GBIF_HARVESTING),
094
095  /**
096   * TAPIR metadata response indexing preferences attribute: the preferred start time for indexing.
097   * For example: startTime="01:30:00Z"
098   * </p>
099   * This predicate belongs to the HIT namespace.
100   */
101  START_TIME("startTime", GBIF_HARVESTING),
102
103  /**
104   * TAPIR metadata response element: the date the resource was last modified.
105   * For example: 2009-05-25T02:00:00+02:00
106   * </p>
107   * This predicate belongs to the HIT namespace.
108   */
109  MODIFIED("modified", GBIF_HARVESTING),
110
111  /**
112   * TAPIR metadata response element: the date the resource was created.
113   * For example: 2008-04-01T13:45:26+02:00
114   * </p>
115   * This predicate belongs to the HIT namespace.
116   */
117  CREATED("created", GBIF_HARVESTING),
118
119  /**
120   * DiGIR metadata response resource element: the basis of record describing all records in the resource.
121   * For example: "Observations"
122   * </p>
123   * This predicate belongs to the HIT namespace.
124   */
125  BASIS_OF_RECORD("basisOfRecord", GBIF_HARVESTING),
126
127  /**
128   * Multiple protocols: the record count as declared by the resource publisher. For DiGIR, this could come from the
129   * metadata response resource element called numberOfRecords.
130   * For example: 35548
131   * </p>
132   * This predicate belongs to the HIT namespace.
133   */
134  DECLARED_RECORD_COUNT("declaredRecordCount", GBIF_HARVESTING),
135
136  /**
137   * DiGIR metadata response resource element: the date the resource was last modified.
138   * For example: 1991-12-31T00:00:00-05:00
139   * </p>
140   * This predicate belongs to the HIT namespace.
141   */
142  DATE_LAST_UPDATED("dateLastUpdated", GBIF_HARVESTING),
143
144  /**
145   * DiGIR metadata response resource element: maximum number of records that can be returned in a single inventory
146   * response.
147   * For example: 1000
148   * </p>
149   * This predicate belongs to the HIT namespace.
150   */
151  MAX_INVENTORY_RESPONSE_RECORDS("maxInventoryResponseRecords", GBIF_HARVESTING),
152
153  /**
154   * DiGIR metadata response resource element: maximum number of records that can be returned in a single search
155   * response.
156   * For example: 1000
157   * </p>
158   * This predicate belongs to the HIT namespace.
159   */
160  MAX_SEARCH_RESPONSE_RECORDS("maxSearchResponseRecords", GBIF_HARVESTING),
161
162  /**
163   * DiGIR metadata response resource element: minimum length of a string that can be used in an XML request.
164   * For example: 3
165   * </p>
166   * This predicate belongs to the HIT namespace.
167   */
168  MIN_QUERY_TERM_LENGTH("minQueryTermLength", GBIF_HARVESTING),
169
170  /**
171   * DiGIR metadata response resource element: the URL location of the conceptual schema.
172   * For example: "http://digir.net/schema/conceptual/darwin/2003/1.0"
173   * </p>
174   * This predicate belongs to the HIT namespace.
175   */
176  CONCEPTUAL_SCHEMA("conceptualSchema", GBIF_HARVESTING),
177
178
179  /**
180   * DiGIR metadata response resource element: the URL location of the schema.
181   * For example: "http://bnhm.berkeley.edu/manis/DwC/darwin2jrw030315.xsd"
182   * </p>
183   * This predicate belongs to the HIT namespace.
184   */
185  SCHEMA_LOCATION("schemaLocation", GBIF_HARVESTING),
186
187  /**
188   * BioCASE capabilities response Concept attribute: flag that indicates whether the dataset title is a searchable
189   * concept or not.
190   * For example: searchable="1"
191   * </p>
192   * This predicate belongs to the HIT namespace.
193   */
194  IS_TITLE_SEARCHABLE("isTitleSearchable", GBIF_HARVESTING),
195
196  /**
197   * BioCASE capabilities response SupportedSchemas attribute: the URL location of the content namespace.
198   * For example: namespace="http://www.tdwg.org/schemas/abcd/2.06"
199   * </p>
200   * TAPIR capabilities response concepts/schema attribute: the URL location of the content namespace.
201   * For example: namespace="http://rs.tdwg.org/dwc/terms/"
202   * </p>
203   * This predicate belongs to the HIT namespace.
204   */
205  CONTENT_NAMESPACE("contentNamespace", GBIF_HARVESTING),
206
207  /**
208   * TAPIR metadata response settings element: sets the maximum number of records in a response.
209   * </p>
210   * This predicate belongs to the HIT namespace.
211   */
212  MAX_ELEMENT_REPETITIONS("maxElementRepetitions", GBIF_HARVESTING),
213
214  /**
215   * The Darwin Core term datasetID which is found in dwc archives to reference subdatasets
216   * such as the Catalogue of Life GSDs. Stored in the registry to keep a mapping between the subdataset registry key
217   * and the dwca datasetID value.
218   *
219   * @see <a href="http://rs.tdwg.org/dwc/terms/datasetID">DWC Term</a>
220   * @see <a href="http://kos.gbif.org/wiki/Dwc:datasetID">KOS wiki</a>
221   */
222  DATASET_ID("dataset_id", GBIF_HARVESTING),
223
224  /**
225   * The Darwin Core term datasetName which is found in dwc archives to reference subdatasets
226   * such as the Catalogue of Life GSDs. Stored in the registry to keep a mapping between the subdataset registry key
227   * and the dwca datasetID value.
228   *
229   * @see <a href="http://rs.tdwg.org/dwc/terms/datasetName">DWC Term</a>
230   * @see <a href="http://kos.gbif.org/wiki/Dwc:datasetName">KOS wiki</a>
231   */
232  DATASET_NAME("dataset_name", GBIF_HARVESTING),
233
234  /**
235   * Flag whose very presence indicates the dataset should be ignored by GBIF harvesters and consequently never be
236   * (re)indexed by GBIF. A reason explaining why the dataset is being ignored should be given in the Tag's value.
237   * </p>
238   * Some potential reasons for ignoring a dataset during indexing include the dataset is a duplicate, the publisher
239   * has requested that it not be indexed, or it is currently on hold while the publisher performs updates.
240   * </p>
241   * This predicate belongs to the HIT namespace.
242   */
243  IS_IGNORED("isIgnored", GBIF_HARVESTING),
244
245  /**
246   * Flag that indicates the dataset has been manually deleted by a Registry administrator. Should a dataset be
247   * logically deleted and not have this tag, it can be inferred the deletion was done by machine, for example by the
248   * registry metadata synchronizer. A reason explaining why the dataset is being flagged as deleted should be given in
249   * the Tag's value.
250   * <p/>
251   * This predicate belongs to the GBIF namespace.
252   */
253  IS_MANUALLY_DELETED("isManuallyDeleted", GBIF),
254
255  /**
256   * Flag that indicates if a dataset has been locked for automatic updates based on metadata documents.
257   * If this tag is present the dataset registry information should only manually be editable.
258   */
259  IS_MANUALLY_CURATED("isManuallyCurated", GBIF),
260
261  /**
262   * This is a counter starting at 1 incremented every time we try to crawl a dataset.
263   * This is even incremented when a crawl fails for any reason.
264   */
265  CRAWL_ATTEMPT("crawl_attempt", CRAWLER),
266
267  /**
268   * Any checklist participating as a source for the GBIF backbone must be tagged with a positive integer priority
269   * value. The lowest value 1 has highest priority.
270   */
271  NUB_PRIORITY("nubPriority", CHECKLISTBANK),
272
273  /**
274   * The absolute number of usages matched to corresponding usages in the currently indexed Catalog of Life.
275   */
276  NUM_COL("numCol", CHECKLISTBANK),
277
278  /**
279   * The absolute number of usages matched to corresponding usages in the GBIF backbone.
280   */
281  NUM_NUB("numNub", CHECKLISTBANK),
282
283  /**
284   * A URL template to be used to create dynamic links to source web pages for individual name usages in this dataset.
285   * If the variable {ID} is found in this template it will be replaced by the actual name usage key. If it
286   * does not exist the key will be appended to the end of the URL.
287   */
288  RECORD_SOURCE_URL("recordSourceUrl", CHECKLISTBANK),
289
290  /**
291   * The kingdom the entire checklist dataset should be classified under.
292   */
293  KINGDOM("kingdom", CHECKLISTBANK),
294
295  /**
296   * The number of image records in this dataset.
297   */
298  NUM_IMAGES("numImages", CHECKLISTBANK),
299
300  /**
301   * The number of description records in this dataset.
302   */
303  NUM_DESCRIPTION("numDescriptions", CHECKLISTBANK),
304
305  /**
306   * The number of bibliographic reference records in this dataset.
307   */
308  NUM_REFERENCES("numReferences", CHECKLISTBANK),
309
310  /**
311   * The number of vernacular name records in this dataset.
312   */
313  NUM_VERNACULAR_NAMES("numVernacularNames", CHECKLISTBANK),
314
315  /**
316   * The number of type records in this dataset.
317   */
318  NUM_TYPES("numTypes", CHECKLISTBANK),
319
320  /**
321   * The number of species information records in this dataset.
322   */
323  NUM_SPECIES_INFOS("numSpeciesInfos", CHECKLISTBANK);
324
325  private final String name;
326
327  private final TagNamespace namespace;
328
329
330  /**
331   * Default constructor.
332   *
333   * @param name      namespace value
334   * @param namespace, Enum namespace to which belongs the predicate
335   */
336  TagName(String name, TagNamespace namespace) {
337    this.name = name;
338    this.namespace = namespace;
339  }
340
341  /**
342   * Namespace to which belong this tag.
343   *
344   * @return the namespace
345   */
346  public TagNamespace getNamespace() {
347    return namespace;
348  }
349
350  /**
351   * Actual machine tag name.
352   *
353   * @return the machine tag name
354   */
355  public String getName() {
356    return name;
357  }
358
359}