private void writeResourceAssignment ( ResourceAssignment record ) throws IOException { m_buffer . setLength ( 0 ) ; m_buffer . append ( MPXConstants . RESOURCE_ASSIGNMENT_RECORD_NUMBER ) ; m_buffer . append ( m_delimiter ) ; m_buffer . append ( formatResource ( record . getResource ( ) ) ) ; m_buffer . append ( m_delimiter ) ; m_buffer . append ( format ( formatUnits ( record . getUnits ( ) ) ) ) ; m_buffer . append ( m_delimiter ) ; m_buffer . append ( format ( formatDuration ( record . getWork ( ) ) ) ) ; m_buffer . append ( m_delimiter ) ; m_buffer . append ( format ( formatDuration ( record . getBaselineWork ( ) ) ) ) ; m_buffer . append ( m_delimiter ) ; m_buffer . append ( format ( formatDuration ( record . getActualWork ( ) ) ) ) ; m_buffer . append ( m_delimiter ) ; m_buffer . append ( format ( formatDuration ( record . getOvertimeWork ( ) ) ) ) ; m_buffer . append ( m_delimiter ) ; m_buffer . append ( format ( formatCurrency ( record . getCost ( ) ) ) ) ; m_buffer . append ( m_delimiter ) ; m_buffer . append ( format ( formatCurrency ( record . getBaselineCost ( ) ) ) ) ; m_buffer . append ( m_delimiter ) ; m_buffer . append ( format ( formatCurrency ( record . getActualCost ( ) ) ) ) ; m_buffer . append ( m_delimiter ) ; m_buffer . append ( format ( formatDateTime ( record . getStart ( ) ) ) ) ; m_buffer . append ( m_delimiter ) ; m_buffer . append ( format ( formatDateTime ( record . getFinish ( ) ) ) ) ; m_buffer . append ( m_delimiter ) ; m_buffer . append ( format ( formatDuration ( record . getDelay ( ) ) ) ) ; m_buffer . append ( m_delimiter ) ; m_buffer . append ( format ( record . getResourceUniqueID ( ) ) ) ; stripTrailingDelimiters ( m_buffer ) ; m_buffer . append ( MPXConstants . EOL ) ; m_writer . write ( m_buffer . toString ( ) ) ; ResourceAssignmentWorkgroupFields workgroup = record . getWorkgroupAssignment ( ) ; if ( workgroup == null ) { workgroup = ResourceAssignmentWorkgroupFields . EMPTY ; } writeResourceAssignmentWorkgroupFields ( workgroup ) ; m_eventManager . fireAssignmentWrittenEvent ( record ) ; }
Write resource assignment .