Judge sentences St. Marys resident to 25 years in prison for rape