int recordNum = source.getInt("unique_id");
if (!source.wasNull())
ob.setRecordNumber(recordNum);
ob.setDateInfo(new DateInfo(source.getDouble("jd")));
ob.setMagnitude(getNextMagnitude());
ob.setHqUncertainty(getNextPossiblyNullDouble("hq_uncertainty"));
SeriesType band = SeriesType.Unspecified;
String bandNum = getNextPossiblyNullString("band");
if (bandNum != null && !"".equals(bandNum)) {
int num = Integer.parseInt(bandNum);
band = SeriesType.getSeriesFromIndex(num);
}
ob.setBand(band);
ob.setObsCode(getNextPossiblyNullString("observer_code"));
ob.setCommentCode(getNextPossiblyNullString("comment_code"));
ob.setCompStar1(getNextPossiblyNullString("comp_star_1"));
ob.setCompStar2(getNextPossiblyNullString("comp_star_2"));
ob.setCharts(getNextPossiblyNullString("charts"));
ob.setComments(getNextPossiblyNullString("comments"));
ob.setTransformed("yes"
.equals(getNextPossiblyNullString("transformed")) ? true
: false);
ob.setAirmass(getNextPossiblyNullString("airmass"));
ob.setValidationType(getNextValidationType());
ob.setCMag(getNextPossiblyNullString("cmag"));
ob.setKMag(getNextPossiblyNullString("kmag"));
Double hjd = getNextPossiblyNullDouble("hjd");
ob.setHJD(hjd != null ? new DateInfo(hjd) : null);
ob.setName(getNextPossiblyNullString("name"));
// If mtype is null or 0, we use the ValidObservation's
// constructed default (standard magnitude type).