cdac.medinfo.sdk.hl7282.baselibs.segments

## Class FTS

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

- All Implemented Interfaces:
    ISegment

      public class FTS
      extends Segment

  FTS - File trailer segment

  The FTS segment defines the end of a File.

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

  FTS-1: File Batch Count (NM)Optional
  FTS-2: File Trailer Comment (ST)Optional

  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
    `FTS()` Constructs FTS segment

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `NM` | `getFileBatchCount()` Retrieves the File Batch Count.
    `ST` | `getFileTrailerComment()` Retrieves the Batch Comment.
    `void` | `setFileBatchCount(NM objfileBatchCount)` Set the File Batch Count This field contains the count of the individual batches contained within the File
    `void` | `setFileBatchCount(java.lang.String strFileBatchCount)` Set the File Batch Count This field contains the count of the individual batches contained within the File
    `void` | `setFileTrailerComment(ST objfileTrailerComment)` Set the File Trailer Comment.
    `void` | `setFileTrailerComment(java.lang.String strFileTrailerComment)` Set the File Trailer Comment.
    `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

    - #### FTS

          public FTS()

      Constructs FTS segment

  - ### Method Detail

    - #### setFileBatchCount

          public void setFileBatchCount(java.lang.String strFileBatchCount)

      Set the File Batch Count This field contains the count of the individual batches contained within the File
      Parameters:
        `strFileBatchCount` - - String value of FileBatchCount

    - #### setFileBatchCount

          public void setFileBatchCount(NM objfileBatchCount)

      Set the File Batch Count This field contains the count of the individual batches contained within the File
      Parameters:
        `objfileBatchCount` - object of FileBatchCount

    - #### getFileBatchCount

          public NM getFileBatchCount()

      Retrieves the File Batch Count.
      Returns:
        NM - FileBatchCount

    - #### setFileTrailerComment

          public void setFileTrailerComment(java.lang.String strFileTrailerComment)

      Set the File Trailer Comment. This field is a comment field that is not further defined in the HL7 protocol.
      Parameters:
        `strFileTrailerComment` - - String value of Batch Comment

    - #### setFileTrailerComment

          public void setFileTrailerComment(ST objfileTrailerComment)

      Set the File Trailer Comment. This field is a comment field that is not further defined in the HL7 protocol.
      Parameters:
        `objfileTrailerCommentobject` - of File Trailer Comment.

    - #### getFileTrailerComment

          public ST getFileTrailerComment()

      Retrieves the Batch Comment.
      Returns:
        ST - FileTrailerComment

    - #### 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` - Thrown when Segment Validation Fails.