@Test public void generateHeader_PERCENT() { analysisForm.getYsettings().setValueType(UiyValueType.PERCENT); String[] header = chartCsvGenerator.generateHeader(ChartCode.MAIN_CHART, analysisForm, locale); assertEquals(3, header.length); assertEquals("Period", header[0]); assertEquals("JudgmentPercent (phrase1)", header[1]); assertEquals("JudgmentPercent", header[2]); }
public String[] generateHeader(ChartCode chartCode, AnalysisForm analysisForm, Locale locale) { Preconditions.checkNotNull(chartCode); Preconditions.checkNotNull(analysisForm); Preconditions.checkNotNull(locale); List<String> columnHeaders = Lists.newArrayList(); if (chartCode == ChartCode.CC_COURT_CHART) { columnHeaders.add(messageSource.getMessage(COLUMN_HEADER_FROM_X_AXIS__COURT_NAME, null, locale)); } else { columnHeaders.add(messageSource.getMessage(COLUMN_HEADER_FROM_X_AXIS__PERIOD, null, locale)); } for (JudgmentSeriesFilter seriesFilter : analysisForm.getSeriesFilters()) { columnHeaders.add(generateColumnHeaderFromSeries(analysisForm.getYsettings().getValueType(), seriesFilter, locale)); } return columnHeaders.toArray(new String[columnHeaders.size()]); }
ChartCsvGenerator { public String[] generateHeader(ChartCode chartCode, AnalysisForm analysisForm, Locale locale) { Preconditions.checkNotNull(chartCode); Preconditions.checkNotNull(analysisForm); Preconditions.checkNotNull(locale); List<String> columnHeaders = Lists.newArrayList(); if (chartCode == ChartCode.CC_COURT_CHART) { columnHeaders.add(messageSource.getMessage(COLUMN_HEADER_FROM_X_AXIS__COURT_NAME, null, locale)); } else { columnHeaders.add(messageSource.getMessage(COLUMN_HEADER_FROM_X_AXIS__PERIOD, null, locale)); } for (JudgmentSeriesFilter seriesFilter : analysisForm.getSeriesFilters()) { columnHeaders.add(generateColumnHeaderFromSeries(analysisForm.getYsettings().getValueType(), seriesFilter, locale)); } return columnHeaders.toArray(new String[columnHeaders.size()]); } }
ChartCsvGenerator { public String[] generateHeader(ChartCode chartCode, AnalysisForm analysisForm, Locale locale) { Preconditions.checkNotNull(chartCode); Preconditions.checkNotNull(analysisForm); Preconditions.checkNotNull(locale); List<String> columnHeaders = Lists.newArrayList(); if (chartCode == ChartCode.CC_COURT_CHART) { columnHeaders.add(messageSource.getMessage(COLUMN_HEADER_FROM_X_AXIS__COURT_NAME, null, locale)); } else { columnHeaders.add(messageSource.getMessage(COLUMN_HEADER_FROM_X_AXIS__PERIOD, null, locale)); } for (JudgmentSeriesFilter seriesFilter : analysisForm.getSeriesFilters()) { columnHeaders.add(generateColumnHeaderFromSeries(analysisForm.getYsettings().getValueType(), seriesFilter, locale)); } return columnHeaders.toArray(new String[columnHeaders.size()]); }  }
ChartCsvGenerator { public String[] generateHeader(ChartCode chartCode, AnalysisForm analysisForm, Locale locale) { Preconditions.checkNotNull(chartCode); Preconditions.checkNotNull(analysisForm); Preconditions.checkNotNull(locale); List<String> columnHeaders = Lists.newArrayList(); if (chartCode == ChartCode.CC_COURT_CHART) { columnHeaders.add(messageSource.getMessage(COLUMN_HEADER_FROM_X_AXIS__COURT_NAME, null, locale)); } else { columnHeaders.add(messageSource.getMessage(COLUMN_HEADER_FROM_X_AXIS__PERIOD, null, locale)); } for (JudgmentSeriesFilter seriesFilter : analysisForm.getSeriesFilters()) { columnHeaders.add(generateColumnHeaderFromSeries(analysisForm.getYsettings().getValueType(), seriesFilter, locale)); } return columnHeaders.toArray(new String[columnHeaders.size()]); }  String[] generateHeader(ChartCode chartCode, AnalysisForm analysisForm, Locale locale); String[] generateRow(Chart<Object, Number> chart, int rowNumber); @Autowired @Qualifier("csvPointValueFormatterManager") void setPointValueFormatterManager(PointValueFormatterManager pointValueFormatterManager); @Autowired void setMessageSource(MessageSource messageSource); }
ChartCsvGenerator { public String[] generateHeader(ChartCode chartCode, AnalysisForm analysisForm, Locale locale) { Preconditions.checkNotNull(chartCode); Preconditions.checkNotNull(analysisForm); Preconditions.checkNotNull(locale); List<String> columnHeaders = Lists.newArrayList(); if (chartCode == ChartCode.CC_COURT_CHART) { columnHeaders.add(messageSource.getMessage(COLUMN_HEADER_FROM_X_AXIS__COURT_NAME, null, locale)); } else { columnHeaders.add(messageSource.getMessage(COLUMN_HEADER_FROM_X_AXIS__PERIOD, null, locale)); } for (JudgmentSeriesFilter seriesFilter : analysisForm.getSeriesFilters()) { columnHeaders.add(generateColumnHeaderFromSeries(analysisForm.getYsettings().getValueType(), seriesFilter, locale)); } return columnHeaders.toArray(new String[columnHeaders.size()]); }  String[] generateHeader(ChartCode chartCode, AnalysisForm analysisForm, Locale locale); String[] generateRow(Chart<Object, Number> chart, int rowNumber); @Autowired @Qualifier("csvPointValueFormatterManager") void setPointValueFormatterManager(PointValueFormatterManager pointValueFormatterManager); @Autowired void setMessageSource(MessageSource messageSource);  }