code: private void updateStructure()
     {
        int id = 1;
        Integer outlineLevel = Integer.valueOf(1);
        for (Task task : m_projectFile.getChildTasks())
        {
           id = updateStructure(id, task, outlineLevel);
        }
     }
docs: Iterates through the tasks setting the correct
  outline level and ID values.