001/*
002 * Copyright 2020 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
018/**
019 * These are the possible states of an {@link org.gbif.api.model.occurrence.Occurrence} as it moves through the processing and persistence chain. It
020 * is used both in the processing logic as well as the messages that are exchanged as part of that processing.
021 */
022public enum OccurrencePersistenceStatus {
023  /**
024   * This occurrence has never been seen before.
025   */
026  NEW,
027
028  /**
029   * This occurrence previously existed and has now been updated with new information.
030   */
031  UPDATED,
032
033  /**
034   * This occurrence previously existed but there is no new information to propagate. This is typical of a crawl
035   * in which the exact record that was harvested in the previous crawl is seen again.
036   */
037  UNCHANGED,
038
039  /**
040   * This occurrence has been deleted.
041   */
042  DELETED
043}