public String processMultiDataSetRequest ( final MultiDataSetRequest request ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( "Quandl codes " ) ; final Iterator < QuandlCodeRequest > iter = request . getQuandlCodeRequests ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { QuandlCodeRequest req = iter . next ( ) ; sb . append ( req . getQuandlCode ( ) ) ; if ( req . isSingleColumnRequest ( ) ) { sb . append ( "[" ) ; sb . append ( req . getColumnNumber ( ) ) ; sb . append ( "]" ) ; } if ( iter . hasNext ( ) ) { sb . append ( "," ) ; } } if ( request . getStartDate ( ) != null ) { sb . append ( " from " ) ; sb . append ( request . getStartDate ( ) ) ; } if ( request . getEndDate ( ) != null ) { sb . append ( " until " ) ; sb . append ( request . getEndDate ( ) ) ; } if ( request . getFrequency ( ) != null ) { sb . append ( " sampled " ) ; sb . append ( request . getFrequency ( ) ) ; } if ( request . getSortOrder ( ) != null ) { sb . append ( " sorted into " ) ; sb . append ( request . getSortOrder ( ) ) ; sb . append ( " order" ) ; } if ( request . getTransform ( ) != null ) { sb . append ( " transformed by " ) ; sb . append ( request . getTransform ( ) ) ; } if ( request . getMaxRows ( ) != null ) { sb . append ( " with at most " ) ; sb . append ( request . getMaxRows ( ) ) ; sb . append ( " rows" ) ; } return sb . toString ( ) ; }
Process a multi data set request into a descriptive title string .