private void readProject ( Project project ) { Task mpxjTask = m_projectFile . addTask ( ) ; //project.getAuthor() mpxjTask . setBaselineCost ( project . getBaselineCost ( ) ) ; mpxjTask . setBaselineFinish ( project . getBaselineFinishDate ( ) ) ; mpxjTask . setBaselineStart ( project . getBaselineStartDate ( ) ) ; //project.getBudget(); //project.getCompany() mpxjTask . setFinish ( project . getFinishDate ( ) ) ; //project.getGoal() //project.getHyperlinks() //project.getMarkerID() mpxjTask . setName ( project . getName ( ) ) ; mpxjTask . setNotes ( project . getNote ( ) ) ; mpxjTask . setPriority ( project . getPriority ( ) ) ; // project.getSite() mpxjTask . setStart ( project . getStartDate ( ) ) ; // project.getStyleProject() // project.getTask() // project.getTimeScale() // project.getViewProperties() String projectIdentifier = project . getID ( ) . toString ( ) ; mpxjTask . setGUID ( UUID . nameUUIDFromBytes ( projectIdentifier . getBytes ( ) ) ) ; // // Sort the tasks into the correct order // List < Document . Projects . Project . Task > tasks = new ArrayList < Document . Projects . Project . Task > ( project . getTask ( ) ) ; final AlphanumComparator comparator = new AlphanumComparator ( ) ; Collections . sort ( tasks , new Comparator < Document . Projects . Project . Task > ( ) { @ Override public int compare ( Document . Projects . Project . Task o1 , Document . Projects . Project . Task o2 ) { return comparator . compare ( o1 . getOutlineNumber ( ) , o2 . getOutlineNumber ( ) ) ; } } ) ; Map < String , Task > map = new HashMap < String , Task > ( ) ; map . put ( "" , mpxjTask ) ; for ( Document . Projects . Project . Task task : tasks ) { readTask ( projectIdentifier , map , task ) ; } }
Read a project from a ConceptDraw PROJECT file .