Class ChCoreAddressAdapter
java.lang.Object
org.projecthusky.fhir.emed.ch.common.datatype.ChCoreAddressAdapter
An adapter for the CHCoreAddress datatype.
- Author:
- Quentin Ligier
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreates a new adapter around an empty address.ChCoreAddressAdapter
(org.hl7.fhir.r4.model.Address address) Constructor with an instance of address. -
Method Summary
Modifier and TypeMethodDescriptionaddLine
(ChCoreAddressAdapter.AddressLineAdapter addressLineAdapter) Adds an address line.org.hl7.fhir.r4.model.Address
Returns the underlying address.@Nullable String
Returns the city BFS ornull
if it is not present.@Nullable String
Gets the country code (ISO Country Alpha-2 or ISO Country Alpha-3 code), ornull
.getLines()
Returns the list of address lines.setCityBfs
(@Nullable String bfs) Sets the city BFS.setCountryCode
(@Nullable String countryCode) Sets the country code (ISO Country Alpha-2 or ISO Country Alpha-3 code).
-
Field Details
-
BFS_EXTENSION
URLs for extensions.- See Also:
-
COUNTRY_CODE_EXTENSION
- See Also:
-
-
Constructor Details
-
ChCoreAddressAdapter
public ChCoreAddressAdapter()Creates a new adapter around an empty address. -
ChCoreAddressAdapter
public ChCoreAddressAdapter(org.hl7.fhir.r4.model.Address address) Constructor with an instance of address.- Parameters:
address
- The instance of address to use. It will be mutated if using setter methods.
-
-
Method Details
-
getAddress
public org.hl7.fhir.r4.model.Address getAddress()Returns the underlying address.- Returns:
- the address.
-
getCityBfs
Returns the city BFS ornull
if it is not present.- Returns:
- the city BFS or
null
. - See Also:
-
setCityBfs
Sets the city BFS.- Parameters:
bfs
- The city BFS.- Returns:
- this.
- See Also:
-
getCountryCode
Gets the country code (ISO Country Alpha-2 or ISO Country Alpha-3 code), ornull
.- Returns:
- the country code or
null
.
-
setCountryCode
Sets the country code (ISO Country Alpha-2 or ISO Country Alpha-3 code).- Parameters:
countryCode
- The country code (ISO Country Alpha-2 or ISO Country Alpha-3 code).- Returns:
- this.
-
getLines
Returns the list of address lines.- Returns:
- a list of address line adapters.
-
addLine
Adds an address line.- Parameters:
addressLineAdapter
- The address line adapter.- Returns:
- this.
-