本文整理匯總了Java中com.amazonaws.mturk.requester.ReviewActionDetail類的典型用法代碼示例。如果您正苦於以下問題:Java ReviewActionDetail類的具體用法?Java ReviewActionDetail怎麽用?Java ReviewActionDetail使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ReviewActionDetail類屬於com.amazonaws.mturk.requester包,在下文中一共展示了ReviewActionDetail類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: printReviewReport
import com.amazonaws.mturk.requester.ReviewActionDetail; //導入依賴的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();
}
}