edu.wpi.prc.tools.extractor
Class ResultExtractor
java.lang.Object
edu.wpi.prc.tools.extractor.ResultExtractor
public class ResultExtractor
- extends java.lang.Object
Retrieves all result data from the project server and writes it to disk.
- Author:
- James Baldassari
Method Summary |
private static boolean |
getResults(java.lang.String serverAddress,
java.lang.String password)
Gets the vector containing all valid result data from the project server. |
static void |
main(java.lang.String[] args)
Gets all valid results from the server and writes them out to disk. |
private static boolean |
writeResultsToDisk()
Writes all result data to disk. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EXIT_SUCCESS
private static final int EXIT_SUCCESS
- See Also:
- Constant Field Values
EXIT_ERROR
private static final int EXIT_ERROR
- See Also:
- Constant Field Values
RESULTS_DIR
private static final java.lang.String RESULTS_DIR
- See Also:
- Constant Field Values
RESULT_FILE
private static final java.lang.String RESULT_FILE
- See Also:
- Constant Field Values
project
private static Project project
validResults
private static java.util.Vector validResults
ResultExtractor
public ResultExtractor()
getResults
private static boolean getResults(java.lang.String serverAddress,
java.lang.String password)
- Gets the vector containing all valid result data from the project server.
- Parameters:
serverAddress
- The address of the project server.password
- The project password.
- Returns:
- Returns true if the RPC was successful, false otherwise.
writeResultsToDisk
private static boolean writeResultsToDisk()
throws java.io.IOException
- Writes all result data to disk. This method creates a new directory
in RESULTS_DIR for each work unit. The result data is written to the
file RESULT_FILE inside the directory of its associated work unit.
- Returns:
- Returns false if any of the work unit directories could not be created, true otherwise.
- Throws:
java.io.IOException
main
public static void main(java.lang.String[] args)
- Gets all valid results from the server and writes them out to disk.
Each work unit will have its own folder in the RESULTS_DIR directory,
whose name is the task ID of the work unit. Inside each work unit
directory there will be a file called "result.dat" which contains
the result data for that work unit.
- Parameters:
args
- Command-line arguments.