Package org.proforma

Class GradingHints


  • public class GradingHints
    extends Object
    Root element type of a ProFormA grading-hints element. This includes the complete hierarchical grading scheme with all tests references, weights, accumulating functions and nullify conditions. Hierarchy nodes and conditions can get a title and descriptions. All information below this element except the root node is optional. Grader-specific hints from other XML namespaces can be included in xs:any elements.
    • Constructor Detail

      • GradingHints

        public GradingHints()
    • Method Detail

      • getRoot

        public GradingNode getRoot()
        Ruft den Wert der root-Eigenschaft ab.
        Returns:
        possible object is GradingNode
      • setRoot

        public void setRoot​(GradingNode value)
        Legt den Wert der root-Eigenschaft fest.
        Parameters:
        value - allowed object is GradingNode
      • getCombine

        public List<GradingNode> getCombine()
        Gets the value of the combine property.

        This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the combine property.

        For example, to add a new item, do as follows:

            getCombine().add(newItem);
         

        Objects of the following type(s) are allowed in the list GradingNode

      • getAny

        public List<Object> getAny()
        Gets the value of the any property.

        This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the any property.

        For example, to add a new item, do as follows:

            getAny().add(newItem);
         

        Objects of the following type(s) are allowed in the list Element Object

      • findAnyByInstanceOfClass

        public <T> T findAnyByInstanceOfClass​(Class<T> clazz)
      • calcMaxScoreAssumingEachTestRefCeilsOne

        public BigDecimal calcMaxScoreAssumingEachTestRefCeilsOne()
                                                           throws NoSuchElementException
        Evaluates the root and combine nodes regarding their function and their weight. This method assumes that each referenced sub-test contributes 0 or 1 as a result.
        Returns:
        Throws:
        NoSuchElementException
      • calcMaxScoreAssumingEachTestRefCeilsOne

        public BigDecimal calcMaxScoreAssumingEachTestRefCeilsOne​(GradingNode node)
                                                           throws NoSuchElementException
        Evaluates the given node regarding its function and its weight. This method assumes that each referenced sub-test contributes 0 or 1 as a result.
        Returns:
        Throws:
        NoSuchElementException
      • calcMaxScoreAssumingEachTestRefCeilsOne

        public BigDecimal calcMaxScoreAssumingEachTestRefCeilsOne​(ChildRef childRef)
      • depth

        public int depth​(ChildRef ref)
      • validateTree

        public void validateTree()
        If the grading nodes do not form a tree of combine nodes but instead some other graph, then this method will throw an IllegalArgumentException
      • getChildRefHavingUniqueContentOrNull

        public ChildRef getChildRefHavingUniqueContentOrNull​(boolean isTestRef,
                                                             String ref,
                                                             String subRef)
      • removeCombineNode

        public boolean removeCombineNode​(String combineId)