Class ProformaUtil

java.lang.Object
de.hsh.graja.transform.ProformaUtil

public class ProformaUtil extends Object
  • Constructor Details

    • ProformaUtil

      public ProformaUtil()
  • Method Details

    • getFile

      public static ProformaUtil.TaskFileChoiceGroup getFile(proforma.xml21.TaskFileType file)
    • getFile

      public static ProformaUtil.IncludedTaskFileChoiceGroup getFile(proforma.xml21.IncludedTaskFileType file)
    • getFile

      public static ProformaUtil.SubmissionFileChoiceGroup getFile(proforma.xml21.SubmissionFileType file)
    • getFile

      public static ProformaUtil.ResponseFileChoiceGroup getFile(proforma.xml21.ResponseFileType file)
    • clearFileAndSetAttachedBinFile

      public static void clearFileAndSetAttachedBinFile(proforma.xml21.TaskFileType file, String path)
    • findAnyByInstanceOfClass

      public static <T> T findAnyByInstanceOfClass(proforma.xml21.TestConfigurationType tc, Class<T> clazz)
    • getPath

      public static String getPath(proforma.xml21.TaskFileType file)
    • getPath

      public static String getPath(proforma.xml21.SubmissionFileType file)
    • getPath

      public static String getPath(proforma.xml21.ResponseFileType file)
    • isEmbedded

      public static boolean isEmbedded(proforma.xml21.TaskFileType file)
    • isEmbedded

      public static boolean isEmbedded(proforma.xml21.ResponseFileType file)
    • isAttached

      public static boolean isAttached(proforma.xml21.TaskFileType file)
    • isTxt

      public static boolean isTxt(proforma.xml21.TaskFileType file)
    • isTxt

      public static boolean isTxt(proforma.xml21.ResponseFileType file)
    • isBin

      public static boolean isBin(proforma.xml21.TaskFileType file)
    • getNaturalLang

      public static String getNaturalLang(proforma.xml21.TaskFileType file)
    • getNaturalLang

      public static String getNaturalLang(proforma.xml21.SubmissionFileType file)
    • getEncoding

      public static String getEncoding(proforma.xml21.TaskFileType file)
    • getBytesOfEmbeddedFile

      public static byte[] getBytesOfEmbeddedFile(proforma.xml21.TaskFileType file)
    • getBytesOfEmbeddedFile

      public static byte[] getBytesOfEmbeddedFile(proforma.xml21.ResponseFileType file)
    • getRef

      public static String getRef(proforma.xml21.GradesBaseRefChildType cr)
    • getSubRef

      public static String getSubRef(proforma.xml21.GradesBaseRefChildType cr)
    • calcMaxScoreAssumingEachTestRefCeilsOne

      public static BigDecimal calcMaxScoreAssumingEachTestRefCeilsOne(proforma.xml21.GradingHintsType gh) 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 static BigDecimal calcMaxScoreAssumingEachTestRefCeilsOne(proforma.xml21.GradingHintsType gh, proforma.xml21.GradesNodeType 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 static BigDecimal calcMaxScoreAssumingEachTestRefCeilsOne(proforma.xml21.GradingHintsType gh, proforma.xml21.GradesBaseRefChildType childRef)
    • validateTree

      public static void validateTree(proforma.xml21.GradingHintsType gh)
      If the grading nodes do not form a tree of combine nodes but instead some other graph, then this method will throw an IllegalArgumentException
    • findAnyByInstanceOfClass

      public static <T> T findAnyByInstanceOfClass(proforma.xml21.TaskMetaDataType md, Class<T> clazz)