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 void
addFileScore(ISourceFile file, float score)
Adds an aggregate score from all tasks of the instance file against another fileIResultTask
addTaskResult(ITask task)
Adds a task (an individual detector run) to the file resultsISourceFile
getFile()
Get the file this instance representsfloat
getFileScore(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 tasksfloat
getOverallScore()
Gets the overall aggregate score for all tasks and other files for the instance filejava.util.List<IResultTask>
getTaskResults()
Returns the list ofIResultTask
stored for this filevoid
setOverallScore(float score)
Sets the overall aggregate score for the file
-
-
-
Method Detail
-
addFileScore
public void addFileScore(ISourceFile file, float score)
Description copied from interface:IResultFile
Adds an aggregate score from all tasks of the instance file against another file- Specified by:
addFileScore
in interfaceIResultFile
- Parameters:
file
- file score is againstscore
- score value
-
addTaskResult
public IResultTask addTaskResult(ITask task)
Description copied from interface:IResultFile
Adds a task (an individual detector run) to the file results- Specified by:
addTaskResult
in interfaceIResultFile
- Parameters:
task
- task instance to add- Returns:
- task results instance
-
getFile
public ISourceFile getFile()
Description copied from interface:IResultFile
Get the file this instance represents- Specified by:
getFile
in interfaceIResultFile
- Returns:
- file instance
-
getFileScore
public float getFileScore(ISourceFile file)
Description copied from interface:IResultFile
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)
- Specified by:
getFileScore
in 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:IResultFile
Returns the full map of stored file vs instance file aggregate score from all tasks- Specified by:
getFileScores
in interfaceIResultFile
- Returns:
- map of scores
-
getOverallScore
public float getOverallScore()
Description copied from interface:IResultFile
Gets the overall aggregate score for all tasks and other files for the instance file- Specified by:
getOverallScore
in interfaceIResultFile
- Returns:
- score
-
setOverallScore
public void setOverallScore(float score)
Description copied from interface:IResultFile
Sets the overall aggregate score for the file- Specified by:
setOverallScore
in interfaceIResultFile
- Parameters:
score
- aggregate score value
-
getTaskResults
public java.util.List<IResultTask> getTaskResults()
Description copied from interface:IResultFile
Returns the list ofIResultTask
stored for this file- Specified by:
getTaskResults
in interfaceIResultFile
- Returns:
- list of tasks
-
-