Class EntityResultFile
- java.lang.Object
-
- uk.ac.warwick.dcs.sherlock.engine.storage.EntityResultFile
-
- All Implemented Interfaces:
java.io.Serializable,IResultFile
@Entity(name="ResultFile") public class EntityResultFile extends java.lang.Object implements IResultFile, java.io.Serializable
IResultFile object for base storage implementation- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFileScore(ISourceFile file, float score)Adds an aggregate score from all tasks of the instance file against another fileIResultTaskaddTaskResult(ITask task)Adds a task (an individual detector run) to the file resultsISourceFilegetFile()Get the file this instance representsfloatgetFileScore(ISourceFile file)Gets the aggregate score from all tasks of the instance file vs the passed file, the file must have been registered usingIResultFile.addFileScore(ISourceFile, float)java.util.Map<ISourceFile,java.lang.Float>getFileScores()Returns the full map of stored file vs instance file aggregate score from all tasksfloatgetOverallScore()Gets the overall aggregate score for all tasks and other files for the instance filejava.util.List<IResultTask>getTaskResults()Returns the list ofIResultTaskstored for this filevoidsetOverallScore(float score)Sets the overall aggregate score for the file
-
-
-
Method Detail
-
addFileScore
public void addFileScore(ISourceFile file, float score)
Description copied from interface:IResultFileAdds an aggregate score from all tasks of the instance file against another file- Specified by:
addFileScorein interfaceIResultFile- Parameters:
file- file score is againstscore- score value
-
addTaskResult
public IResultTask addTaskResult(ITask task)
Description copied from interface:IResultFileAdds a task (an individual detector run) to the file results- Specified by:
addTaskResultin interfaceIResultFile- Parameters:
task- task instance to add- Returns:
- task results instance
-
getFile
public ISourceFile getFile()
Description copied from interface:IResultFileGet the file this instance represents- Specified by:
getFilein interfaceIResultFile- Returns:
- file instance
-
getFileScore
public float getFileScore(ISourceFile file)
Description copied from interface:IResultFileGets the aggregate score from all tasks of the instance file vs the passed file, the file must have been registered usingIResultFile.addFileScore(ISourceFile, float)- Specified by:
getFileScorein interfaceIResultFile- Parameters:
file- file score is against- Returns:
- score value stored
-
getFileScores
public java.util.Map<ISourceFile,java.lang.Float> getFileScores()
Description copied from interface:IResultFileReturns the full map of stored file vs instance file aggregate score from all tasks- Specified by:
getFileScoresin interfaceIResultFile- Returns:
- map of scores
-
getOverallScore
public float getOverallScore()
Description copied from interface:IResultFileGets the overall aggregate score for all tasks and other files for the instance file- Specified by:
getOverallScorein interfaceIResultFile- Returns:
- score
-
setOverallScore
public void setOverallScore(float score)
Description copied from interface:IResultFileSets the overall aggregate score for the file- Specified by:
setOverallScorein interfaceIResultFile- Parameters:
score- aggregate score value
-
getTaskResults
public java.util.List<IResultTask> getTaskResults()
Description copied from interface:IResultFileReturns the list ofIResultTaskstored for this file- Specified by:
getTaskResultsin interfaceIResultFile- Returns:
- list of tasks
-
-