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 018import org.gbif.dwc.terms.Term; 019 020import java.util.Set; 021 022/** 023 * Represents a remark flagged during the interpretation phase. 024 * IMPORTANT: Make sure no name clashes in case new implementation were added. 025 */ 026public interface InterpretationRemark { 027 028 /** 029 * Returns the identifier of the {@link InterpretationRemark}. 030 * This is normally implemented to return the result of {@link Enum#name()}. 031 * Potential name clashes are detected by unit tests. 032 * 033 * @return identifier of the {@link InterpretationRemark}. Never null. 034 */ 035 String getId(); 036 037 /** 038 * {@link Set} containing the {@link Term} considered to flag this remark. 039 * 040 * @return {@link Set} of {@link Term} or empty {@link Set}. Never null. 041 */ 042 Set<Term> getRelatedTerms(); 043 044 /** 045 * Returns the default severity of this {@link InterpretationRemark}. 046 * Severity can be relative to the context and profile. This {@link InterpretationRemarkSeverity} 047 * should be seen as the default severity in the general context of interpretation. 048 * 049 * @return default severity of this {@link InterpretationRemark}. Never null. 050 */ 051 InterpretationRemarkSeverity getSeverity(); 052 053 /** 054 * Checks if the {@link InterpretationRemark} is deprecated or not. 055 * @return true if the {@link InterpretationRemark} is marked with @Deprecated. 056 */ 057 boolean isDeprecated(); 058 059}