The government of Maldives, the tourist paradise in the Indian Ocean, has imposed a state of emergency and arrested two senior judges in what the president says is a bid to foil a coup.