| 388 | | String body = null; |
| 389 | | if (annot instanceof ArticleAnnotation) |
| 390 | | body = new String(((ArticleAnnotation)annot).getBody().getBody(), annotationService.getEncodingCharset()); |
| 391 | | else if (annot instanceof Reply) |
| 392 | | body = new String(((Reply)annot).getBody().getBody(), annotationService.getEncodingCharset()); |
| 393 | | else if (annot instanceof Rating) { |
| | 388 | String body = ""; |
| | 389 | if (annot instanceof ArticleAnnotation) { |
| | 390 | ArticleAnnotation annotation = (ArticleAnnotation) annot; |
| | 391 | if (annotation.getBody() != null) |
| | 392 | body = new String(annotation.getBody().getBody(), annotationService.getEncodingCharset()); |
| | 393 | } else if (annot instanceof Reply) { |
| | 394 | Reply reply = (Reply) annot; |
| | 395 | if (reply.getBody() != null) |
| | 396 | body = new String(reply.getBody().getBody(), annotationService.getEncodingCharset()); |
| | 397 | } else if (annot instanceof Rating) { |
| 395 | | StringBuilder ratingBody = new StringBuilder(); |
| 396 | | ratingBody.append("<div><ul>"); |
| 397 | | if (content.getSingleRatingValue() > 0) { |
| 398 | | ratingBody.append("<li>Rating: ") |
| 399 | | .append(Integer.toString(content.getSingleRatingValue())) |
| 400 | | .append("</li>"); |
| 401 | | } else { |
| 402 | | ratingBody.append("<li>Insight: ") |
| 403 | | .append(Integer.toString(content.getInsightValue())) |
| 404 | | .append("</li>") |
| 405 | | .append("<li>Reliability: ") |
| 406 | | .append(Integer.toString(content.getReliabilityValue())) |
| 407 | | .append("</li>") |
| 408 | | .append("<li>Style: ") |
| 409 | | .append(Integer.toString(content.getStyleValue())) |
| 410 | | .append("</li>"); |
| 411 | | } |
| 412 | | ratingBody.append("</ul></div>") |
| | 399 | if (content != null) { |
| | 400 | StringBuilder ratingBody = new StringBuilder(); |
| | 401 | ratingBody.append("<div><ul>"); |
| | 402 | if (content.getSingleRatingValue() > 0) { |
| | 403 | ratingBody.append("<li>Rating: ") |
| | 404 | .append(Integer.toString(content.getSingleRatingValue())) |
| | 405 | .append("</li>"); |
| | 406 | } else { |
| | 407 | ratingBody.append("<li>Insight: ") |
| | 408 | .append(Integer.toString(content.getInsightValue())) |
| | 409 | .append("</li>") |
| | 410 | .append("<li>Reliability: ") |
| | 411 | .append(Integer.toString(content.getReliabilityValue())) |
| | 412 | .append("</li>") |
| | 413 | .append("<li>Style: ") |
| | 414 | .append(Integer.toString(content.getStyleValue())) |
| | 415 | .append("</li>"); |
| | 416 | } |
| | 417 | ratingBody.append("</ul></div>") |