cdac.medinfo.sdk.hl7282.baselibs

## Class XAD

- java.lang.Object
- - cdac.medinfo.sdk.hl7282.baselibs.CompositeDataType
  - - cdac.medinfo.sdk.hl7282.baselibs.XAD

- All Implemented Interfaces:
    IDataType

      public class XAD
      extends CompositeDataType

  XAD - Extended address

  This data type specifies the address of a person, place or organization plus associated information.

  Represents an HL7 XAD data type. This data type has the following attributes:

  1. Street Address (SAD)Optional
  2. Other Designation (ST)Optional
  3. City (ST)Optional
  4. State or Province (ST)Optional
  5. Zip or Postal Code (ST)Optional
  6. Country (ID)Optional
  7. Address Type (ID)Conditional
  8. Other Geographic Designation (ST)Optional
  9. County/Parish Code (CWE)Optional
  10. Census Tract (CWE)Optional
  11. Address Representation Code (ID)Optional
  13. Effective Date (DTM)Optional
  14. Expiration Date (DTM)Optional

  15. Expiration Reason (CWE)Optional

  16. Temporary Indicator (ID)Optional

  17. Bad Address Indicator (ID)Optional

  18. Address Usage (ID)Optional

  19. Addressee (ST)Optional

  20. Comment (ST)Optional

  21. Preference Order (NM)Optional

  22. Protection Code (CWE)Optional

  23. Address Identifier (EI)Optional

  This class provides accessors & mutators for the elements mentioned above. This class override the equal method, to check whether some other object is "equal to" this one.

  User can also create Data Type through `DataElementFactory`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XAD()` Default Constructor for XAD
    `XAD(int iComponentType, IDataTypeMap objIDataTypeMap)` Constructor for XAD class which takes two arguments and sets the value in the respective member variable.
    `XAD(int iComponentType, int iMinLength, int iMaxLength, java.lang.String strCLength, IDataTypeMap objIDataTypeMap)` Constructor for XAD class which takes five arguments and sets the value in the respective member variable.
    `XAD(int iComponentType, int iMinLength, int iMaxLength, java.lang.String strCLength, int ITableNo, IDataTypeMap objIDataTypeMap)` Constructor for XAD class which takes six arguments and sets the value in the respective member variable.
    `XAD(int iMinLength, int iMaxLength, java.lang.String strCLength, int iComponentType)` Constructor for XAD class which takes four arguments and sets the value in the respective member variable.
    `XAD(int iMinLength, int iMaxLength, java.lang.String strCLength, int iTableNo, int iComponentType)` Constructor for XAD class which takes five arguments and sets the value in the respective member variable.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object objObject)` This method checks the equality of Object.
    `ST` | `getAddressee()` Returns Addressee
    `EI` | `getAddressIdentifier()` Returns Address Identifier
    `ID` | `getAddressRepresentationCode()` Returns Address Representation Code
    `ID` | `getAddressType()` Returns Address Type
    `ID` | `getAddressUsage()` Returns Address UsagE
    `ID` | `getBadAddressIndicator()` Returns Bad Address Indicator
    `CWE` | `getCensusTract()` Returns Census Tract
    `ST` | `getCity()` Returns City
    `ST` | `getComment()` Returns Comment
    `ID` | `getCountry()` Returns Country
    `CWE` | `getCountyParishCode()` Returns County/Parish Code
    `DTM` | `getEffectiveDate()` Returns Effective Date
    `DTM` | `getExpirationDate()` Returns Expiration Date
    `CWE` | `getExpirationReason()` Returns Expiration Reason
    `ST` | `getOtherDesignation()` Returns Other Designation
    `ST` | `getOtherGeographicDesignation()` Returns Other Geographic Designation
    `NM` | `getPreferenceOrder()` Returns Preference Order
    `CWE` | `getProtectionCode()` Returns Protection Code
    `ST` | `getStateOrProvince()` Returns State or Province
    `SAD` | `getStreetAddress()` Returns Street Address
    `ID` | `getTemporaryIndicator()` Returns Temporary Indicator
    `ST` | `getZipOrPostalCode()` Returns Zip or Postal Code
    `void` | `setAddressee(ST objST)` Sets the Addressee .
    `void` | `setAddressee(java.lang.String strAddressee)` Sets the Addressee .
    `void` | `setAddressIdentifier(EI objEI)` Sets the Address Identifier .
    `void` | `setAddressRepresentationCode(ID objID)` Sets the AddressRepresentationCode.
    `void` | `setAddressRepresentationCode(java.lang.String strAddrRepresentationCode)` Sets the AddressRepresentationCode.
    `void` | `setAddressType(ID objID)` Sets the AddressType.
    `void` | `setAddressType(java.lang.String strAddressType)` Sets the AddressType.
    `void` | `setAddressUsage(ID objID)` Sets the Address Usage.
    `void` | `setAddressUsage(java.lang.String strAddressUsage)` Sets the Address Usage.
    `void` | `setBadAddressIndicator(ID objID)` Sets the Bad Address Indicator.
    `void` | `setBadAddressIndicator(java.lang.String strBadAddressIndicator)` Sets the Bad Address Indicator.
    `void` | `setCensusTract(CWE objCWE)` Sets the CensusTract.
    `void` | `setCensusTract(java.lang.String strCensusTract)` Sets the CensusTract.
    `void` | `setCity(ST objST)` Sets the City.
    `void` | `setCity(java.lang.String strCity)` Sets the City.
    `void` | `setComment(ST objST)` Sets the Comment .
    `void` | `setComment(java.lang.String strComment)` Sets the Comment .
    `void` | `setCountry(ID objID)` Sets the Country.
    `void` | `setCountry(java.lang.String strCountry)` Sets the Country.
    `void` | `setCountyParishCode(CWE objCWE)` Sets the CountyParishCode.
    `void` | `setCountyParishCode(java.lang.String strCountyParishCode)` Sets the CountyParishCode.
    `void` | `setEffectiveDate(DTM objEffectiveDate)` Sets the EffectiveDate.
    `void` | `setEffectiveDate(java.lang.String strEffectiveDate)` Sets the EffectiveDate.
    `void` | `setExpirationDate(DTM objExpirationDate)` Sets the ExpirationDate.
    `void` | `setExpirationDate(java.lang.String strExpirationDate)` Sets the ExpirationDate.
    `void` | `setExpirationReason(CWE objCWE)` Sets the Expiration Reason.
    `void` | `setOtherDesignation(ST objST)` Sets the OtherDesignation.
    `void` | `setOtherDesignation(java.lang.String strOtherDesignation)` Sets the OtherDesignation.
    `void` | `setOtherGeographicDesignation(ST objST)` Sets the OtherGeographicDesignation.
    `void` | `setOtherGeographicDesignation(java.lang.String strOtherGeographicDesignation)` Sets the OtherGeographicDesignation.
    `void` | `setPreferenceOrder(NM objNM)` Sets the Preference Order .
    `void` | `setPreferenceOrder(java.lang.String strPreferenceOrder)` Sets the Preference Order .
    `void` | `setProtectionCode(CWE objCWE)` Sets the Preference Code .
    `void` | `setStateOrProvince(ST objST)` Sets the StateOrProvince.
    `void` | `setStateOrProvince(java.lang.String strStateOrProvince)` Sets the StateOrProvince.
    `void` | `setStreetAddress(SAD objStreetAddress)` Sets the StreetAddress.
    `void` | `setTemporaryIndicator(ID objID)` Sets the Temporary Indicator.
    `void` | `setTemporaryIndicator(java.lang.String strTemporaryIndicator)` Sets the Temporary Indicator.
    `void` | `setZipOrPostalCode(ST objST)` Sets the ZipOrPostalCode.
    `void` | `setZipOrPostalCode(java.lang.String strZipOrPostalCode)` Sets the ZipOrPostalCode.

    - ### Methods inherited from class cdac.medinfo.sdk.hl7282.baselibs.CompositeDataType

      `copy, dumpDataType, getAttributes, getDataTypeName, getLength, getValue, isPrimitive, read, setValue, validate, write, writeToXML`

    - ### Methods inherited from class java.lang.Object

      `getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### XAD

          public XAD()

      Default Constructor for XAD

    - #### XAD

          public XAD(int iMinLength,
             int iMaxLength,
             java.lang.String strCLength,
             int iComponentType)
              throws InvalidComponentTypeException

      Constructor for XAD class which takes four arguments and sets the value in the respective member variable.
      Parameters:
        `iMinLength` - The Minimum length the DataType can have.
        `iMaxLength` - The Maximum length the DataType can have.
        `iCLength` - The Conformance length the DataType can have.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

    - #### XAD

          public XAD(int iMinLength,
             int iMaxLength,
             java.lang.String strCLength,
             int iTableNo,
             int iComponentType)
              throws InvalidComponentTypeException

      Constructor for XAD class which takes five arguments and sets the value in the respective member variable.
      Parameters:
        `iMinLength` - The Minimum length the DataType can have.
        `iMaxLength` - The Maximum length the DataType can have.
        `iCLength` - The Conformance length the DataType can have.
        `iTableNo` - The Table number to which the value for the component is specified.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

    - #### XAD

          public XAD(int iComponentType,
             IDataTypeMap objIDataTypeMap)

      Constructor for XAD class which takes two arguments and sets the value in the respective member variable.
      Parameters:
        `objIDataTypeMap` - object of Data Type Map.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

    - #### XAD

          public XAD(int iComponentType,
             int iMinLength,
             int iMaxLength,
             java.lang.String strCLength,
             IDataTypeMap objIDataTypeMap)

      Constructor for XAD class which takes five arguments and sets the value in the respective member variable.
      Parameters:
        `objIDataTypeMap` - object of Data Type Map.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
        `iMinLength` - The Minimum length the DataType can have.
        `iMaxLength` - The Maximum length the DataType can have.
        `iCLength` - The Conformance length the DataType can have.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

    - #### XAD

          public XAD(int iComponentType,
             int iMinLength,
             int iMaxLength,
             java.lang.String strCLength,
             int ITableNo,
             IDataTypeMap objIDataTypeMap)

      Constructor for XAD class which takes six arguments and sets the value in the respective member variable.
      Parameters:
        `objIDataTypeMap` - object of Data Type Map.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
        `iMinLength` - The Minimum length the DataType can have.
        `iMaxLength` - The Maximum length the DataType can have.
        `iCLength` - The Conformance length the DataType can have.
        `iTableNo` - The Table number to which the value for the component is specified.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

  - ### Method Detail

    - #### setStreetAddress

          public void setStreetAddress(SAD objStreetAddress)

      Sets the StreetAddress.
      Parameters:
        `objStreetAddress` - specifies the street address.

    - #### setOtherDesignation

          public void setOtherDesignation(java.lang.String strOtherDesignation)

      Sets the OtherDesignation.
      Parameters:
        `strOtherDesignation` - specifies the Second line of address.

    - #### setOtherDesignation

          public void setOtherDesignation(ST objST)

      Sets the OtherDesignation.
      Parameters:
        `objST` - specifies the Second line of address.

    - #### setCity

          public void setCity(java.lang.String strCity)

      Sets the City.
      Parameters:
        `strCity` - the city, or district or place where the addressee is located.

    - #### setCity

          public void setCity(ST objST)

      Sets the City.
      Parameters:
        `objST` - the city, or district or place where the addressee is located.

    - #### setStateOrProvince

          public void setStateOrProvince(java.lang.String strStateOrProvince)

      Sets the StateOrProvince.
      Parameters:
        `strStateOrProvince` - specifies the state or province where the addressee is located.

    - #### setStateOrProvince

          public void setStateOrProvince(ST objST)

      Sets the StateOrProvince.
      Parameters:
        `objST` - specifies the state or province where the addressee is located.

    - #### setZipOrPostalCode

          public void setZipOrPostalCode(java.lang.String strZipOrPostalCode)

      Sets the ZipOrPostalCode.
      Parameters:
        `strZipOrPostalCode` - specifies the zip or postal code where the addressee is located.

    - #### setZipOrPostalCode

          public void setZipOrPostalCode(ST objST)

      Sets the ZipOrPostalCode.
      Parameters:
        `objST` - specifies the zip or postal code where the addressee is located.

    - #### setCountry

          public void setCountry(java.lang.String strCountry)

      Sets the Country.
      Parameters:
        `strCountry` - specifies the country where the addressee is located.

    - #### setCountry

          public void setCountry(ID objID)

      Sets the Country.
      Parameters:
        `objID` - specifies the country where the addressee is located.

    - #### setAddressType

          public void setAddressType(java.lang.String strAddressType)

      Sets the AddressType.
      Parameters:
        `strAddressType` - specifies the kind or type of address.

    - #### setAddressType

          public void setAddressType(ID objID)

      Sets the AddressType.
      Parameters:
        `objID` - specifies the kind or type of address.

    - #### setOtherGeographicDesignation

          public void setOtherGeographicDesignation(java.lang.String strOtherGeographicDesignation)

      Sets the OtherGeographicDesignation.
      Parameters:
        `strOtherGeographicDesignation` - specifies any other geographic designation.

    - #### setOtherGeographicDesignation

          public void setOtherGeographicDesignation(ST objST)

      Sets the OtherGeographicDesignation.
      Parameters:
        `objST` - specifies any other geographic designation.

    - #### setCountyParishCode

          public void setCountyParishCode(java.lang.String strCountyParishCode)

      Sets the CountyParishCode.
      Parameters:
        `strCountyParishCode` - specifies a code that represents the county in which the specified address resides.

    - #### setCountyParishCode

          public void setCountyParishCode(CWE objCWE)

      Sets the CountyParishCode.
      Parameters:
        `objCWE` - specifies a code that represents the county in which the specified address resides.

    - #### setCensusTract

          public void setCensusTract(java.lang.String strCensusTract)

      Sets the CensusTract.
      Parameters:
        `strCensusTract` - specifies a code that represents the census tract in which the specified address resides.

    - #### setCensusTract

          public void setCensusTract(CWE objCWE)

      Sets the CensusTract.
      Parameters:
        `objCWE` - specifies a code that represents the census tract in which the specified address resides.

    - #### setAddressRepresentationCode

          public void setAddressRepresentationCode(java.lang.String strAddrRepresentationCode)

      Sets the AddressRepresentationCode.
      Parameters:
        `strAddrRepresentationCode` - specifies representations of the same name/address Suggested values are I,A,P [Refer table 0465]

    - #### setAddressRepresentationCode

          public void setAddressRepresentationCode(ID objID)

      Sets the AddressRepresentationCode.
      Parameters:
        `objID` - specifies representations of the same name/address Suggested values are I,A,P [Refer table 0465]

    - #### setEffectiveDate

          public void setEffectiveDate(java.lang.String strEffectiveDate)

      Sets the EffectiveDate.
      Parameters:
        `strTime` - specifies The first date, if known, on which the address is valid and active.

    - #### setEffectiveDate

          public void setEffectiveDate(DTM objEffectiveDate)

      Sets the EffectiveDate.
      Parameters:
        `objEffectiveDate` - It is The first date, if known, on which the address is valid and active.

    - #### setExpirationDate

          public void setExpirationDate(java.lang.String strExpirationDate)

      Sets the ExpirationDate.
      Parameters:
        `strTime` - specifies The last date, if known, on which the address is valid and active.

    - #### setExpirationDate

          public void setExpirationDate(DTM objExpirationDate)

      Sets the ExpirationDate.
      Parameters:
        `objExpirationDate` - It is The last date, if known, on which the address is valid and active.

    - #### setExpirationReason

          public void setExpirationReason(CWE objCWE)

      Sets the Expiration Reason.
      Parameters:
        `objCWE` - specifies why this address was marked as "ended".

    - #### setTemporaryIndicator

          public void setTemporaryIndicator(java.lang.String strTemporaryIndicator)

      Sets the Temporary Indicator.
      Parameters:
        `strTemporaryIndicator` - indicates that the address is considered temporary.

    - #### setTemporaryIndicator

          public void setTemporaryIndicator(ID objID)

      Sets the Temporary Indicator.
      Parameters:
        `objID` - indicates that the address is considered temporary.

    - #### setBadAddressIndicator

          public void setBadAddressIndicator(java.lang.String strBadAddressIndicator)

      Sets the Bad Address Indicator.
      Parameters:
        `strBadAddressIndicator` - indicates that it is not possible to contact the "owning" entity at this address.

    - #### setBadAddressIndicator

          public void setBadAddressIndicator(ID objID)

      Sets the Bad Address Indicator.
      Parameters:
        `objID` - indicates that it is not possible to contact the "owning" entity at this address.

    - #### setAddressUsage

          public void setAddressUsage(java.lang.String strAddressUsage)

      Sets the Address Usage.
      Parameters:
        `strAddressUsage` - indicates how the address is intended to be used.

    - #### setAddressUsage

          public void setAddressUsage(ID objID)

      Sets the Address Usage.
      Parameters:
        `objID` - indicates how the address is intended to be used.

    - #### setAddressee

          public void setAddressee(java.lang.String strAddressee)

      Sets the Addressee .
      Parameters:
        `strAddressee` - Identifies the name of the person or organization.

    - #### setAddressee

          public void setAddressee(ST objST)

      Sets the Addressee .
      Parameters:
        `objST` - Identifies the name of the person or organization.

    - #### setComment

          public void setComment(java.lang.String strComment)

      Sets the Comment .
      Parameters:
        `strComment` - specifies Descriptive information about the use of the address.

    - #### setComment

          public void setComment(ST objST)

      Sets the Comment .
      Parameters:
        `objST` - specifies Descriptive information about the use of the address.

    - #### setPreferenceOrder

          public void setPreferenceOrder(java.lang.String strPreferenceOrder)

      Sets the Preference Order .
      Parameters:
        `strPreferenceOrder` - indicates which is the 'most preferred' (lowest number) to 'least preferred' (highest number).

    - #### setPreferenceOrder

          public void setPreferenceOrder(NM objNM)

      Sets the Preference Order .
      Parameters:
        `objNM` - indicates which is the 'most preferred' (lowest number) to 'least preferred' (highest number).

    - #### setProtectionCode

          public void setProtectionCode(CWE objCWE)

      Sets the Preference Code .
      Parameters:
        `objCWE` - Identifies that an address needs to be treated with special care or sensitivity.

    - #### setAddressIdentifier

          public void setAddressIdentifier(EI objEI)

      Sets the Address Identifier .
      Parameters:
        `objEI` - Identifies A unique identifier for the address.

    - #### getStreetAddress

          public SAD getStreetAddress()

      Returns Street Address
      Returns:
        SAD - data type.

    - #### getOtherDesignation

          public ST getOtherDesignation()

      Returns Other Designation
      Returns:
        ST - data type.

    - #### getCity

          public ST getCity()

      Returns City
      Returns:
        ST - data type.

    - #### getStateOrProvince

          public ST getStateOrProvince()

      Returns State or Province
      Returns:
        ST - data type.

    - #### getZipOrPostalCode

          public ST getZipOrPostalCode()

      Returns Zip or Postal Code
      Returns:
        ST - data type.

    - #### getCountry

          public ID getCountry()

      Returns Country
      Returns:
        ID - data type.

    - #### getAddressType

          public ID getAddressType()

      Returns Address Type
      Returns:
        ID - data type.

    - #### getOtherGeographicDesignation

          public ST getOtherGeographicDesignation()

      Returns Other Geographic Designation
      Returns:
        ST - data type.

    - #### getCountyParishCode

          public CWE getCountyParishCode()

      Returns County/Parish Code
      Returns:
        CWE - data type.

    - #### getCensusTract

          public CWE getCensusTract()

      Returns Census Tract
      Returns:
        CWE - data type.

    - #### getAddressRepresentationCode

          public ID getAddressRepresentationCode()

      Returns Address Representation Code
      Returns:
        ID - data type.

    - #### getEffectiveDate

          public DTM getEffectiveDate()

      Returns Effective Date
      Returns:
        DTM - data type.

    - #### getExpirationDate

          public DTM getExpirationDate()

      Returns Expiration Date
      Returns:
        DTM - data type.

    - #### getExpirationReason

          public CWE getExpirationReason()

      Returns Expiration Reason
      Returns:
        CWE - data type.

    - #### getTemporaryIndicator

          public ID getTemporaryIndicator()

      Returns Temporary Indicator
      Returns:
        ID - data type.

    - #### getBadAddressIndicator

          public ID getBadAddressIndicator()

      Returns Bad Address Indicator
      Returns:
        ID - data type.

    - #### getAddressUsage

          public ID getAddressUsage()

      Returns Address UsagE
      Returns:
        ID - data type.

    - #### getAddressee

          public ST getAddressee()

      Returns Addressee
      Returns:
        ST - data type.

    - #### getComment

          public ST getComment()

      Returns Comment
      Returns:
        st - data type.

    - #### getPreferenceOrder

          public NM getPreferenceOrder()

      Returns Preference Order
      Returns:
        NM - data type.

    - #### getProtectionCode

          public CWE getProtectionCode()

      Returns Protection Code
      Returns:
        CWE - data type.

    - #### getAddressIdentifier

          public EI getAddressIdentifier()

      Returns Address Identifier
      Returns:
        EI - data type.

    - #### equals

          public boolean equals(java.lang.Object objObject)

      This method checks the equality of Object.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `objObject` - object of Object class.
      Returns:
        boolean - shows success or failure of the comparison.