cdac.medinfo.sdk.hl7282.baselibs

## Class AD

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

- All Implemented Interfaces:
    IDataType

      public class AD
      extends CompositeDataType

  AD - Address

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

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

  1. street address (ST)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)Optional
  8. other geographic designation (ST)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
    `AD()` Default constructor for AD.
    `AD(int iComponentType, IDataTypeMap objIDataTypeMap)` Constructor for AD class which takes three arguments and sets the value in the respective member variable.
    `AD(int iComponentType, int iMinLength, int iMaxLength, java.lang.String strCLength, IDataTypeMap objIDataTypeMap)` Constructor for AD class which takes five arguments and sets the value in the respective member variable.
    `AD(int iComponentType, int iMinLength, int iMaxLength, java.lang.String strCLength, int ITableNo, IDataTypeMap objIDataTypeMap)` Constructor for AD class which takes six arguments and sets the value in the respective member variable.
    `AD(int iMinLength, int iMaxLength, java.lang.String strCLength, int iComponentType)` Constructor for AD class which takes four arguments and sets the value in the respective member variable.
    `AD(int iMinLength, int iMaxLength, java.lang.String strCLength, int iTableNo, int iComponentType)` Constructor for AD 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.
    `ID` | `getAddressType()` Returns Address Type
    `ST` | `getCity()` Returns City
    `ID` | `getCountry()` Returns Country
    `ST` | `getOtherDesignation()` Returns Other Designation
    `ST` | `getOtherGeographicDesignation()` Returns Other Geographic Designation
    `ST` | `getStateOrProvince()` Returns State or Province
    `ST` | `getStreetAddress()` Returns Street Address.
    `ST` | `getZipOrPostalCode()` Returns Zip or Postal Code
    `void` | `setAddressType(ID objID)` Sets the Address Type.
    `void` | `setAddressType(java.lang.String strAddressType)` Sets the Address Type.
    `void` | `setCity(ST objST)` Sets the City.
    `void` | `setCity(java.lang.String strCity)` Sets the City.
    `void` | `setCountry(ID objID)` Sets the Country.
    `void` | `setCountry(java.lang.String strCountry)` Sets the Country.
    `void` | `setOtherDesignation(ST objST)` Sets the Other Designation.
    `void` | `setOtherDesignation(java.lang.String strOtherDesignation)` Sets the Other Designation.
    `void` | `setOtherGeographicDesignation(ST objST)` Sets the Other Geographic Designation.
    `void` | `setOtherGeographicDesignation(java.lang.String strOtherGeographicDesignation)` Sets the Other Geographic Designation.
    `void` | `setStateOrProvince(ST objST)` Sets the State Or Province.
    `void` | `setStateOrProvince(java.lang.String strStateOrProvince)` Sets the State Or Province.
    `void` | `setStreetAddress(ST objST)` Sets the Street Address.
    `void` | `setStreetAddress(java.lang.String strStreetAddress)` Sets the Street Address.
    `void` | `setZipOrPostalCode(ST objST)` Sets the Zip Or Postal Code.
    `void` | `setZipOrPostalCode(java.lang.String strZipOrPostalCode)` Sets the Zip Or Postal Code.

    - ### 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

    - #### AD

          public AD()

      Default constructor for AD.

    - #### AD

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

      Constructor for AD 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.

    - #### AD

          public AD(int iMinLength,
            int iMaxLength,
            java.lang.String strCLength,
            int iTableNo,
            int iComponentType)

      Constructor for AD 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.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

    - #### AD

          public AD(int iComponentType,
            IDataTypeMap objIDataTypeMap)

      Constructor for AD class which takes three 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.

    - #### AD

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

      Constructor for AD 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.

    - #### AD

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

      Constructor for AD class which takes six arguments and sets the value in the respective member variable.
      Parameters:
        `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.
        `objIDataTypeMap` - object of Data Type Map.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

  - ### Method Detail

    - #### setStreetAddress

          public void setStreetAddress(java.lang.String strStreetAddress)

      Sets the Street Address.
      Parameters:
        `strStreetAddress` - Specifies the street or mailing address of a person or institution.

    - #### setStreetAddress

          public void setStreetAddress(ST objST)

      Sets the Street Address.
      Parameters:
        `objST` - object of Street Address.

    - #### setOtherDesignation

          public void setOtherDesignation(java.lang.String strOtherDesignation)

      Sets the Other Designation.
      Parameters:
        `strOtherDesignation` - Specifies the second line of address.

    - #### setOtherDesignation

          public void setOtherDesignation(ST objST)

      Sets the Other Designation.
      Parameters:
        `objST` - object of Other Designation.

    - #### setCity

          public void setCity(java.lang.String strCity)

      Sets the City.
      Parameters:
        `strCity` - Specifies the city, district or place where the addressee is located depending upon the national convention for formatting addresses for postal usage.

    - #### setCity

          public void setCity(ST objST)

      Sets the City.
      Parameters:
        `objST` - object of city, Specifies the city, district or place where the addressee is located depending upon the national convention for formatting addresses for postal usage.

    - #### setStateOrProvince

          public void setStateOrProvince(java.lang.String strStateOrProvince)

      Sets the State Or Province.
      Parameters:
        `strStateOrProvince` - Specifies the state or province where the addressee is located.

    - #### setStateOrProvince

          public void setStateOrProvince(ST objST)

      Sets the State Or Province.
      Parameters:
        `objST` - object Specifies the state or province where the addressee is located.

    - #### setZipOrPostalCode

          public void setZipOrPostalCode(java.lang.String strZipOrPostalCode)

      Sets the Zip Or Postal Code.
      Parameters:
        `strZipOrPostalCode` - Specifies the zip or postal code where the addressee is located.

    - #### setZipOrPostalCode

          public void setZipOrPostalCode(ST objST)

      Sets the Zip Or Postal Code.
      Parameters:
        `objST` - object Sets the Zip Or Postal Code.

    - #### setCountry

          public void setCountry(java.lang.String strCountry)

      Sets the Country.
      Parameters:
        `strCountry` - Specifies the country where the addressee is located. Refer to HL7 Table 0399.

    - #### setCountry

          public void setCountry(ID objID)

      Sets the Country.
      Parameters:
        `objID` - object of Country.

    - #### setAddressType

          public void setAddressType(java.lang.String strAddressType)

      Sets the Address Type.
      Parameters:
        `strAddressType` - Specifies the kind or type of address. Refer to HL7 Table 0190 - Address Type.

    - #### setAddressType

          public void setAddressType(ID objID)

      Sets the Address Type.
      Parameters:
        `strAddressType` - Specifies the kind or type of address. Refer to HL7 Table 0190 - Address Type.

    - #### setOtherGeographicDesignation

          public void setOtherGeographicDesignation(java.lang.String strOtherGeographicDesignation)

      Sets the Other Geographic Designation.
      Parameters:
        `strOtherGeographicDesignation` - Specifies any other geographic designation that may be necessary.

    - #### setOtherGeographicDesignation

          public void setOtherGeographicDesignation(ST objST)

      Sets the Other Geographic Designation.
      Parameters:
        `objST` - object Specifies any other geographic designation that may be necessary.

    - #### getStreetAddress

          public ST getStreetAddress()

      Returns Street Address.
      Returns:
        ST - 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.

    - #### 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.