A jury’s conviction of a former Dartmouth Police office for the rape of a child has been set aside by a court.