xml.setLevelAssignments(Boolean.valueOf(mpx.getLevelAssignments()));
xml.setLevelingCanSplit(Boolean.valueOf(mpx.getLevelingCanSplit()));
if (mpx.getLevelingDelay() != null)
{
Duration levelingDelay = mpx.getLevelingDelay();
double tenthMinutes = 10.0 * Duration.convertUnits(levelingDelay.getDuration(), levelingDelay.getUnits(), TimeUnit.MINUTES, m_projectFile.getProjectHeader()).getDuration();
xml.setLevelingDelay(BigInteger.valueOf((long) tenthMinutes));
xml.setLevelingDelayFormat(DatatypeConverter.printDurationTimeUnits(levelingDelay, false));
}
xml.setManual(Boolean.valueOf(mpx.getTaskMode() == TaskMode.MANUALLY_SCHEDULED));
if (mpx.getTaskMode() == TaskMode.MANUALLY_SCHEDULED)
{
xml.setManualDuration(DatatypeConverter.printDuration(this, mpx.getDuration()));
xml.setManualFinish(DatatypeConverter.printDate(mpx.getFinish()));
xml.setManualStart(DatatypeConverter.printDate(mpx.getStart()));
}
xml.setMilestone(Boolean.valueOf(mpx.getMilestone()));
xml.setName(mpx.getName());
if (!mpx.getNotes().isEmpty())
{
xml.setNotes(mpx.getNotes());
}
xml.setOutlineLevel(NumberUtility.getBigInteger(mpx.getOutlineLevel()));
xml.setOutlineNumber(mpx.getOutlineNumber());
xml.setOverAllocated(Boolean.valueOf(mpx.getOverAllocated()));
xml.setOvertimeCost(DatatypeConverter.printCurrency(mpx.getOvertimeCost()));
xml.setOvertimeWork(DatatypeConverter.printDuration(this, mpx.getOvertimeWork()));
xml.setPercentComplete(NumberUtility.getBigInteger(mpx.getPercentageComplete()));
xml.setPercentWorkComplete(NumberUtility.getBigInteger(mpx.getPercentageWorkComplete()));
xml.setPhysicalPercentComplete(NumberUtility.getBigInteger(mpx.getPhysicalPercentComplete()));
xml.setPriority(DatatypeConverter.printPriority(mpx.getPriority()));
xml.setRecurring(Boolean.valueOf(mpx.getRecurring()));
xml.setRegularWork(DatatypeConverter.printDuration(this, mpx.getRegularWork()));
xml.setRemainingCost(DatatypeConverter.printCurrency(mpx.getRemainingCost()));
if (mpx.getRemainingDuration() == null)
{
Duration duration = mpx.getDuration();
if (duration != null)
{
double amount = duration.getDuration();
amount -= ((amount * NumberUtility.getDouble(mpx.getPercentageComplete())) / 100);
xml.setRemainingDuration(DatatypeConverter.printDuration(this, Duration.getInstance(amount, duration.getUnits())));
}
}
else
{
xml.setRemainingDuration(DatatypeConverter.printDuration(this, mpx.getRemainingDuration()));