protected String [ ] [ ] getValues ( ITextNode [ ] textNodes , String masterLanguage , String language , Status [ ] status ) { int numberOfColumns = ( masterLanguage . equals ( language ) ) ? 4 : 5 ; List < String [ ] > rows = new ArrayList <> ( ) ; // add the header row rows . add ( getHeaderRow ( masterLanguage , new String [ ] { language } ) ) ; for ( ITextNode textNode : textNodes ) { IValueNode valueNode = textNode . getValueNode ( language ) ; if ( valueNode != null ) { if ( status == null || TremaCoreUtil . containsStatus ( valueNode . getStatus ( ) , status ) ) { rows . add ( getRow ( masterLanguage , textNode , valueNode ) ) ; // add the row } } } return rows . toArray ( new String [ rows . size ( ) ] [ numberOfColumns ] ) ; }
Gets a 2 dimensional string array representation of the CSV export data ready to be written to a CSV file .