cdac.medinfo.sdk.hl7282.baselibs.segments

## Class RDF

- java.lang.Object
- - cdac.medinfo.sdk.hl7282.baselibs.segments.Segment
  - - cdac.medinfo.sdk.hl7282.baselibs.segments.RDF

- All Implemented Interfaces:
    ISegment

      public class RDF
      extends Segment

  RDF - table row definition segment.

  The RDF segment defines the content of the row data segments (RDT) in the tabular response (RTB).

  Represents an HL7 RDF message segment. This segment has the following fields:

  RDF-1: Number of Columns per Row (NM)Required
  RDF-2: Column Description (RCD)Required

  This class provides mechanism to validate message against HL7 v 2.8.2 standard. The class provides accessors & mutators for the elements mentioned above. The class has validate method which validates Message against HL7 v 2.8.2 standard.

  User can also create Segment through `SegmentFactory`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RDF()` Constucts the RDF segment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addColumnDescription(RCD objtempColumnDescription)` Set the Column Description.
    `void` | `addColumnDescription(java.lang.String strSegmentFieldName, java.lang.String strHL7DataType, java.lang.String strMaxColumnWidth)` Set the Column Description.
    `ISingleCollection<RCD>` | `getColumnDescription()` Retrieves the Column Description.
    `NM` | `getNumberofColumnsperRow()` Retrieves the Number of Columns per Row.
    `void` | `setColumnDescription(ISingleCollection<RCD> objColumnDescriptionList)` Set the Column Description.
    `void` | `setNumberofColumnsperRow(NM objnumberofColumnsperRow)` Set the Number of Columns per Row.
    `void` | `setNumberofColumnsperRow(java.lang.String strPolicyLimitDays)` Set the Number of Columns per Row.
    `boolean` | `validate()` Validates HL7 Message objects .

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

      `addUnRecognizedField, dumpSegment, getFields, getName, getUnrecognizedFields, moveToNextSegment, parse, removeDataElement, removeDataElement, serialize, setName, setUnRecognizedField, updateDataElement, updateDataElement, writeToXML`

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

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

- - ### Constructor Detail

    - #### RDF

          public RDF()

      Constucts the RDF segment.

  - ### Method Detail

    - #### getColumnDescription

          public ISingleCollection<RCD> getColumnDescription()

      Retrieves the Column Description.
      Returns:
        ISingleCollection - columnDescription

    - #### getNumberofColumnsperRow

          public NM getNumberofColumnsperRow()

      Retrieves the Number of Columns per Row.
      Returns:
        NM - numberofColumnsperRow

    - #### addColumnDescription

          public void addColumnDescription(java.lang.String strSegmentFieldName,
                                  java.lang.String strHL7DataType,
                                  java.lang.String strMaxColumnWidth)

      Set the Column Description.
      Parameters:
        `strSegmentFieldName` - Identifies the field occupying the column.
        `strHL7DataType` - The two or three character HL7 data type.
        `strMaxColumnWidth` - The maximum width of the column, as dictated by the responding system.

    - #### addColumnDescription

          public void addColumnDescription(RCD objtempColumnDescription)

      Set the Column Description.
      Parameters:
        `objtempColumnDescription` - object of ColumnDescription

    - #### setColumnDescription

          public void setColumnDescription(ISingleCollection<RCD> objColumnDescriptionList)

      Set the Column Description.
      Parameters:
        `objColumnDescriptionList` - List of Column Description

    - #### setNumberofColumnsperRow

          public void setNumberofColumnsperRow(java.lang.String strPolicyLimitDays)

      Set the Number of Columns per Row.
      Parameters:
        `strPolicyLimitDays` - Specifies the maximum number of days that the insurance policy will cover.

    - #### setNumberofColumnsperRow

          public void setNumberofColumnsperRow(NM objnumberofColumnsperRow)

      Set the Number of Columns per Row.
      Parameters:
        `objnumberofColumnsperRow` - object of NumberofColumnsperRow

    - #### validate

          public boolean validate()
                           throws InvalidSegmentException

      Validates HL7 Message objects . Validate method checks for validation each and every segments in side the Message object against specified message Structure. Validation chcecks include optionality of segment or group. It also verifies the number of times segment or group is repeated in message. e.g {PSH} while parsing PSH segment validate method will check for its mandatory presence. [PSH] in this case validate will throw exception if one tries to enter more than one PSH segment.
      Specified by:
        `validate` in interface `ISegment`
      Overrides:
        `validate` in class `Segment`
      Returns:
        boolean - true or false.
      Throws:
        `InvalidSegmentException` - Throws when Segment Validation fails.