1 package org.hl7.fhir.instance.model.api;
2
3 import java.util.Arrays;
4 import java.util.Collections;
5 import java.util.HashSet;
6 import java.util.Set;
7
8 import ca.uhn.fhir.context.FhirVersionEnum;
9 import ca.uhn.fhir.model.api.IElement;
10 import ca.uhn.fhir.model.api.Include;
11
12 /*
13 * #%L
14 * HAPI FHIR - Core Library
15 * %%
16 * Copyright (C) 2014 - 2019 University Health Network
17 * %%
18 * Licensed under the Apache License, Version 2.0 (the "License");
19 * you may not use this file except in compliance with the License.
20 * You may obtain a copy of the License at
21 *
22 * http://www.apache.org/licenses/LICENSE-2.0
23 *
24 * Unless required by applicable law or agreed to in writing, software
25 * distributed under the License is distributed on an "AS IS" BASIS,
26 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27 * See the License for the specific language governing permissions and
28 * limitations under the License.
29 * #L%
30 */
31
32 /**
33 * For now, this is a simple marker interface indicating that a class is a resource type.
34 * There are two concrete types of implementations of this interrface. The first are
35 * HL7.org's Resource structures (e.g.
36 * <code>org.hl7.fhir.instance.model.Patient</code>) and
37 * the second are HAPI's Resource structures, e.g.
38 * <code>ca.uhn.fhir.model.dstu.resource.Patient</code>)
39 */
40 public interface IBaseResource extends IBase, IElement {
41
42 IBaseMetaType getMeta();
43
44 /**
45 * Include constant for <code>*</code> (return all includes)
46 */
47 Include INCLUDE_ALL = new Include("*", false).toLocked();
48
49 /**
50 * Include set containing only {@link #INCLUDE_ALL}
51 */
52 Set<Include> WILDCARD_ALL_SET = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(INCLUDE_ALL)));
53
54 IIdType getIdElement();
55
56 IBaseResource setId(String theId);
57
58 IBaseResource setId(IIdType theId);
59
60 FhirVersionEnum getStructureFhirVersionEnum();
61
62 }