Class StructureMap.Group.Rule.Source.Builder
- java.lang.Object
-
- org.linuxforhealth.fhir.model.builder.AbstractBuilder<Element>
-
- org.linuxforhealth.fhir.model.type.Element.Builder
-
- org.linuxforhealth.fhir.model.type.BackboneElement.Builder
-
- org.linuxforhealth.fhir.model.resource.StructureMap.Group.Rule.Source.Builder
-
- Enclosing class:
- StructureMap.Group.Rule.Source
public static class StructureMap.Group.Rule.Source.Builder extends BackboneElement.Builder
-
-
Field Summary
-
Fields inherited from class org.linuxforhealth.fhir.model.type.BackboneElement.Builder
modifierExtension
-
Fields inherited from class org.linuxforhealth.fhir.model.type.Element.Builder
extension, id
-
Fields inherited from class org.linuxforhealth.fhir.model.builder.AbstractBuilder
validating
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StructureMap.Group.Rule.Source
build()
Build theStructureMap.Group.Rule.Source
StructureMap.Group.Rule.Source.Builder
check(java.lang.String check)
Convenience method for settingcheck
.StructureMap.Group.Rule.Source.Builder
check(String check)
FHIRPath expression - must be true or the mapping engine throws an error instead of completing.StructureMap.Group.Rule.Source.Builder
condition(java.lang.String condition)
Convenience method for settingcondition
.StructureMap.Group.Rule.Source.Builder
condition(String condition)
FHIRPath expression - must be true or the rule does not apply.StructureMap.Group.Rule.Source.Builder
context(Id context)
Type or variable this rule applies to.StructureMap.Group.Rule.Source.Builder
defaultValue(java.lang.Boolean defaultValue)
Convenience method for settingdefaultValue
with choice type Boolean.StructureMap.Group.Rule.Source.Builder
defaultValue(java.lang.Integer defaultValue)
Convenience method for settingdefaultValue
with choice type Integer.StructureMap.Group.Rule.Source.Builder
defaultValue(java.lang.String defaultValue)
Convenience method for settingdefaultValue
with choice type String.StructureMap.Group.Rule.Source.Builder
defaultValue(java.time.LocalDate defaultValue)
Convenience method for settingdefaultValue
with choice type Date.StructureMap.Group.Rule.Source.Builder
defaultValue(java.time.LocalTime defaultValue)
Convenience method for settingdefaultValue
with choice type Time.StructureMap.Group.Rule.Source.Builder
defaultValue(java.time.ZonedDateTime defaultValue)
Convenience method for settingdefaultValue
with choice type Instant.StructureMap.Group.Rule.Source.Builder
defaultValue(Element defaultValue)
A value to use if there is no existing value in the source object.StructureMap.Group.Rule.Source.Builder
element(java.lang.String element)
Convenience method for settingelement
.StructureMap.Group.Rule.Source.Builder
element(String element)
Optional field for this source.StructureMap.Group.Rule.Source.Builder
extension(java.util.Collection<Extension> extension)
May be used to represent additional information that is not part of the basic definition of the element.StructureMap.Group.Rule.Source.Builder
extension(Extension... extension)
May be used to represent additional information that is not part of the basic definition of the element.protected StructureMap.Group.Rule.Source.Builder
from(StructureMap.Group.Rule.Source source)
StructureMap.Group.Rule.Source.Builder
id(java.lang.String id)
Unique id for the element within a resource (for internal references).StructureMap.Group.Rule.Source.Builder
listMode(StructureMapSourceListMode listMode)
How to handle the list mode for this element.StructureMap.Group.Rule.Source.Builder
logMessage(java.lang.String logMessage)
Convenience method for settinglogMessage
.StructureMap.Group.Rule.Source.Builder
logMessage(String logMessage)
A FHIRPath expression which specifies a message to put in the transform log when content matching the source rule is found.StructureMap.Group.Rule.Source.Builder
max(java.lang.String max)
Convenience method for settingmax
.StructureMap.Group.Rule.Source.Builder
max(String max)
Specified maximum cardinality for the element - a number or a "*".StructureMap.Group.Rule.Source.Builder
min(java.lang.Integer min)
Convenience method for settingmin
.StructureMap.Group.Rule.Source.Builder
min(Integer min)
Specified minimum cardinality for the element.StructureMap.Group.Rule.Source.Builder
modifierExtension(java.util.Collection<Extension> modifierExtension)
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.StructureMap.Group.Rule.Source.Builder
modifierExtension(Extension... modifierExtension)
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.StructureMap.Group.Rule.Source.Builder
type(java.lang.String type)
Convenience method for settingtype
.StructureMap.Group.Rule.Source.Builder
type(String type)
Specified type for the element.protected void
validate(StructureMap.Group.Rule.Source source)
StructureMap.Group.Rule.Source.Builder
variable(Id variable)
Named context for field, if a field is specified.-
Methods inherited from class org.linuxforhealth.fhir.model.type.BackboneElement.Builder
from, validate
-
Methods inherited from class org.linuxforhealth.fhir.model.type.Element.Builder
from, validate
-
Methods inherited from class org.linuxforhealth.fhir.model.builder.AbstractBuilder
isValidating, setValidating
-
-
-
-
Method Detail
-
id
public StructureMap.Group.Rule.Source.Builder id(java.lang.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:
id
in classBackboneElement.Builder
- Parameters:
id
- Unique id for inter-element referencing- Returns:
- A reference to this Builder instance
-
extension
public StructureMap.Group.Rule.Source.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. If any of the elements are null, calling
build()
will fail.- Overrides:
extension
in classBackboneElement.Builder
- Parameters:
extension
- Additional content defined by implementations- Returns:
- A reference to this Builder instance
-
extension
public StructureMap.Group.Rule.Source.Builder extension(java.util.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. If any of the elements are null, calling
build()
will fail.- Overrides:
extension
in classBackboneElement.Builder
- Parameters:
extension
- Additional content defined by implementations- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
modifierExtension
public StructureMap.Group.Rule.Source.Builder modifierExtension(Extension... modifierExtension)
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Applications processing a resource are required to check for modifier extensions.Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Overrides:
modifierExtension
in classBackboneElement.Builder
- Parameters:
modifierExtension
- Extensions that cannot be ignored even if unrecognized- Returns:
- A reference to this Builder instance
-
modifierExtension
public StructureMap.Group.Rule.Source.Builder modifierExtension(java.util.Collection<Extension> modifierExtension)
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Applications processing a resource are required to check for modifier extensions.Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Overrides:
modifierExtension
in classBackboneElement.Builder
- Parameters:
modifierExtension
- Extensions that cannot be ignored even if unrecognized- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
context
public StructureMap.Group.Rule.Source.Builder context(Id context)
Type or variable this rule applies to.This element is required.
- Parameters:
context
- Type or variable this rule applies to- Returns:
- A reference to this Builder instance
-
min
public StructureMap.Group.Rule.Source.Builder min(java.lang.Integer min)
Convenience method for settingmin
.- Parameters:
min
- Specified minimum cardinality- Returns:
- A reference to this Builder instance
- See Also:
min(org.linuxforhealth.fhir.model.type.Integer)
-
min
public StructureMap.Group.Rule.Source.Builder min(Integer min)
Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input content.- Parameters:
min
- Specified minimum cardinality- Returns:
- A reference to this Builder instance
-
max
public StructureMap.Group.Rule.Source.Builder max(java.lang.String max)
Convenience method for settingmax
.- Parameters:
max
- Specified maximum cardinality (number or *)- Returns:
- A reference to this Builder instance
- See Also:
max(org.linuxforhealth.fhir.model.type.String)
-
max
public StructureMap.Group.Rule.Source.Builder max(String max)
Specified maximum cardinality for the element - a number or a "*". This is optional; if present, it acts an implicit check on the input content (* just serves as documentation; it's the default value).- Parameters:
max
- Specified maximum cardinality (number or *)- Returns:
- A reference to this Builder instance
-
type
public StructureMap.Group.Rule.Source.Builder type(java.lang.String type)
Convenience method for settingtype
.- Parameters:
type
- Rule only applies if source has this type- Returns:
- A reference to this Builder instance
- See Also:
type(org.linuxforhealth.fhir.model.type.String)
-
type
public StructureMap.Group.Rule.Source.Builder type(String type)
Specified type for the element. This works as a condition on the mapping - use for polymorphic elements.- Parameters:
type
- Rule only applies if source has this type- Returns:
- A reference to this Builder instance
-
defaultValue
public StructureMap.Group.Rule.Source.Builder defaultValue(java.lang.Boolean defaultValue)
Convenience method for settingdefaultValue
with choice type Boolean.- Parameters:
defaultValue
- Default value if no value exists- Returns:
- A reference to this Builder instance
- See Also:
defaultValue(Element)
-
defaultValue
public StructureMap.Group.Rule.Source.Builder defaultValue(java.time.LocalDate defaultValue)
Convenience method for settingdefaultValue
with choice type Date.- Parameters:
defaultValue
- Default value if no value exists- Returns:
- A reference to this Builder instance
- See Also:
defaultValue(Element)
-
defaultValue
public StructureMap.Group.Rule.Source.Builder defaultValue(java.time.ZonedDateTime defaultValue)
Convenience method for settingdefaultValue
with choice type Instant.- Parameters:
defaultValue
- Default value if no value exists- Returns:
- A reference to this Builder instance
- See Also:
defaultValue(Element)
-
defaultValue
public StructureMap.Group.Rule.Source.Builder defaultValue(java.lang.Integer defaultValue)
Convenience method for settingdefaultValue
with choice type Integer.- Parameters:
defaultValue
- Default value if no value exists- Returns:
- A reference to this Builder instance
- See Also:
defaultValue(Element)
-
defaultValue
public StructureMap.Group.Rule.Source.Builder defaultValue(java.lang.String defaultValue)
Convenience method for settingdefaultValue
with choice type String.- Parameters:
defaultValue
- Default value if no value exists- Returns:
- A reference to this Builder instance
- See Also:
defaultValue(Element)
-
defaultValue
public StructureMap.Group.Rule.Source.Builder defaultValue(java.time.LocalTime defaultValue)
Convenience method for settingdefaultValue
with choice type Time.- Parameters:
defaultValue
- Default value if no value exists- Returns:
- A reference to this Builder instance
- See Also:
defaultValue(Element)
-
defaultValue
public StructureMap.Group.Rule.Source.Builder defaultValue(Element defaultValue)
A value to use if there is no existing value in the source object.This is a choice element with the following allowed types:
Base64Binary
Boolean
Canonical
Code
Date
DateTime
Decimal
Id
Instant
Integer
Markdown
Oid
PositiveInt
String
Time
UnsignedInt
Uri
Url
Uuid
Address
Age
Annotation
Attachment
CodeableConcept
Coding
ContactPoint
Count
Distance
Duration
HumanName
Identifier
Money
Period
Quantity
Range
Ratio
Reference
SampledData
Signature
Timing
ContactDetail
Contributor
DataRequirement
Expression
ParameterDefinition
RelatedArtifact
TriggerDefinition
UsageContext
Dosage
Meta
- Parameters:
defaultValue
- Default value if no value exists- Returns:
- A reference to this Builder instance
-
element
public StructureMap.Group.Rule.Source.Builder element(java.lang.String element)
Convenience method for settingelement
.- Parameters:
element
- Optional field for this source- Returns:
- A reference to this Builder instance
- See Also:
element(org.linuxforhealth.fhir.model.type.String)
-
element
public StructureMap.Group.Rule.Source.Builder element(String element)
Optional field for this source.- Parameters:
element
- Optional field for this source- Returns:
- A reference to this Builder instance
-
listMode
public StructureMap.Group.Rule.Source.Builder listMode(StructureMapSourceListMode listMode)
How to handle the list mode for this element.- Parameters:
listMode
- first | not_first | last | not_last | only_one- Returns:
- A reference to this Builder instance
-
variable
public StructureMap.Group.Rule.Source.Builder variable(Id variable)
Named context for field, if a field is specified.- Parameters:
variable
- Named context for field, if a field is specified- Returns:
- A reference to this Builder instance
-
condition
public StructureMap.Group.Rule.Source.Builder condition(java.lang.String condition)
Convenience method for settingcondition
.- Parameters:
condition
- FHIRPath expression - must be true or the rule does not apply- Returns:
- A reference to this Builder instance
- See Also:
condition(org.linuxforhealth.fhir.model.type.String)
-
condition
public StructureMap.Group.Rule.Source.Builder condition(String condition)
FHIRPath expression - must be true or the rule does not apply.- Parameters:
condition
- FHIRPath expression - must be true or the rule does not apply- Returns:
- A reference to this Builder instance
-
check
public StructureMap.Group.Rule.Source.Builder check(java.lang.String check)
Convenience method for settingcheck
.- Parameters:
check
- FHIRPath expression - must be true or the mapping engine throws an error instead of completing- Returns:
- A reference to this Builder instance
- See Also:
check(org.linuxforhealth.fhir.model.type.String)
-
check
public StructureMap.Group.Rule.Source.Builder check(String check)
FHIRPath expression - must be true or the mapping engine throws an error instead of completing.- Parameters:
check
- FHIRPath expression - must be true or the mapping engine throws an error instead of completing- Returns:
- A reference to this Builder instance
-
logMessage
public StructureMap.Group.Rule.Source.Builder logMessage(java.lang.String logMessage)
Convenience method for settinglogMessage
.- Parameters:
logMessage
- Message to put in log if source exists (FHIRPath)- Returns:
- A reference to this Builder instance
- See Also:
logMessage(org.linuxforhealth.fhir.model.type.String)
-
logMessage
public StructureMap.Group.Rule.Source.Builder logMessage(String logMessage)
A FHIRPath expression which specifies a message to put in the transform log when content matching the source rule is found.- Parameters:
logMessage
- Message to put in log if source exists (FHIRPath)- Returns:
- A reference to this Builder instance
-
build
public StructureMap.Group.Rule.Source build()
- Specified by:
build
in interfaceBuilder<Element>
- Specified by:
build
in classBackboneElement.Builder
- Returns:
- An immutable object of type
StructureMap.Group.Rule.Source
- Throws:
java.lang.IllegalStateException
- if the current state cannot be built into a valid Source per the base specification
-
validate
protected void validate(StructureMap.Group.Rule.Source source)
-
from
protected StructureMap.Group.Rule.Source.Builder from(StructureMap.Group.Rule.Source source)
-
-