* @throws ServiceException If the service is unable to handle the request.
*/
private static void addRating(BooksService service,
String volumeId, int value)
throws IOException, ServiceException {
VolumeEntry newEntry = new VolumeEntry();
newEntry.setId(volumeId);
Rating rating = new Rating();
rating.setMin(1);
rating.setMax(5);
rating.setValue(value);
newEntry.setRating(rating);
try {
service.insert(new URL(USER_ANNOTATION_FEED), newEntry);
} catch (ServiceException se) {
System.out.println("There was an error adding your rating.\n");
return;