A federal judge has ruled that Apple violated antitrust law in conspiring with publishers to raise prices of e-books, which the New York Times says may affect how the company cuts deals with media companies that help make its iPhones and iPads compelling.