Facet calibration for LOFAR