private void writeCalendars ( List < ProjectCalendar > records ) { // // Write project calendars // for ( ProjectCalendar record : records ) { m_buffer . setLength ( 0 ) ; m_buffer . append ( "CLDR " ) ; m_buffer . append ( SDEFmethods . lset ( record . getUniqueID ( ) . toString ( ) , 2 ) ) ; // 2 character used, USACE allows 1 String workDays = SDEFmethods . workDays ( record ) ; // custom line, like NYYYYYN for a week m_buffer . append ( SDEFmethods . lset ( workDays , 8 ) ) ; m_buffer . append ( SDEFmethods . lset ( record . getName ( ) , 30 ) ) ; m_writer . println ( m_buffer ) ; } }
This will create a line in the SDEF file for each calendar if there are more than 9 calendars you ll have a big error as USACE numbers them 0 - 9 .