Class AbstractResultNode

java.lang.Object
de.hsh.graja.core.result.AbstractResultNode
All Implemented Interfaces:
ContentLogger
Direct Known Subclasses:
AbstractGradingAspectResult, FailableAbstractResultNode

public abstract class AbstractResultNode extends Object implements ContentLogger
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 Details

  • Method Details

    • collectGrades

      public abstract Collection<Grade> 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

      public void addItem(Content item)
      This method implements CommentLogger and simply delegates to addLeadingCommentItem.
      Specified by:
      addItem in interface ContentLogger
    • setHeadline

      public void setHeadline(String headline)
    • setAnchor

      public void setAnchor(Anchor anchor)
    • setHeaderComment

      public void setHeaderComment(Content header)
    • addLeadingCommentItem

      public void addLeadingCommentItem(Content item)
    • addTrailingCommentItem

      public void addTrailingCommentItem(Content item)
    • getHeadline

      public String getHeadline()
    • getAnchor

      public Anchor getAnchor()
    • getHeaderComment

      public Content getHeaderComment()
    • getDescriptionComment

      public Sequence getDescriptionComment()
    • getLeadingComment

      public Content getLeadingComment()
    • getTrailingComment

      public Content getTrailingComment()