Class Resource

    • Field Detail

      • id

        protected final java.lang.String id
      • meta

        protected final Meta meta
      • implicitRules

        protected final Uri implicitRules
      • language

        protected final Code language
      • hashCode

        protected volatile int hashCode
    • 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