Class GradingHints
- java.lang.Object
-
- org.proforma.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.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<Object>
any
protected List<GradingNode>
combine
protected GradingNode
root
-
Constructor Summary
Constructors Constructor Description GradingHints()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BigDecimal
calcMaxScoreAssumingEachTestRefCeilsOne()
Evaluates the root and combine nodes regarding theirfunction
and theirweight
.BigDecimal
calcMaxScoreAssumingEachTestRefCeilsOne(ChildRef childRef)
BigDecimal
calcMaxScoreAssumingEachTestRefCeilsOne(GradingNode node)
Evaluates the given node regarding itsfunction
and itsweight
.int
depth(ChildRef ref)
<T> T
findAnyByInstanceOfClass(Class<T> clazz)
List<Object>
getAny()
Gets the value of the any property.ChildRef
getChildRefHavingUniqueContentOrNull(boolean isTestRef, String ref, String subRef)
List<GradingNode>
getCombine()
Gets the value of the combine property.GradingNode
getCombineById(String combineId)
List<GradingNode>
getNodesReferencing(boolean isTestRef, String ref, String subRef)
GradingNode
getRoot()
Ruft den Wert der root-Eigenschaft ab.Iterable<GradingNode>
getRootAndCombineNodes()
boolean
removeCombineNode(String combineId)
void
setRoot(GradingNode value)
Legt den Wert der root-Eigenschaft fest.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
-
-
-
Field Detail
-
root
protected GradingNode root
-
combine
protected List<GradingNode> combine
-
-
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 isGradingNode
-
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
-
getCombineById
public GradingNode getCombineById(String combineId)
-
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 theirfunction
and theirweight
. 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 itsfunction
and itsweight
. 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)
-
getNodesReferencing
public List<GradingNode> getNodesReferencing(boolean isTestRef, String ref, String subRef)
-
removeCombineNode
public boolean removeCombineNode(String combineId)
-
getRootAndCombineNodes
public Iterable<GradingNode> getRootAndCombineNodes()
-
-