
001package org.hl7.fhir.instance.model.api; 002 003import java.util.Arrays; 004import java.util.Collections; 005import java.util.HashSet; 006import java.util.Set; 007 008import ca.uhn.fhir.context.FhirVersionEnum; 009import ca.uhn.fhir.model.api.IElement; 010import ca.uhn.fhir.model.api.Include; 011 012/* 013 * #%L 014 * HAPI FHIR - Core Library 015 * %% 016 * Copyright (C) 2014 - 2023 Smile CDR, Inc. 017 * %% 018 * Licensed under the Apache License, Version 2.0 (the "License"); 019 * you may not use this file except in compliance with the License. 020 * You may obtain a copy of the License at 021 * 022 * http://www.apache.org/licenses/LICENSE-2.0 023 * 024 * Unless required by applicable law or agreed to in writing, software 025 * distributed under the License is distributed on an "AS IS" BASIS, 026 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 027 * See the License for the specific language governing permissions and 028 * limitations under the License. 029 * #L% 030 */ 031 032/** 033 * For now, this is a simple marker interface indicating that a class is a resource type. 034 * There are two concrete types of implementations of this interrface. The first are 035 * HL7.org's Resource structures (e.g. 036 * <code>org.hl7.fhir.instance.model.Patient</code>) and 037 * the second are HAPI's Resource structures, e.g. 038 * <code>ca.uhn.fhir.model.dstu.resource.Patient</code>) 039 */ 040public interface IBaseResource extends IBase, IElement { 041 042 IBaseMetaType getMeta(); 043 044 /** 045 * Include constant for <code>*</code> (return all includes) 046 */ 047 Include INCLUDE_ALL = new Include("*", false).toLocked(); 048 049 /** 050 * Include set containing only {@link #INCLUDE_ALL} 051 */ 052 Set<Include> WILDCARD_ALL_SET = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(INCLUDE_ALL))); 053 054 IIdType getIdElement(); 055 056 IBaseResource setId(String theId); 057 058 IBaseResource setId(IIdType theId); 059 060 FhirVersionEnum getStructureFhirVersionEnum(); 061 062}