/**
* This method imports all tasks defined in the file into the projity model
*
*/
private void importTasks() {
final OpenprojTaskConverter converter=new OpenprojTaskConverter();
plProject.getHierarchy().visit(new Hierarchy.Visitor(){ //pre-order visitor, parents must be treated before children
@Override
public void visit(HierarchyNode hierarchyNode) {
com.projectlibre.core.nodes.Node node=hierarchyNode.getNode();
if (!(node instanceof Task)) //ignore assignments present in task hierarchy
return;
Task task=(Task)node;
HierarchyNode parentHierarchyNode=hierarchyNode.getParent();
Task parentTask=null;
if (!parentHierarchyNode.isRoot())
parentTask=(Task)parentHierarchyNode.getNode();
//openproj task conversion
NormalTask openprojTask=project.newNormalTaskInstance(false);
openprojTask.setOwningProject(project);
openprojTask.setProjectId(project.getUniqueId());
converter.to(openprojTask, task, state);
//openproj task node conversion
Node openprojTaskNode=NodeFactory.getInstance().createNode(openprojTask);
//openproj node hierarchy