Fix Issue #938: Added the enhancement - fully parsing of CRD
Summary of changes (CRD.java, CRDConfiguration.java, CRDHeader.java, CRDParser.java, and CRDParserTest.java):
- Two classes are added,
NptRangeMeasurement
andFrRangeMeasurement
, which extend fromRangeMeasurement
. - The configuration records are stored as a Map in the class
CRDConfiguration
, and the system configuration records are also store in a list, to support 2-color range system. - Comment lines can occur anywhere within a file, especially the begining of the file.
- Handle 'na'. The literal “na” is used instead of “-1” for fields that are not applicable or not avaiable.
- The configuration records can occur after H2 or H3, not only H4, for the case of many targets and single system configuration.
- Add a method
toCrdString()
to all configuration records and data records. - Add
getH1CrdString()
,getH2CrdString()
,getH3CrdString()
,getH4CrdString()
, to the classCRDHeader
, so that a crd file can be reproduced.
Added unittest testIssue938()
in the class CRDParserTest
to check if it is working correctly.