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 AbstractVisitable
This is the base resource type for everything.Maturity level: FMM5 (Normative)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Resource.Builder
-
Constructor Summary
Constructors Modifier Constructor Description protected
Resource(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.String
getId()
The logical id of the resource, as used in the URL for the resource.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.Code
getLanguage()
The base language in which the resource is written.Meta
getMeta()
The metadata about the resource.boolean
hasChildren()
<T extends Resource>
booleanis(java.lang.Class<T> resourceType)
abstract Resource.Builder
toBuilder()
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
String
that 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
Meta
that 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
Uri
that may be null.
-
getLanguage
public Code getLanguage()
The base language in which the resource is written.- Returns:
- An immutable object of type
Code
that 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
-
-