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 TypeMethodDescriptionvoid
This method implementsCommentLogger
and simply delegates to addLeadingCommentItem.void
addLeadingCommentItem
(Content item) void
abstract double
Returns the unweighted and non nullified achieved score.abstract double
Returns the weighted score, that has not yet been nullified.abstract double
Returns the achieved score.abstract Collection<Grade>
void
void
setHeaderComment
(Content header) void
setHeadline
(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 implementsCommentLogger
and simply delegates to addLeadingCommentItem.- Specified by:
addItem
in interfaceContentLogger
-
setHeadline
-
setAnchor
-
setHeaderComment
-
addLeadingCommentItem
-
addTrailingCommentItem
-
getHeadline
-
getAnchor
-
getHeaderComment
-
getDescriptionComment
-
getLeadingComment
-
getTrailingComment
-