Class SubstanceDefinition.Relationship.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.SubstanceDefinition.Relationship.Builder
 
 
 
 
 
- 
- Enclosing class:
 - SubstanceDefinition.Relationship
 
public static class SubstanceDefinition.Relationship.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 SubstanceDefinition.Relationship.Builderamount(java.lang.String amount)Convenience method for settingamountwith choice type String.SubstanceDefinition.Relationship.Builderamount(Element amount)A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other.SubstanceDefinition.Relationshipbuild()Build theSubstanceDefinition.RelationshipSubstanceDefinition.Relationship.Buildercomparator(CodeableConcept comparator)An operator for the amount, for example "average", "approximately", "less than".SubstanceDefinition.Relationship.Builderextension(java.util.Collection<Extension> extension)May be used to represent additional information that is not part of the basic definition of the element.SubstanceDefinition.Relationship.Builderextension(Extension... extension)May be used to represent additional information that is not part of the basic definition of the element.protected SubstanceDefinition.Relationship.Builderfrom(SubstanceDefinition.Relationship relationship)SubstanceDefinition.Relationship.Builderid(java.lang.String id)Unique id for the element within a resource (for internal references).SubstanceDefinition.Relationship.BuilderisDefining(java.lang.Boolean isDefining)Convenience method for settingisDefining.SubstanceDefinition.Relationship.BuilderisDefining(Boolean isDefining)For example where an enzyme strongly bonds with a particular substance, this is a defining relationship for that enzyme, out of several possible substance relationships.SubstanceDefinition.Relationship.BuildermodifierExtension(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.SubstanceDefinition.Relationship.BuildermodifierExtension(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.SubstanceDefinition.Relationship.BuilderratioHighLimitAmount(Ratio ratioHighLimitAmount)For use when the numeric has an uncertain range.SubstanceDefinition.Relationship.Buildersource(java.util.Collection<Reference> source)Supporting literature.SubstanceDefinition.Relationship.Buildersource(Reference... source)Supporting literature.SubstanceDefinition.Relationship.BuildersubstanceDefinition(Element substanceDefinition)A pointer to another substance, as a resource or just a representational code.SubstanceDefinition.Relationship.Buildertype(CodeableConcept type)For example "salt to parent", "active moiety", "starting material", "polymorph", "impurity of".protected voidvalidate(SubstanceDefinition.Relationship relationship)- 
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 SubstanceDefinition.Relationship.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:
 idin classBackboneElement.Builder- Parameters:
 id- Unique id for inter-element referencing- Returns:
 - A reference to this Builder instance
 
 
- 
extension
public SubstanceDefinition.Relationship.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:
 extensionin classBackboneElement.Builder- Parameters:
 extension- Additional content defined by implementations- Returns:
 - A reference to this Builder instance
 
 
- 
extension
public SubstanceDefinition.Relationship.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:
 extensionin 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 SubstanceDefinition.Relationship.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:
 modifierExtensionin classBackboneElement.Builder- Parameters:
 modifierExtension- Extensions that cannot be ignored even if unrecognized- Returns:
 - A reference to this Builder instance
 
 
- 
modifierExtension
public SubstanceDefinition.Relationship.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:
 modifierExtensionin 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
 
- 
substanceDefinition
public SubstanceDefinition.Relationship.Builder substanceDefinition(Element substanceDefinition)
A pointer to another substance, as a resource or just a representational code.This is a choice element with the following allowed types:
When of typeReference, the allowed resource types for this reference are:- Parameters:
 substanceDefinition- A pointer to another substance, as a resource or a representational code- Returns:
 - A reference to this Builder instance
 
 
- 
type
public SubstanceDefinition.Relationship.Builder type(CodeableConcept type)
For example "salt to parent", "active moiety", "starting material", "polymorph", "impurity of".This element is required.
- Parameters:
 type- For example "salt to parent", "active moiety"- Returns:
 - A reference to this Builder instance
 
 
- 
isDefining
public SubstanceDefinition.Relationship.Builder isDefining(java.lang.Boolean isDefining)
Convenience method for settingisDefining.- Parameters:
 isDefining- For example where an enzyme strongly bonds with a particular substance, this is a defining relationship for that enzyme, out of several possible relationships- Returns:
 - A reference to this Builder instance
 - See Also:
 isDefining(org.linuxforhealth.fhir.model.type.Boolean)
 
- 
isDefining
public SubstanceDefinition.Relationship.Builder isDefining(Boolean isDefining)
For example where an enzyme strongly bonds with a particular substance, this is a defining relationship for that enzyme, out of several possible substance relationships.- Parameters:
 isDefining- For example where an enzyme strongly bonds with a particular substance, this is a defining relationship for that enzyme, out of several possible relationships- Returns:
 - A reference to this Builder instance
 
 
- 
amount
public SubstanceDefinition.Relationship.Builder amount(java.lang.String amount)
Convenience method for settingamountwith choice type String.- Parameters:
 amount- A numeric factor for the relationship, e.g. that a substance salt has some percentage of active substance in relation to some other- Returns:
 - A reference to this Builder instance
 - See Also:
 amount(Element)
 
- 
amount
public SubstanceDefinition.Relationship.Builder amount(Element amount)
A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other.This is a choice element with the following allowed types:
- Parameters:
 amount- A numeric factor for the relationship, e.g. that a substance salt has some percentage of active substance in relation to some other- Returns:
 - A reference to this Builder instance
 
 
- 
ratioHighLimitAmount
public SubstanceDefinition.Relationship.Builder ratioHighLimitAmount(Ratio ratioHighLimitAmount)
For use when the numeric has an uncertain range.- Parameters:
 ratioHighLimitAmount- For use when the numeric has an uncertain range- Returns:
 - A reference to this Builder instance
 
 
- 
comparator
public SubstanceDefinition.Relationship.Builder comparator(CodeableConcept comparator)
An operator for the amount, for example "average", "approximately", "less than".- Parameters:
 comparator- An operator for the amount, for example "average", "approximately", "less than"- Returns:
 - A reference to this Builder instance
 
 
- 
source
public SubstanceDefinition.Relationship.Builder source(Reference... source)
Supporting literature.Adds new element(s) to the existing list. If any of the elements are null, calling
build()will fail.Allowed resource types for the references:
- Parameters:
 source- Supporting literature- Returns:
 - A reference to this Builder instance
 
 
- 
source
public SubstanceDefinition.Relationship.Builder source(java.util.Collection<Reference> source)
Supporting literature.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()will fail.Allowed resource types for the references:
- Parameters:
 source- Supporting literature- Returns:
 - A reference to this Builder instance
 - Throws:
 java.lang.NullPointerException- If the passed collection is null
 
- 
build
public SubstanceDefinition.Relationship build()
- Specified by:
 buildin interfaceBuilder<Element>- Specified by:
 buildin classBackboneElement.Builder- Returns:
 - An immutable object of type 
SubstanceDefinition.Relationship - Throws:
 java.lang.IllegalStateException- if the current state cannot be built into a valid Relationship per the base specification
 
- 
validate
protected void validate(SubstanceDefinition.Relationship relationship)
 
- 
from
protected SubstanceDefinition.Relationship.Builder from(SubstanceDefinition.Relationship relationship)
 
 - 
 
 -