Package de.hsh.graja.core.result
Class AbstractResultNode
java.lang.Object
de.hsh.graja.core.result.AbstractResultNode
- All Implemented Interfaces:
ContentLogger
- Direct Known Subclasses:
AbstractGradingAspectResult,FailableAbstractResultNode
A result node in the Graja core.
Results have the following data:
- An achieved score
- A boolean success value
- Comments consisting of
- A plain text headline
- A header comment
- A leading comment
- one or more subresults
- A trailing comment
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method implementsCommentLoggerand simply delegates to addLeadingCommentItem.voidaddLeadingCommentItem(Content item) voidabstract doubleReturns the unweighted and non nullified achieved score.abstract doubleReturns the weighted score, that has not yet been nullified.abstract doubleReturns the achieved score.abstract Collection<Grade>voidvoidsetHeaderComment(Content header) voidsetHeadline(String headline)
-
Constructor Details
-
AbstractResultNode
protected AbstractResultNode() -
AbstractResultNode
-
-
Method Details
-
collectGrades
-
calcRawScoreAchieved
public abstract double calcRawScoreAchieved()Returns the unweighted and non nullified achieved score. The achieved score is calculated in three steps:
- First the mere score without any postprocessing is calculated. We call this the "raw achieved score".
- Second, the score gets multiplied by a weight. We call the resulting score the "achieved score after weighting"
- Last, the score is processed by nullification conditions. We call the resulting score the "achieved score after weighting and nullification".
- Returns:
- the raw achieved score.
-
calcScoreAchievedAfterWeighting
public abstract double calcScoreAchievedAfterWeighting()Returns the weighted score, that has not yet been nullified. The achieved score is calculated in three steps:
- First the mere score without any postprocessing is calculated. We call this the "raw achieved score".
- Second, the score gets multiplied by a weight. We call the resulting score the "achieved score after weighting"
- Last, the score is processed by nullification conditions. We call the resulting score the "achieved score after weighting and nullification".
- Returns:
- the weigthed achieved score. Nullifications are not included.
-
calcScoreAchievedAfterWeightingAndNullification
public abstract double calcScoreAchievedAfterWeightingAndNullification()Returns the achieved score. The achieved score is calculated in three steps:
- First the mere score without any postprocessing is calculated. We call this the "raw achieved score".
- Second, the score gets multiplied by a weight. We call the resulting score the "achieved score after weighting"
- Last, the score is processed by nullification conditions. We call the resulting score the "achieved score after weighting and nullification".
- Returns:
- the achieved score. The weight and nullifications are included already.
-
addItem
This method implementsCommentLoggerand simply delegates to addLeadingCommentItem.- Specified by:
addItemin interfaceContentLogger
-
setHeadline
-
setAnchor
-
setHeaderComment
-
addLeadingCommentItem
-
addTrailingCommentItem
-
getHeadline
-
getAnchor
-
getHeaderComment
-
getDescriptionComment
-
getLeadingComment
-
getTrailingComment
-