President Barack Obama on Friday defended his administration’s vast data-collection efforts, saying the programs help prevent terrorist attacks and represent only small encroachments of people’s privacy. Here is the transcript of his remarks: