java.lang.Object
org.projecthusky.common.utils.datatypes.IheXon

public class IheXon extends Object
Model of an IHE XON, based on an HL7 v2.5 XON.
Author:
Quentin Ligier
  • 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 the organizationId.
  • Method Details

    • parse

      public static @Nullable IheXon parse(String string)
      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

      public static boolean validate(@Nullable String string)
      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

      public String getOrganizationName()
    • setOrganizationName

      public void setOrganizationName(String organizationName)
      Sets the organization name.
      Parameters:
      organizationName - The organization name as a non-null, non-blank string.
      Throws:
      IllegalArgumentException - if the name is blank.
    • getOrganizationId

      public @Nullable String getOrganizationId()
    • getAssigningAuthorityId

      public @Nullable String 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

      public @Nullable String getAssigningAuthorityIdType()
      Getter of the assigning authority ID type.
    • render

      public String render()
      Renders the instance as an IHE XON.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object