APIBusinessObjects apibo = (APIBusinessObjects) unmarshaller.unmarshal(doc);
List<ProjectType> projects = apibo.getProject();
if (projects.size() != 1)
{
throw new MPXJException("Exoecting 1 project, found " + projects.size());
}
ProjectType project = projects.get(0);
processProjectHeader(apibo, project);
processCalendars(apibo);
processResources(apibo);
processTasks(project);
processPredecessors(project);
processAssignments(project);
//
// Ensure that the unique ID counters are correct
//
m_projectFile.updateUniqueCounters();
return (m_projectFile);
}
catch (ParserConfigurationException ex)
{
throw new MPXJException("Failed to parse file", ex);
}
catch (JAXBException ex)
{
throw new MPXJException("Failed to parse file", ex);
}
catch (SAXException ex)
{
throw new MPXJException("Failed to parse file", ex);
}
finally
{
m_projectFile = null;