Latching control of a raft-type wave energy converter with a hydraulic power take-off system