cdac.medinfo.sdk.hl7282.baselibs.datatypefactory

## Class DataTypeMap

- java.lang.Object
- - cdac.medinfo.sdk.hl7282.baselibs.datatypefactory.DataTypeMap

- All Implemented Interfaces:
    IDataTypeMap

      public final class DataTypeMap
      extends java.lang.Object
      implements IDataTypeMap

  DataTypeMap class is the implementation of IDataTypeMap. DataTypeMap represents structure of a DataType as defined in HL7 standard. It includes index for Component item sequence defined in DataType structure. Index for Component Item starts with 1.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataTypeMap()` Instantiates DataTypeMap

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addComponentItem(IComponentItem objComponentItem)` Adds ComponentItem to IDataTypeMap at current available index.
    `void` | `addComponentItem(IComponentItem objComponentItem, int index, EnumMapModifyMode enumModifyMode)` Adds ComponentItem to IDataTypeMap at given index position according to the modification mode.
    `IDataTypeMap` | `clone()` Retrieves a clone of IDataTypeMap
    `IComponentItem` | `getComponentItem(int iSequenceNo)` Retrieves IComponentItem for defined index.
    `java.lang.String` | `getDataTypeName(int iSequenceNo)` Retrieves the Data Type name of an Item specified by HL7 Standard for the specified Item.
    `java.lang.String` | `getFieldName(int iSequenceNo)` Retrieves the Field name of an Item specified by HL7 Standard for the specified Item.
    `java.lang.String` | `getItemConformanceLength(int iSequenceNo)` Retrieves the Conformance Length of an Item specified by HL7 Standard for the specified Item.
    `int` | `getItemMaximumLength(int iSequenceNo)` Retrieves the Maximum Length of an Item specified by HL7 Standard for the specified Item.
    `int` | `getItemMinimumLength(int iSequenceNo)` Retrieves the Minimum Length of an Item specified by HL7 Standard for the specified Item.
    `boolean` | `getLock()` Retrieves current status of lock for IDataTypeMap
    `ISingleCollection<java.lang.Integer>` | `getSequenceNumberList()` Retrieves the list of Item ID of all AttributeItems which are member of ISEgmentMap.
    `int[]` | `getValueTable(int iSequenceNo)` Retrieves the Table value specified by HL7 Standard for the specified Item ID.
    `boolean` | `isOptional(int iSequenceNo)` Retrieves the status indicating whether the specified Item ID is optional or not.
    `void` | `setLock(boolean bLock)` Sets lock on IDataTypeMap.
    `int` | `size()` Retrieves size of IDataTypeMap

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

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

- - ### Constructor Detail

    - #### DataTypeMap

          public DataTypeMap()

      Instantiates DataTypeMap

  - ### Method Detail

    - #### setLock

          public void setLock(boolean bLock)

      Sets lock on IDataTypeMap. If lock is set then new ComponentItem can not be added in DataTypeMap
      Specified by:
        `setLock` in interface `IDataTypeMap`
      Parameters:
        `bLock` - value of lock

    - #### getLock

          public boolean getLock()

      Retrieves current status of lock for IDataTypeMap
      Specified by:
        `getLock` in interface `IDataTypeMap`
      Returns:
        boolean - status of lock

    - #### getComponentItem

          public IComponentItem getComponentItem(int iSequenceNo)

      Retrieves IComponentItem for defined index. Map index starts with 1.
      Specified by:
        `getComponentItem` in interface `IDataTypeMap`
      Parameters:
        `iSequenceNo` - sequence value for Component.
      Returns:
        IComponentItem instance of ComponentItem

    - #### addComponentItem

          public void addComponentItem(IComponentItem objComponentItem)

      Adds ComponentItem to IDataTypeMap at current available index. Adds ComponentItem only if map is not in lock state. In Lock state map can be modified only if LocalExtension feature is supported.
      Specified by:
        `addComponentItem` in interface `IDataTypeMap`
      Parameters:
        `objComponentItem` - instance of Component Item

    - #### addComponentItem

          public void addComponentItem(IComponentItem objComponentItem,
                              int index,
                              EnumMapModifyMode enumModifyMode)

      Adds ComponentItem to IDataTypeMap at given index position according to the modification mode. Adds ComponentItem only if map is not in lock state. In Lock state map can be modified only if LocalExtension feature is supported.
      Specified by:
        `addComponentItem` in interface `IDataTypeMap`
      Parameters:
        `objComponentItem` - instance of Component Item
        `index` - sequence position
        `enumModifyMode` - enumerated value of modification mode

    - #### size

          public int size()

      Description copied from interface: `IDataTypeMap`
      Retrieves size of IDataTypeMap
      Specified by:
        `size` in interface `IDataTypeMap`
      Returns:
        int - total number of Component Items

    - #### getValueTable

          public int[] getValueTable(int iSequenceNo)

      Retrieves the Table value specified by HL7 Standard for the specified Item ID.
      Specified by:
        `getValueTable` in interface `IDataTypeMap`
      Parameters:
        `iItemID` - Integer value of Sequence number.
      Returns:
        int[] - return array of Table value for specified Item ID.

    - #### getItemMinimumLength

          public int getItemMinimumLength(int iSequenceNo)

      Retrieves the Minimum Length of an Item specified by HL7 Standard for the specified Item.
      Specified by:
        `getItemMinimumLength` in interface `IDataTypeMap`
      Parameters:
        `iItemID` - Integer value of Sequence number.
      Returns:
        int - return Minimum Length value for specified Item ID.

    - #### getItemMaximumLength

          public int getItemMaximumLength(int iSequenceNo)

      Retrieves the Maximum Length of an Item specified by HL7 Standard for the specified Item.
      Specified by:
        `getItemMaximumLength` in interface `IDataTypeMap`
      Parameters:
        `iItemID` - Integer value of Sequence number.
      Returns:
        int - return Maximum Length value for specified Item ID.

    - #### getItemConformanceLength

          public java.lang.String getItemConformanceLength(int iSequenceNo)

      Retrieves the Conformance Length of an Item specified by HL7 Standard for the specified Item.
      Specified by:
        `getItemConformanceLength` in interface `IDataTypeMap`
      Parameters:
        `iItemID` - Integer value of Sequence number.
      Returns:
        String - return Conformance Length value for specified Item ID.

    - #### getDataTypeName

          public java.lang.String getDataTypeName(int iSequenceNo)

      Retrieves the Data Type name of an Item specified by HL7 Standard for the specified Item.
      Specified by:
        `getDataTypeName` in interface `IDataTypeMap`
      Parameters:
        `iItemID` - Integer value of Item number.
      Returns:
        String - return Data type name for specified Item ID.

    - #### isOptional

          public boolean isOptional(int iSequenceNo)

      Retrieves the status indicating whether the specified Item ID is optional or not.
      Specified by:
        `isOptional` in interface `IDataTypeMap`
      Parameters:
        `iItemID` - Integer value of Sequence number.
      Returns:
        boolean - the status indicating whether the specified Item ID is optional or not.

    - #### getFieldName

          public java.lang.String getFieldName(int iSequenceNo)

      Retrieves the Field name of an Item specified by HL7 Standard for the specified Item.
      Specified by:
        `getFieldName` in interface `IDataTypeMap`
      Parameters:
        `iItemID` - Integer value of Sequence number.
      Returns:
        String - return Field name for specified Item ID.

    - #### clone

          public IDataTypeMap clone()

      Retrieves a clone of IDataTypeMap
      Specified by:
        `clone` in interface `IDataTypeMap`
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:
        IDataTypeMap - instance of IDataTypeMap

    - #### getSequenceNumberList

          public ISingleCollection<java.lang.Integer> getSequenceNumberList()

      Retrieves the list of Item ID of all AttributeItems which are member of ISEgmentMap.
      Specified by:
        `getSequenceNumberList` in interface `IDataTypeMap`
      Returns:
        ISingleCollection - return collection of Item ID.