001package ca.uhn.fhir.parser; 002 003import ca.uhn.fhir.parser.json.JsonLikeValue.ScalarType; 004import ca.uhn.fhir.parser.json.JsonLikeValue.ValueType; 005 006/* 007 * #%L 008 * HAPI FHIR - Core Library 009 * %% 010 * Copyright (C) 2014 - 2022 Smile CDR, Inc. 011 * %% 012 * Licensed under the Apache License, Version 2.0 (the "License"); 013 * you may not use this file except in compliance with the License. 014 * You may obtain a copy of the License at 015 * 016 * http://www.apache.org/licenses/LICENSE-2.0 017 * 018 * Unless required by applicable law or agreed to in writing, software 019 * distributed under the License is distributed on an "AS IS" BASIS, 020 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 021 * See the License for the specific language governing permissions and 022 * limitations under the License. 023 * #L% 024 */ 025 026/** 027 * Adapter implementation with NOP implementations of all {@link IParserErrorHandler} methods. 028 */ 029public class ErrorHandlerAdapter implements IParserErrorHandler { 030 031 @Override 032 public void containedResourceWithNoId(IParseLocation theLocation) { 033 // NOP 034 } 035 036 @Override 037 public void incorrectJsonType(IParseLocation theLocation, String theElementName, ValueType theExpected, ScalarType theExpectedScalarType, ValueType theFound, ScalarType theFoundScalarType) { 038 // NOP 039 } 040 041 @Override 042 public void missingRequiredElement(IParseLocation theLocation, String theElementName) { 043 // NOP 044 } 045 046 @Override 047 public void unexpectedRepeatingElement(IParseLocation theLocation, String theElementName) { 048 // NOP 049 } 050 051 @Override 052 public void unknownAttribute(IParseLocation theLocation, String theElementName) { 053 // NOP 054 } 055 056 @Override 057 public void unknownElement(IParseLocation theLocation, String theElementName) { 058 // NOP 059 } 060 061 @Override 062 public void unknownReference(IParseLocation theLocation, String theReference) { 063 // NOP 064 } 065 066 @Override 067 public void invalidValue(IParseLocation theLocation, String theValue, String theError) { 068 // NOP 069 } 070 071 @Override 072 public void extensionContainsValueAndNestedExtensions(IParseLocation theLoc) { 073 // NOP 074 } 075}