Class EntityResultTask
- java.lang.Object
-
- uk.ac.warwick.dcs.sherlock.engine.storage.EntityResultTask
-
- All Implemented Interfaces:
java.io.Serializable
,IResultTask
@Entity(name="ResultTask") public class EntityResultTask extends java.lang.Object implements IResultTask, java.io.Serializable
IResultTask object for base storage implementation- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addContainingBlock(java.util.Collection<ICodeBlockGroup> blockGroups)
Adds a collection of code block groups found using the tasks detector which all contain the filevoid
addContainingBlock(ICodeBlockGroup blockGroup)
Adds a code block group found using the tasks detector which contains the filevoid
addFileScore(ISourceFile file, float score)
Adds a score from the task of the instance file against another filejava.util.List<ICodeBlockGroup>
getContainingBlocks()
Fetches the list of code block groups from the detector which feature the instance filefloat
getFileScore(ISourceFile file)
Gets the score of the instance file vs the passed file for the task, the file must have been registered usingIResultTask.addFileScore(ISourceFile, float)
java.util.Map<ISourceFile,java.lang.Float>
getFileScores()
Returns the full map of stored file vs instance file score for the taskITask
getTask()
Get the task this objects stores results forfloat
getTaskScore()
Fetches the overall aggregate score for the instance file for the taskvoid
setTaskScore(float score)
Sets the overall aggregate score for the instance file for the task
-
-
-
Method Detail
-
addContainingBlock
public void addContainingBlock(ICodeBlockGroup blockGroup)
Description copied from interface:IResultTask
Adds a code block group found using the tasks detector which contains the file- Specified by:
addContainingBlock
in interfaceIResultTask
- Parameters:
blockGroup
- code block group
-
addContainingBlock
public void addContainingBlock(java.util.Collection<ICodeBlockGroup> blockGroups)
Description copied from interface:IResultTask
Adds a collection of code block groups found using the tasks detector which all contain the file- Specified by:
addContainingBlock
in interfaceIResultTask
- Parameters:
blockGroups
- collection of code block groups
-
addFileScore
public void addFileScore(ISourceFile file, float score)
Description copied from interface:IResultTask
Adds a score from the task of the instance file against another file- Specified by:
addFileScore
in interfaceIResultTask
- Parameters:
file
- file score is againstscore
- score value
-
getContainingBlocks
public java.util.List<ICodeBlockGroup> getContainingBlocks()
Description copied from interface:IResultTask
Fetches the list of code block groups from the detector which feature the instance file- Specified by:
getContainingBlocks
in interfaceIResultTask
- Returns:
- list of groups
-
getFileScore
public float getFileScore(ISourceFile file)
Description copied from interface:IResultTask
Gets the score of the instance file vs the passed file for the task, the file must have been registered usingIResultTask.addFileScore(ISourceFile, float)
- Specified by:
getFileScore
in interfaceIResultTask
- Parameters:
file
- file score is against- Returns:
- score value stored
-
getFileScores
public java.util.Map<ISourceFile,java.lang.Float> getFileScores()
Description copied from interface:IResultTask
Returns the full map of stored file vs instance file score for the task- Specified by:
getFileScores
in interfaceIResultTask
- Returns:
- map of scores
-
getTask
public ITask getTask()
Description copied from interface:IResultTask
Get the task this objects stores results for- Specified by:
getTask
in interfaceIResultTask
- Returns:
- Task instance
-
getTaskScore
public float getTaskScore()
Description copied from interface:IResultTask
Fetches the overall aggregate score for the instance file for the task- Specified by:
getTaskScore
in interfaceIResultTask
- Returns:
- score
-
setTaskScore
public void setTaskScore(float score)
Description copied from interface:IResultTask
Sets the overall aggregate score for the instance file for the task- Specified by:
setTaskScore
in interfaceIResultTask
- Parameters:
score
- score to set
-
-