001package ca.uhn.fhir.validation;
002
003import net.sf.saxon.lib.Validation;
004import org.hl7.fhir.instance.model.api.IBaseResource;
005
006
007/*
008 * #%L
009 * HAPI FHIR - Core Library
010 * %%
011 * Copyright (C) 2014 - 2021 Smile CDR, Inc.
012 * %%
013 * Licensed under the Apache License, Version 2.0 (the "License");
014 * you may not use this file except in compliance with the License.
015 * You may obtain a copy of the License at
016 *
017 *      http://www.apache.org/licenses/LICENSE-2.0
018 *
019 * Unless required by applicable law or agreed to in writing, software
020 * distributed under the License is distributed on an "AS IS" BASIS,
021 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
022 * See the License for the specific language governing permissions and
023 * limitations under the License.
024 * #L%
025 */
026
027/**
028 * An individual validation module, which applies validation rules against
029 * resources and adds failure/informational messages as it goes.
030 * 
031 * See <a href="https://hapifhir.io/hapi-fhir/docs/validation/introduction.html">Validation</a>
032 * for a list of available modules. You may also create your own.
033 */
034public interface IValidatorModule {
035
036        /**
037         * Validate the actual resource.
038         * 
039         * The {@link IValidationContext} can be used to access the resource being validated,
040         * and is populated with the results.
041         */
042        void validateResource(IValidationContext<IBaseResource> theCtx);
043
044}