ca.uhn.hl7v2.model.DataTypeException
An object of this class represents a variable-size path for identifying the location of a datum within an HL7 message, which we can use for maintaining parser state and for generating a suitable string key (in the ZYX[a]-b[c]-d-e style) for a piece of data in the message (see toString()). The elements are: segmentID / segmentRepIdx / fieldIdx / fieldRepIdx / compIdx / subcompIdx ("rep" means "repetition") segmentID is a String, the rest are Integers. It is variable-size path-style in that if it has a size of 1, the one element will be the segmentID; if it has a size of two, element 0 will be the segmentID and element 1 will be the segmentRepIdx, etc. This class can't represent a fieldIdx without having segmentID / segmentRepIdx, etc. etc. possible sizes: 0 to 6 inclusive As toString() simply converts this's integer values to strings (1 => "1"), and since for some reason the ZYX[a]-b[c]-d-e style counts b, d, e starting from 1 and a, c from 0 -- it is intended that one store the numeric values in this class starting from 1 for fieldIdx (element 2), compIdx (4) and subcompIdx (5), and from 0 for segmentRepIdx (1) and fieldRepIdx (3). default values provided by setSize() and by toString() do this.