net.codescore.exe
Class DiffExecutor

java.lang.Object
  extended by net.codescore.exe.DiffExecutor

public class DiffExecutor
extends Object

Executes a diff comparison on the standard output of a submission. This class expects that the diff executable is on the path.

Author:
Adam Cornett

Field Summary
private  org.apache.commons.logging.Log log
           
private  ProcessBuilder pb
           
private  boolean sideBySide
           
private  Submission sub
           
 
Constructor Summary
DiffExecutor(Submission s)
           
 
Method Summary
 String getDiff()
          Get the output of diff.
Makes this call:
diff TeamSubmission.getExpectedStdOutFile() TeamSubmission.getExecuteStdOutFile()
private  void initPB()
           
 boolean isSideBySide()
           
 void setSideBySide(boolean sideBySide)
          Generate a Side-By-Side diff, this is used for judging, the same as adding a '-y' option to the diff command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private org.apache.commons.logging.Log log

pb

private ProcessBuilder pb

sideBySide

private boolean sideBySide

sub

private final Submission sub
Constructor Detail

DiffExecutor

public DiffExecutor(Submission s)
Method Detail

getDiff

public String getDiff()
               throws InterruptedException,
                      IOException
Get the output of diff.
Makes this call:
diff TeamSubmission.getExpectedStdOutFile() TeamSubmission.getExecuteStdOutFile()

Returns:
Throws:
InterruptedException
IOException

isSideBySide

public boolean isSideBySide()

setSideBySide

public void setSideBySide(boolean sideBySide)
Generate a Side-By-Side diff, this is used for judging, the same as adding a '-y' option to the diff command.

Parameters:
sideBySide -

initPB

private void initPB()


Copyright 2008 © Adam Cornett, Andrew Conner All Rights Reserved.