Esempio n. 1
0
 /**
  * Load the task profile cost factor from the XML element to the profile
  *
  * @param taskProf the task profile
  * @param task the task XML element
  */
 private void loadTaskProfileCostFactors(MRTaskProfile taskProf, Element task) {
   Element factors = (Element) task.getElementsByTagName(FACTORS).item(0);
   NodeList factorList = factors.getElementsByTagName(FACTOR);
   for (int j = 0; j < factorList.getLength(); ++j) {
     Element factor = (Element) factorList.item(j);
     taskProf.addCostFactor(
         MRCostFactors.valueOf(factor.getAttribute(KEY)),
         Double.parseDouble(factor.getAttribute(VALUE)));
   }
 }