Class IheXon
java.lang.Object
org.projecthusky.common.utils.datatypes.IheXon
Model of an IHE XON, based on an HL7 v2.5 XON.
- Author:
- Quentin Ligier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean@Nullable String@Nullable StringGetter of the assigning authority ID type.@Nullable StringinthashCode()static @Nullable IheXonParses a string as an IHE XON.render()Renders the instance as an IHE XON.voidsetOrganizationId(@Nullable String organizationId, @Nullable String assigningAuthorityId) Sets the organization ID, possibly with an assigning authority ID.voidsetOrganizationName(String organizationName) Sets the organization name.toString()static booleanValidates that a string is a valid IHE XON.
-
Constructor Details
-
IheXon
public IheXon(String organizationName, @Nullable String organizationId, @Nullable String assigningAuthorityId) Constructs a new IHE XON.- Parameters:
organizationName- The name of the organization as a non-null, non-blank string.organizationId- The ID of the organization. It should be an OID; if not, the assigning authority ID shall be given.assigningAuthorityId- The ID of the assigning authority that have assigned theorganizationId.
-
-
Method Details
-
parse
Parses a string as an IHE XON.- Parameters:
string- The string to parse.- Returns:
- the parsed IHE XON or
nullif the string is not a valid format.
-
validate
Validates that a string is a valid IHE XON.- Parameters:
string- The string to validate.- Returns:
trueif the string is a valid IHE XON,falseotherwise.
-
getOrganizationName
-
setOrganizationName
Sets the organization name.- Parameters:
organizationName- The organization name as a non-null, non-blank string.- Throws:
IllegalArgumentException- if the name is blank.
-
getOrganizationId
-
getAssigningAuthorityId
-
setOrganizationId
public void setOrganizationId(@Nullable String organizationId, @Nullable String assigningAuthorityId) Sets the organization ID, possibly with an assigning authority ID.- Parameters:
organizationId- The organization ID, nullable.assigningAuthorityId- The assigning authority ID, non-null only when the organization ID is provided and not an OID.- Throws:
IllegalArgumentException- if arguments are invalid.
-
getAssigningAuthorityIdType
Getter of the assigning authority ID type. -
render
Renders the instance as an IHE XON. -
equals
-
hashCode
public int hashCode() -
toString
-