java.lang.Object
org.openehealth.ipf.commons.ihe.xds.core.metadata.Hl7v2Based<XTN>
org.openehealth.ipf.commons.ihe.xds.core.metadata.Telecom
All Implemented Interfaces:
Serializable

public class Telecom extends Hl7v2Based<XTN>
Represents a telecommunication address.

This class contains members from the HL7 v.2.5 XTN data type.

All members of this class are allowed to be null. When transforming to HL7 this indicates that the values are empty. Trailing empty values are removed from the HL7 string.

Author:
Dmytro Rud
See Also:
  • Constructor Details

    • Telecom

      public Telecom()
    • Telecom

      public Telecom(XTN xtn)
    • Telecom

      public Telecom(String email)
      Creates a telecom object containing an E-mail address.
      Parameters:
      email - E-mail address (XTN-4).
    • Telecom

      public Telecom(Long countryCode, Long areaCityCode, Long localNumber, Long extension)
      Creates a telecom object containing a phone number.
      Parameters:
      countryCode - country code of phone number (XTN-5), can be null.
      areaCityCode - area/city code of phone number (XTN-6), can be null.
      localNumber - local part of the phone number (XTN-7).
      extension - extension of the phone number (XTN-8), can be null.
  • Method Details

    • getUse

      public String getUse()
      Returns:
      telecom use code (XTN-2) according to HL7 v.2.5 Table 0201.
    • setUse

      public void setUse(String use)
      Parameters:
      use - telecom use code (XTN-2) according to HL7 v.2.5 Table 0201.
    • getType

      public String getType()
      Returns:
      telecom type (XTN-3) according to HL7 v.2.5 Table 0202.
    • setType

      public void setType(String type)
      Parameters:
      type - telecom type (XTN-3) according to HL7 v.2.5 Table 0202.
    • getEmail

      public String getEmail()
      Returns:
      E-mail address (XTN-4).
    • setEmail

      public void setEmail(String email)
      Parameters:
      email - E-mail address (XTN-4).
    • getCountryCode

      public Long getCountryCode()
      Returns:
      country code of phone number (XTN-5).
    • setCountryCode

      public void setCountryCode(Long countryCode)
      Parameters:
      countryCode - country code of phone number (XTN-5).
    • getAreaCityCode

      public Long getAreaCityCode()
      Returns:
      area/city code of phone number (XTN-6).
    • setAreaCityCode

      public void setAreaCityCode(Long areaCityCode)
      Parameters:
      areaCityCode - area/city code of phone number (XTN-6).
    • getLocalNumber

      public Long getLocalNumber()
      Returns:
      local part of the phone number (XTN-7).
    • setLocalNumber

      public void setLocalNumber(Long localNumber)
      Parameters:
      localNumber - local part of the phone number (XTN-7).
    • getExtension

      public Long getExtension()
      Returns:
      extension of the phone number (XTN-8).
    • setExtension

      public void setExtension(Long extension)
      Parameters:
      extension - extension of the phone number (XTN-8).
    • getUnformattedPhoneNumber

      public String getUnformattedPhoneNumber()
      Returns:
      unformatted phone number (XTN-12).
    • setUnformattedPhoneNumber

      public void setUnformattedPhoneNumber(String unformattedPhoneNumber)
      Parameters:
      unformattedPhoneNumber - unformatted the phone number (XTN-12).
    • 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