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 voidaddContainingBlock(java.util.Collection<ICodeBlockGroup> blockGroups)Adds a collection of code block groups found using the tasks detector which all contain the filevoidaddContainingBlock(ICodeBlockGroup blockGroup)Adds a code block group found using the tasks detector which contains the filevoidaddFileScore(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 filefloatgetFileScore(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 taskITaskgetTask()Get the task this objects stores results forfloatgetTaskScore()Fetches the overall aggregate score for the instance file for the taskvoidsetTaskScore(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:IResultTaskAdds a code block group found using the tasks detector which contains the file- Specified by:
addContainingBlockin interfaceIResultTask- Parameters:
blockGroup- code block group
-
addContainingBlock
public void addContainingBlock(java.util.Collection<ICodeBlockGroup> blockGroups)
Description copied from interface:IResultTaskAdds a collection of code block groups found using the tasks detector which all contain the file- Specified by:
addContainingBlockin interfaceIResultTask- Parameters:
blockGroups- collection of code block groups
-
addFileScore
public void addFileScore(ISourceFile file, float score)
Description copied from interface:IResultTaskAdds a score from the task of the instance file against another file- Specified by:
addFileScorein interfaceIResultTask- Parameters:
file- file score is againstscore- score value
-
getContainingBlocks
public java.util.List<ICodeBlockGroup> getContainingBlocks()
Description copied from interface:IResultTaskFetches the list of code block groups from the detector which feature the instance file- Specified by:
getContainingBlocksin interfaceIResultTask- Returns:
- list of groups
-
getFileScore
public float getFileScore(ISourceFile file)
Description copied from interface:IResultTaskGets 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:
getFileScorein 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:IResultTaskReturns the full map of stored file vs instance file score for the task- Specified by:
getFileScoresin interfaceIResultTask- Returns:
- map of scores
-
getTask
public ITask getTask()
Description copied from interface:IResultTaskGet the task this objects stores results for- Specified by:
getTaskin interfaceIResultTask- Returns:
- Task instance
-
getTaskScore
public float getTaskScore()
Description copied from interface:IResultTaskFetches the overall aggregate score for the instance file for the task- Specified by:
getTaskScorein interfaceIResultTask- Returns:
- score
-
setTaskScore
public void setTaskScore(float score)
Description copied from interface:IResultTaskSets the overall aggregate score for the instance file for the task- Specified by:
setTaskScorein interfaceIResultTask- Parameters:
score- score to set
-
-