private void readCalendars ( Project project , HashMap < BigInteger , ProjectCalendar > map ) { Project . Calendars calendars = project . getCalendars ( ) ; if ( calendars != null ) { LinkedList < Pair < ProjectCalendar , BigInteger > > baseCalendars = new LinkedList < Pair < ProjectCalendar , BigInteger > > ( ) ; for ( Project . Calendars . Calendar cal : calendars . getCalendar ( ) ) { readCalendar ( cal , map , baseCalendars ) ; } updateBaseCalendarNames ( baseCalendars , map ) ; } try { ProjectProperties properties = m_projectFile . getProjectProperties ( ) ; BigInteger calendarID = new BigInteger ( properties . getDefaultCalendarName ( ) ) ; ProjectCalendar calendar = map . get ( calendarID ) ; m_projectFile . setDefaultCalendar ( calendar ) ; } catch ( Exception ex ) { // Ignore exceptions } }
This method extracts calendar data from an MSPDI file .