Java 类com.amazonaws.mturk.addon.HITTypeResults 实例源码

项目:java-aws-mturk    文件:Reviewer.java   
/**
 * Prints the submitted results of HITs when provided with a .success file.
 * @param successFile The .success file containing the HIT ID and HIT Type ID
 * @param outputFile The output file to write the submitted results to
 */
public void printResults(String successFile, String outputFile) {

  try {

    //Loads the .success file containing the HIT IDs and HIT Type IDs of HITs to be retrieved.
    HITDataInput success = new HITDataCSVReader(successFile);

    //Retrieves the submitted results of the specified HITs from Mechanical Turk
    HITTypeResults results = service.getHITTypeResults(success);
    results.setHITDataOutput(new HITDataCSVWriter(outputFile));

    //Writes the submitted results to the defined output file.
    //The output file is a tab delimited file containing all relevant details
    //of the HIT and assignments.  The submitted results are included as the last set of fields
    //and are represented as tab separated question/answer pairs
    results.writeResults();

    System.out.println("Results have been written to: " + outputFile);

  } catch (Exception e) {
    System.err.println("ERROR: Could not print results: " + e.getLocalizedMessage());
  }
}
项目:mturksdk-java-code-maven    文件:Reviewer.java   
/**
 * Prints the submitted results of HITs when provided with a .success file.
 * @param successFile The .success file containing the HIT ID and HIT Type ID
 * @param outputFile The output file to write the submitted results to
 */
public void printResults(String successFile, String outputFile) {

  try {

    //Loads the .success file containing the HIT IDs and HIT Type IDs of HITs to be retrieved.
    HITDataInput success = new HITDataCSVReader(successFile);

    //Retrieves the submitted results of the specified HITs from Mechanical Turk
    HITTypeResults results = service.getHITTypeResults(success);
    results.setHITDataOutput(new HITDataCSVWriter(outputFile));

    //Writes the submitted results to the defined output file.
    //The output file is a tab delimited file containing all relevant details
    //of the HIT and assignments.  The submitted results are included as the last set of fields
    //and are represented as tab separated question/answer pairs
    results.writeResults();

    System.out.println("Results have been written to: " + outputFile);

  } catch (Exception e) {
    System.err.println("ERROR: Could not print results: " + e.getLocalizedMessage());
  }
}
项目:hiding    文件:Reviewer.java   
/**
 * Prints the submitted results of HITs when provided with a .success file.
 * @param successFile The .success file containing the HIT ID and HIT Type ID
 * @param outputFile The output file to write the submitted results to
 */
public void printResults(String successFile, String outputFile) {

  try {

    //Loads the .success file containing the HIT IDs and HIT Type IDs of HITs to be retrieved.
    HITDataInput success = new HITDataCSVReader(successFile);

    //Retrieves the submitted results of the specified HITs from Mechanical Turk
    HITTypeResults results = service.getHITTypeResults(success);
    results.setHITDataOutput(new HITDataCSVWriter(outputFile));

    //Writes the submitted results to the defined output file.
    //The output file is a tab delimited file containing all relevant details
    //of the HIT and assignments.  The submitted results are included as the last set of fields
    //and are represented as tab separated question/answer pairs
    results.writeResults();

    System.out.println("Results have been written to: " + outputFile);

  } catch (Exception e) {
    System.err.println("ERROR: Could not print results: " + e.getLocalizedMessage());
  }
}
项目:gort-public    文件:Reviewer.java   
/**
 * Prints the submitted results of HITs when provided with a .success file.
 * @param successFile The .success file containing the HIT ID and HIT Type ID
 * @param outputFile The output file to write the submitted results to
 */
public void printResults(String successFile, String outputFile) {

  try {

    //Loads the .success file containing the HIT IDs and HIT Type IDs of HITs to be retrieved.
    HITDataInput success = new HITDataCSVReader(successFile);

    //Retrieves the submitted results of the specified HITs from Mechanical Turk
    HITTypeResults results = service.getHITTypeResults(success);
    results.setHITDataOutput(new HITDataCSVWriter(outputFile));

    //Writes the submitted results to the defined output file.
    //The output file is a tab delimited file containing all relevant details
    //of the HIT and assignments.  The submitted results are included as the last set of fields
    //and are represented as tab separated question/answer pairs
    results.writeResults();

    System.out.println("Results have been written to: " + outputFile);

  } catch (Exception e) {
    System.err.println("ERROR: Could not print results: " + e.getLocalizedMessage());
  }
}
项目:java-aws-mturk    文件:RequesterService.java   
/**
 * Gets the results for specified HIT types.
 * 
 * @param success  a success file that contains the HITTypes 
 * @return a HITTypeResults object that contains the results of the HITs
 */
public HITTypeResults getHITTypeResults(HITDataInput success) {
  HITTypeResults r = null;
  try {
    r = this.getHITTypeResults(success, null);
  } catch (IOException e) {
    // There shouldn't be any IO exception here
    log.error("IOException thrown.  Did the HIT results get printed somehow?");
  }
  return r;
}
项目:mturksdk-java-code-maven    文件:RequesterService.java   
/**
 * Gets the results for specified HIT types.
 * 
 * @param success  a success file that contains the HITTypes 
 * @return a HITTypeResults object that contains the results of the HITs
 */
public HITTypeResults getHITTypeResults(HITDataInput success) {
  HITTypeResults r = null;
  try {
    r = this.getHITTypeResults(success, null);
  } catch (IOException e) {
    // There shouldn't be any IO exception here
    log.error("IOException thrown.  Did the HIT results get printed somehow?");
  }
  return r;
}