Class FHIRRegistryResource
- java.lang.Object
-
- org.linuxforhealth.fhir.registry.resource.FHIRRegistryResource
-
- All Implemented Interfaces:
java.lang.Comparable<FHIRRegistryResource>
- Direct Known Subclasses:
PackageRegistryResource
public class FHIRRegistryResource extends java.lang.Object implements java.lang.Comparable<FHIRRegistryResource>
A base class that contains the metadata for a definitional resource (e.g. StructureDefinition)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FHIRRegistryResource.Version
Represents a version that can either be lexical or follow the Semantic Versioning format
-
Field Summary
Fields Modifier and Type Field Description protected boolean
defaultVersion
protected java.lang.String
id
protected java.lang.String
kind
protected Resource
resource
protected java.lang.Class<? extends Resource>
resourceType
protected java.lang.String
type
protected java.lang.String
url
protected FHIRRegistryResource.Version
version
-
Constructor Summary
Constructors Constructor Description FHIRRegistryResource(java.lang.Class<? extends Resource> resourceType, java.lang.String id, java.lang.String url, FHIRRegistryResource.Version version, java.lang.String kind, java.lang.String type)
FHIRRegistryResource(java.lang.Class<? extends Resource> resourceType, java.lang.String id, java.lang.String url, FHIRRegistryResource.Version version, java.lang.String kind, java.lang.String type, boolean defaultVersion)
FHIRRegistryResource(java.lang.Class<? extends Resource> resourceType, java.lang.String id, java.lang.String url, FHIRRegistryResource.Version version, java.lang.String kind, java.lang.String type, Resource resource)
FHIRRegistryResource(java.lang.Class<? extends Resource> resourceType, java.lang.String id, java.lang.String url, FHIRRegistryResource.Version version, java.lang.String kind, java.lang.String type, Resource resource, boolean defaultVersion)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends FHIRRegistryResource>
Tas(java.lang.Class<T> registryResourceType)
int
compareTo(FHIRRegistryResource other)
boolean
equals(java.lang.Object obj)
static FHIRRegistryResource
from(Resource resource)
static FHIRRegistryResource
from(Resource resource, boolean defaultVersion)
java.lang.String
getId()
java.lang.String
getKind()
Resource
getResource()
java.lang.Class<? extends Resource>
getResourceType()
java.lang.String
getType()
java.lang.String
getUrl()
FHIRRegistryResource.Version
getVersion()
int
hashCode()
<T extends FHIRRegistryResource>
booleanis(java.lang.Class<T> registryResourceType)
boolean
isDefaultVersion()
-
-
-
Field Detail
-
resourceType
protected final java.lang.Class<? extends Resource> resourceType
-
id
protected final java.lang.String id
-
url
protected final java.lang.String url
-
version
protected final FHIRRegistryResource.Version version
-
kind
protected final java.lang.String kind
-
type
protected final java.lang.String type
-
defaultVersion
protected final boolean defaultVersion
-
resource
protected volatile Resource resource
-
-
Constructor Detail
-
FHIRRegistryResource
public FHIRRegistryResource(java.lang.Class<? extends Resource> resourceType, java.lang.String id, java.lang.String url, FHIRRegistryResource.Version version, java.lang.String kind, java.lang.String type, boolean defaultVersion)
-
FHIRRegistryResource
public FHIRRegistryResource(java.lang.Class<? extends Resource> resourceType, java.lang.String id, java.lang.String url, FHIRRegistryResource.Version version, java.lang.String kind, java.lang.String type)
-
FHIRRegistryResource
public FHIRRegistryResource(java.lang.Class<? extends Resource> resourceType, java.lang.String id, java.lang.String url, FHIRRegistryResource.Version version, java.lang.String kind, java.lang.String type, Resource resource, boolean defaultVersion)
-
FHIRRegistryResource
public FHIRRegistryResource(java.lang.Class<? extends Resource> resourceType, java.lang.String id, java.lang.String url, FHIRRegistryResource.Version version, java.lang.String kind, java.lang.String type, Resource resource)
-
-
Method Detail
-
getResourceType
public java.lang.Class<? extends Resource> getResourceType()
-
getId
public java.lang.String getId()
-
getUrl
public java.lang.String getUrl()
-
getVersion
public FHIRRegistryResource.Version getVersion()
-
getKind
public java.lang.String getKind()
-
getType
public java.lang.String getType()
-
isDefaultVersion
public boolean isDefaultVersion()
-
getResource
public Resource getResource()
-
is
public <T extends FHIRRegistryResource> boolean is(java.lang.Class<T> registryResourceType)
-
as
public <T extends FHIRRegistryResource> T as(java.lang.Class<T> registryResourceType)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
compareTo
public int compareTo(FHIRRegistryResource other)
- Specified by:
compareTo
in interfacejava.lang.Comparable<FHIRRegistryResource>
-
from
public static FHIRRegistryResource from(Resource resource)
-
from
public static FHIRRegistryResource from(Resource resource, boolean defaultVersion)
-
-