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 String
Getter of the assigning authority ID type.@Nullable String
int
hashCode()
static @Nullable IheXon
Parses a string as an IHE XON.render()
Renders the instance as an IHE XON.void
setOrganizationId
(@Nullable String organizationId, @Nullable String assigningAuthorityId) Sets the organization ID, possibly with an assigning authority ID.void
setOrganizationName
(String organizationName) Sets the organization name.toString()
static boolean
Validates 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
null
if the string is not a valid format.
-
validate
Validates that a string is a valid IHE XON.- Parameters:
string
- The string to validate.- Returns:
true
if the string is a valid IHE XON,false
otherwise.
-
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
-