final CSVQuoter quoter = new CSVQuoter( ',', '"' ); for ( int i = 0; i < size; i++ ) { if ( i != 0 ) {
public CsvTemplateProducer( final OutputProcessorMetaData metaData, final SheetLayout sheetLayout, final String encoding ) { this.metaData = metaData; this.sheetLayout = sheetLayout; this.encoding = encoding; this.idMapping = new HashMap<InstanceID, String>(); final String separator = metaData.getConfiguration().getConfigProperty( CSVTableModule.SEPARATOR, CSVTableModule.SEPARATOR_DEFAULT ); if ( separator.length() == 0 ) { throw new IllegalArgumentException( "CSV separate cannot be an empty string." ); } if ( this.encoding == null ) { this.encoding = metaData.getConfiguration().getConfigProperty( "org.pentaho.reporting.engine.classic.core.modules.output.table.csv.Encoding", EncodingRegistry.getPlatformDefaultEncoding() ); } quoter = new CSVQuoter( separator.charAt( 0 ) ); }
/** * Returns a string representation of the ResourceKey based on the pieces that are passed as parameters * * @param schema the string representation of the schema * @param identifier the string representation of the identifier * @param factoryParameters the set of factory parameters (<code>null</code> allowed) * @return the string version with the pieces delimited and concatenated */ public static String createStringResourceKey( final String schema, final String identifier, final Map factoryParameters ) { final String factoryParamString = convertFactoryParametersToString( factoryParameters ); final CSVQuoter quoter = new CSVQuoter( ';' ); return quoter.doQuoting( SERIALIZATION_PREFIX + schema ) + DELIMITER + quoter.doQuoting( identifier ) + ( factoryParamString == null ? "" : DELIMITER + quoter.doQuoting( factoryParamString ) ); }
final CSVQuoter quoter = new CSVQuoter( quote.charAt( 0 ), quote.charAt( 0 ), true ); StringBuilder b = new StringBuilder(); while ( sequence.hasNext() ) {
quoter = new CSVQuoter( separator.charAt( 0 ) );
final CSVQuoter quoter = new CSVQuoter(quote.charAt(0), quote.charAt(0)); StringBuffer b = new StringBuffer(); while (sequence.hasNext())