Package com.ibm.fhir.model.type
Class Extension.Builder
- java.lang.Object
-
- com.ibm.fhir.model.builder.AbstractBuilder<Element>
-
- com.ibm.fhir.model.type.Element.Builder
-
- com.ibm.fhir.model.type.Extension.Builder
-
- Enclosing class:
- Extension
public static class Extension.Builder extends Element.Builder
-
-
Field Summary
-
Fields inherited from class com.ibm.fhir.model.type.Element.Builder
extension, id
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Extensionbuild()Build theExtensionExtension.Builderextension(Extension... extension)May be used to represent additional information that is not part of the basic definition of the element.Extension.Builderextension(Collection<Extension> extension)May be used to represent additional information that is not part of the basic definition of the element.protected Extension.Builderfrom(Extension extension)Extension.Builderid(String id)Unique id for the element within a resource (for internal references).Extension.Builderurl(String url)Source of the definition for the extension code - a logical name or a URL.Extension.Buildervalue(Element value)Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).-
Methods inherited from class com.ibm.fhir.model.type.Element.Builder
from
-
-
-
-
Method Detail
-
id
public Extension.Builder id(String id)
Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.- Overrides:
idin classElement.Builder- Parameters:
id- Unique id for inter-element referencing- Returns:
- A reference to this Builder instance
-
extension
public Extension.Builder extension(Extension... extension)
May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.Adds new element(s) to the existing list
- Overrides:
extensionin classElement.Builder- Parameters:
extension- Additional content defined by implementations- Returns:
- A reference to this Builder instance
-
extension
public Extension.Builder extension(Collection<Extension> extension)
May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.Replaces the existing list with a new one containing elements from the Collection
- Overrides:
extensionin classElement.Builder- Parameters:
extension- Additional content defined by implementations- Returns:
- A reference to this Builder instance
-
url
public Extension.Builder url(String url)
Source of the definition for the extension code - a logical name or a URL.This element is required.
- Parameters:
url- identifies the meaning of the extension- Returns:
- A reference to this Builder instance
-
value
public Extension.Builder value(Element value)
Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).This is a choice element with the following allowed types:
Base64BinaryBooleanCanonicalCodeDateDateTimeDecimalIdInstantIntegerMarkdownOidPositiveIntStringTimeUnsignedIntUriUrlUuidAddressAgeAnnotationAttachmentCodeableConceptCodingContactPointCountDistanceDurationHumanNameIdentifierMoneyPeriodQuantityRangeRatioReferenceSampledDataSignatureTimingContactDetailContributorDataRequirementExpressionParameterDefinitionRelatedArtifactTriggerDefinitionUsageContextDosageMeta
- Parameters:
value- Value of extension- Returns:
- A reference to this Builder instance
-
build
public Extension build()
- Specified by:
buildin interfaceBuilder<Element>- Specified by:
buildin classElement.Builder- Returns:
- An immutable object of type
Extension - Throws:
IllegalStateException- if the current state cannot be built into a valid Extension per the base specification
-
from
protected Extension.Builder from(Extension extension)
-
-