private void processAssignments(ProjectType project)
   {
      List<ResourceAssignmentType> assignments = project.getResourceAssignment();
      for (ResourceAssignmentType row : assignments)
      {
         Task task = m_projectFile.getTaskByUniqueID(mapTaskID(row.getActivityObjectId()));
         Resource resource = m_projectFile.getResourceByUniqueID(row.getResourceObjectId());
         if (task != null && resource != null)
         {
            ResourceAssignment assignment = task.addResourceAssignment(resource);

            assignment.setUniqueID(row.getObjectId());
            assignment.setRemainingWork(getDuration(row.getRemainingUnits()));
            assignment.setBaselineWork(getDuration(row.getPlannedUnits()));
            assignment.setActualWork(getDuration(row.getActualUnits()));
            assignment.setRemainingCost(row.getRemainingCost());
            assignment.setBaselineCost(row.getPlannedCost());
            assignment.setActualCost(row.getActualCost());
            assignment.setActualStart(row.getActualStartDate());
            assignment.setActualFinish(row.getActualFinishDate());
            assignment.setBaselineStart(row.getPlannedStartDate());
            assignment.setBaselineFinish(row.getPlannedFinishDate());
            assignment.setGUID(DatatypeConverter.parseUUID(row.getGUID()));

            task.setActualCost(Double.valueOf(NumberHelper.getDouble(task.getActualCost()) + NumberHelper.getDouble(assignment.getActualCost())));
            task.setRemainingCost(Double.valueOf(NumberHelper.getDouble(task.getRemainingCost()) + NumberHelper.getDouble(assignment.getRemainingCost())));
            task.setBaselineCost(Double.valueOf(NumberHelper.getDouble(task.getBaselineCost()) + NumberHelper.getDouble(assignment.getBaselineCost())));

            populateField(assignment, AssignmentField.WORK, AssignmentField.ACTUAL_WORK, AssignmentField.BASELINE_WORK);
            populateField(assignment, AssignmentField.COST, AssignmentField.ACTUAL_COST, AssignmentField.BASELINE_COST);
            populateField(assignment, AssignmentField.START, AssignmentField.ACTUAL_START, AssignmentField.BASELINE_START);
            populateField(assignment, AssignmentField.FINISH, AssignmentField.ACTUAL_FINISH, AssignmentField.BASELINE_FINISH);

            readUDFTypes(assignment, row.getUDF());

            m_eventManager.fireAssignmentReadEvent(assignment);
         }
      }
   }
private void processAssignments ( ProjectType project ) { List < ResourceAssignmentType > assignments = project . getResourceAssignment ( ) ; for ( ResourceAssignmentType row : assignments ) { Task task = m_projectFile . getTaskByUniqueID ( mapTaskID ( row . getActivityObjectId ( ) ) ) ; Resource resource = m_projectFile . getResourceByUniqueID ( row . getResourceObjectId ( ) ) ; if ( task != null && resource != null ) { ResourceAssignment assignment = task . addResourceAssignment ( resource ) ; assignment . setUniqueID ( row . getObjectId ( ) ) ; assignment . setRemainingWork ( getDuration ( row . getRemainingUnits ( ) ) ) ; assignment . setBaselineWork ( getDuration ( row . getPlannedUnits ( ) ) ) ; assignment . setActualWork ( getDuration ( row . getActualUnits ( ) ) ) ; assignment . setRemainingCost ( row . getRemainingCost ( ) ) ; assignment . setBaselineCost ( row . getPlannedCost ( ) ) ; assignment . setActualCost ( row . getActualCost ( ) ) ; assignment . setActualStart ( row . getActualStartDate ( ) ) ; assignment . setActualFinish ( row . getActualFinishDate ( ) ) ; assignment . setBaselineStart ( row . getPlannedStartDate ( ) ) ; assignment . setBaselineFinish ( row . getPlannedFinishDate ( ) ) ; assignment . setGUID ( DatatypeConverter . parseUUID ( row . getGUID ( ) ) ) ; task . setActualCost ( Double . valueOf ( NumberHelper . getDouble ( task . getActualCost ( ) ) + NumberHelper . getDouble ( assignment . getActualCost ( ) ) ) ) ; task . setRemainingCost ( Double . valueOf ( NumberHelper . getDouble ( task . getRemainingCost ( ) ) + NumberHelper . getDouble ( assignment . getRemainingCost ( ) ) ) ) ; task . setBaselineCost ( Double . valueOf ( NumberHelper . getDouble ( task . getBaselineCost ( ) ) + NumberHelper . getDouble ( assignment . getBaselineCost ( ) ) ) ) ; populateField ( assignment , AssignmentField . WORK , AssignmentField . ACTUAL_WORK , AssignmentField . BASELINE_WORK ) ; populateField ( assignment , AssignmentField . COST , AssignmentField . ACTUAL_COST , AssignmentField . BASELINE_COST ) ; populateField ( assignment , AssignmentField . START , AssignmentField . ACTUAL_START , AssignmentField . BASELINE_START ) ; populateField ( assignment , AssignmentField . FINISH , AssignmentField . ACTUAL_FINISH , AssignmentField . BASELINE_FINISH ) ; readUDFTypes ( assignment , row . getUDF ( ) ) ; m_eventManager . fireAssignmentReadEvent ( assignment ) ; } } }
Process resource assignments.

@param project xml container