}
String cname = fields[7].trim();
if (isNA(cname)) {
if (mtype == MTypeType.DIFF) {
throw new ObservationValidationError(
"Magnitude type is differential but there is no CNAME.");
} else {
cname = "";
}
} else {
cname += ": ";
}
String cmagStr = fields[8].trim();
if (!isNA(cmagStr)) {
// Note: Could CKMagValidator here, but its max field width
// seems not to represent the reality of some instrumental
// magnitudes, for example.
double cmag = magnitudeValueValidator.validate(cmagStr);
observation.setCMag(cname + cmag);
}
String kname = fields[9].trim();
if (isNA(kname)) {
kname = "";
} else {
kname += ": ";
}
String kmagStr = fields[10].trim();
if (!isNA(kmagStr)) {
// Note: Could CKMagValidator here, but its max field width
// seems not to represent the reality of some instrumental
// magnitudes, for example.
double kmag = magnitudeValueValidator.validate(kmagStr);
observation.setKMag(kname + kmag);
}
String airmass = fields[11].trim();
if (!isNA(airmass)) {
observation.setAirmass(airmass);
}
String group = fields[12].trim();
if (group.length() > 5) {
throw new ObservationValidationError(
"GROUP has more than 5 characters.");
}
String chart = fields[13].trim();
if (!isNA(chart)) {