Class Resource
- java.lang.Object
-
- org.linuxforhealth.fhir.model.visitor.AbstractVisitable
-
- org.linuxforhealth.fhir.model.resource.Resource
-
- All Implemented Interfaces:
Visitable
- Direct Known Subclasses:
Binary,Bundle,DomainResource,Parameters
@Generated("org.linuxforhealth.fhir.tools.CodeGenerator") public abstract class Resource extends AbstractVisitableThis is the base resource type for everything.Maturity level: FMM5 (Normative)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classResource.Builder
-
Constructor Summary
Constructors Modifier Constructor Description protectedResource(Resource.Builder builder)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <T extends Resource>
Tas(java.lang.Class<T> resourceType)java.lang.StringgetId()The logical id of the resource, as used in the URL for the resource.UrigetImplicitRules()A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.CodegetLanguage()The base language in which the resource is written.MetagetMeta()The metadata about the resource.booleanhasChildren()<T extends Resource>
booleanis(java.lang.Class<T> resourceType)abstract Resource.BuildertoBuilder()Create a new Builder from the contents of this Resource-
Methods inherited from class org.linuxforhealth.fhir.model.visitor.AbstractVisitable
accept, accept, accept, accept, accept, accept, accept, accept, accept, accept, accept, accept, accept, accept, toString
-
-
-
-
Constructor Detail
-
Resource
protected Resource(Resource.Builder builder)
-
-
Method Detail
-
getId
public java.lang.String getId()
The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.- Returns:
- An immutable object of type
Stringthat may be null.
-
getMeta
public Meta getMeta()
The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.- Returns:
- An immutable object of type
Metathat may be null.
-
getImplicitRules
public Uri getImplicitRules()
A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.- Returns:
- An immutable object of type
Urithat may be null.
-
getLanguage
public Code getLanguage()
The base language in which the resource is written.- Returns:
- An immutable object of type
Codethat may be null.
-
is
public <T extends Resource> boolean is(java.lang.Class<T> resourceType)
- Returns:
- true if the resource can be cast to the requested resourceType
-
as
public <T extends Resource> T as(java.lang.Class<T> resourceType)
- Throws:
java.lang.ClassCastException- when this resources cannot be cast to the requested resourceType
-
hasChildren
public boolean hasChildren()
-
toBuilder
public abstract Resource.Builder toBuilder()
Create a new Builder from the contents of this Resource
-
-