net.codescore.dbo
Class JudgeSolution

java.lang.Object
  extended by org.apache.cayenne.CayenneDataObject
      extended by net.codescore.dbo.CDO
          extended by net.codescore.dbo.auto._JudgeSolution
              extended by net.codescore.dbo.JudgeSolution
All Implemented Interfaces:
Serializable, Comparable<CDO>, ContextObject, Submission, DataObject, Persistent, Validating, XMLSerializable

public class JudgeSolution
extends _JudgeSolution
implements Submission

See Also:
Serialized Form

Field Summary
private  File compileStdErr
           
private  File compileStdOut
           
private  File exeStdErr
           
private  File exeStdOut
           
private  File expStdOut
           
private  File logFile
           
private static SimpleDateFormat sdf
           
private static long serialVersionUID
           
private  File srcFile
           
private  File tempDir
           
 
Fields inherited from class net.codescore.dbo.auto._JudgeSolution
COMPILE_STD_ERR_PROPERTY, COMPILE_STD_OUT_PROPERTY, EXE_STD_ERR_PROPERTY, EXE_STD_OUT_PROPERTY, LANGUAGE_PROPERTY, PID_PK_COLUMN, PROBLEM_PROPERTY, SID_PK_COLUMN, SOURCE_PROPERTY, STATUS_PROPERTY, STD_OUT_DIFF_PROPERTY, TIME_PROPERTY
 
Fields inherited from class net.codescore.dbo.CDO
log
 
Fields inherited from class org.apache.cayenne.CayenneDataObject
objectContext, objectId, persistenceState, snapshotVersion, values
 
Fields inherited from interface org.apache.cayenne.DataObject
DEFAULT_VERSION
 
Constructor Summary
JudgeSolution()
           
 
Method Summary
 File getCompileStdErrFile()
           
 File getCompileStdOutFile()
           
 File getExecuteStdErrFile()
           
 File getExecuteStdOutFile()
           
 File getExpectedStdOutFile()
           
 File getLogFile()
           
 File getSrcFile()
           
 File getTempDir()
           
private  File touchLocalFile(String fName)
           
private  void writeSrcFile()
           
 
Methods inherited from class net.codescore.dbo.auto._JudgeSolution
getCompileStdErr, getCompileStdOut, getExeStdErr, getExeStdOut, getLanguage, getProblem, getSource, getStatus, getStdOutDiff, getTime, setCompileStdErr, setCompileStdOut, setExeStdErr, setExeStdOut, setLanguage, setProblem, setSource, setStatus, setStdOutDiff, setTime
 
Methods inherited from class net.codescore.dbo.CDO
compareTo, equals, getPK, refresh
 
Methods inherited from class org.apache.cayenne.CayenneDataObject
addToManyTarget, appendProperties, decodeFromXML, encodeAsXML, fetchFinished, getDataContext, getObjectContext, getObjectId, getObjEntity, getPersistenceState, getSnapshotVersion, readNestedProperty, readProperty, readPropertyDirectly, removeToManyTarget, setDataContext, setObjectContext, setObjectId, setPersistenceState, setReverseRelationship, setSnapshotVersion, setToOneTarget, toString, toStringBuffer, unsetReverseRelationship, validateForDelete, validateForInsert, validateForSave, validateForUpdate, willConnect, writeProperty, writePropertyDirectly
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.codescore.dbo.Submission
getCompileStdErr, getCompileStdOut, getExeStdErr, getExeStdOut, getLanguage, getProblem, getSource, getStatus, getStdOutDiff, getTime, setCompileStdErr, setCompileStdOut, setExeStdErr, setExeStdOut, setLanguage, setProblem, setSource, setStatus, setStdOutDiff, setTime
 
Methods inherited from interface org.apache.cayenne.DataObject
addToManyTarget, fetchFinished, getDataContext, getSnapshotVersion, readNestedProperty, readProperty, readPropertyDirectly, removeToManyTarget, setDataContext, setSnapshotVersion, setToOneTarget, writeProperty, writePropertyDirectly
 
Methods inherited from interface org.apache.cayenne.Persistent
getObjectContext, getObjectId, getPersistenceState, setObjectContext, setObjectId, setPersistenceState
 
Methods inherited from interface net.codescore.dbo.inf.ContextObject
getObjectContext
 

Field Detail

sdf

private static final SimpleDateFormat sdf

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

srcFile

private File srcFile

tempDir

private File tempDir

compileStdOut

private File compileStdOut

compileStdErr

private File compileStdErr

exeStdErr

private File exeStdErr

exeStdOut

private File exeStdOut

expStdOut

private File expStdOut

logFile

private File logFile
Constructor Detail

JudgeSolution

public JudgeSolution()
Method Detail

getCompileStdErrFile

public File getCompileStdErrFile()
Specified by:
getCompileStdErrFile in interface Submission
Returns:
The standard error output from the compiler

getCompileStdOutFile

public File getCompileStdOutFile()
Specified by:
getCompileStdOutFile in interface Submission
Returns:
The standard output from the compiler

getExecuteStdErrFile

public File getExecuteStdErrFile()
Specified by:
getExecuteStdErrFile in interface Submission
Returns:
The standard error output from the execution

getExecuteStdOutFile

public File getExecuteStdOutFile()
Specified by:
getExecuteStdOutFile in interface Submission
Returns:
The standard output from the execution

getExpectedStdOutFile

public File getExpectedStdOutFile()
Specified by:
getExpectedStdOutFile in interface Submission
Returns:
The expected output from the standard output of execution

getLogFile

public File getLogFile()
Specified by:
getLogFile in interface Submission
Returns:
The file to write log data for the grading process

getSrcFile

public File getSrcFile()
                throws IOException
Specified by:
getSrcFile in interface Submission
Returns:
The source code file for this submission
Throws:
IOException - If the source file cannot be written using the content in Submission.getSource()

getTempDir

public File getTempDir()
Specified by:
getTempDir in interface Submission
Returns:
The temporary directory used for compliation and execution of this submission

touchLocalFile

private File touchLocalFile(String fName)

writeSrcFile

private void writeSrcFile()
                   throws IOException
Throws:
IOException


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