San Diego federal judge largely upholds state’s private prison ban