本文整理汇总了Java中com.amazonaws.mturk.requester.ReviewResultDetail类的典型用法代码示例。如果您正苦于以下问题:Java ReviewResultDetail类的具体用法?Java ReviewResultDetail怎么用?Java ReviewResultDetail使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ReviewResultDetail类属于com.amazonaws.mturk.requester包,在下文中一共展示了ReviewResultDetail类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: printReviewReport
import com.amazonaws.mturk.requester.ReviewResultDetail; //导入依赖的package包/类
/**
* Helper function for printReviewResults: prints the contents of a
* ReviewReport object.
* @param report The ReviewReport object to print
* @param policyName The name of the policy associated with the given report
*/
private void printReviewReport(ReviewReport report, String policyName) {
if (report == null) {
System.out.println("No data for policy " + policyName);
} else {
// Print review results
ReviewResultDetail[] results = report.getReviewResult();
if (results == null) {
System.out.println("No results for policy " + policyName);
} else {
System.out.println("Results for policy " + policyName + ":");
for (ReviewResultDetail result : results) {
String subjectType = result.getSubjectType();
String subjectId = result.getSubjectId();
String questionId = result.getQuestionId();
String key = result.getKey();
String value = result.getValue();
if (questionId == null || questionId.equals("")) {
System.out.println("- " + subjectType + " " + subjectId + ": " + key + " is " + value);
} else {
System.out.println("- " + subjectType + " " + subjectId + ": " + key + " for " + questionId + " is " + value);
}
}
}
System.out.println();
// Print review actions
ReviewActionDetail[] actions = report.getReviewAction();
if (actions == null) {
System.out.println("No actions for policy " + policyName);
} else {
System.out.println("Actions for policy " + policyName + ":");
for (ReviewActionDetail action : actions) {
String actionName = action.getActionName();
String actionStatus = action.getStatus().toString();
String objectId = action.getObjectId();
String objectType = action.getObjectType();
String resultDescription = action.getResult();
System.out.println("- Action " + actionName + " on " + objectType + " " + objectId + ": " + actionStatus);
System.out.println(" Result: " + resultDescription);
}
}
System.out.println();
}
}