@Test(dataProvider="computeCellLabelTests") public void testComputeCellLabel(String cellIdentifier, String rowLabel, String colLabel, String expected) { assertEquals(algorithm.computeCellLabel(cellIdentifier, rowLabel, colLabel, new HashSet<String>()), expected); }
String computeCellLabel(String identifier, String rowLabel, String colLabel, Set<String> contextWords) { if (identifier == null) { return ""; } List<String> labelWords = StringUtils.split(identifier, WORD_DELIMITER_PATTERN); labelWords.removeAll(StringUtils.split(rowLabel, WORD_DELIMITER_PATTERN)); labelWords.removeAll(StringUtils.split(colLabel, WORD_DELIMITER_PATTERN)); labelWords.removeAll(contextWords); return StringUtils.join(labelWords, WORD_SEPARATOR); }
AbbreviatingTableLabelingAlgorithm extends TableLabelingAlgorithm { String computeCellLabel(String identifier, String rowLabel, String colLabel, Set<String> contextWords) { if (identifier == null) { return ""; } List<String> labelWords = StringUtils.split(identifier, WORD_DELIMITER_PATTERN); labelWords.removeAll(StringUtils.split(rowLabel, WORD_DELIMITER_PATTERN)); labelWords.removeAll(StringUtils.split(colLabel, WORD_DELIMITER_PATTERN)); labelWords.removeAll(contextWords); return StringUtils.join(labelWords, WORD_SEPARATOR); } }
AbbreviatingTableLabelingAlgorithm extends TableLabelingAlgorithm { String computeCellLabel(String identifier, String rowLabel, String colLabel, Set<String> contextWords) { if (identifier == null) { return ""; } List<String> labelWords = StringUtils.split(identifier, WORD_DELIMITER_PATTERN); labelWords.removeAll(StringUtils.split(rowLabel, WORD_DELIMITER_PATTERN)); labelWords.removeAll(StringUtils.split(colLabel, WORD_DELIMITER_PATTERN)); labelWords.removeAll(contextWords); return StringUtils.join(labelWords, WORD_SEPARATOR); } AbbreviatingTableLabelingAlgorithm(); }
AbbreviatingTableLabelingAlgorithm extends TableLabelingAlgorithm { String computeCellLabel(String identifier, String rowLabel, String colLabel, Set<String> contextWords) { if (identifier == null) { return ""; } List<String> labelWords = StringUtils.split(identifier, WORD_DELIMITER_PATTERN); labelWords.removeAll(StringUtils.split(rowLabel, WORD_DELIMITER_PATTERN)); labelWords.removeAll(StringUtils.split(colLabel, WORD_DELIMITER_PATTERN)); labelWords.removeAll(contextWords); return StringUtils.join(labelWords, WORD_SEPARATOR); } AbbreviatingTableLabelingAlgorithm(); @Override void computeLabels(LabeledTableModel model); String[] getContextLabels(); void setContextLabels(String... labels); }
AbbreviatingTableLabelingAlgorithm extends TableLabelingAlgorithm { String computeCellLabel(String identifier, String rowLabel, String colLabel, Set<String> contextWords) { if (identifier == null) { return ""; } List<String> labelWords = StringUtils.split(identifier, WORD_DELIMITER_PATTERN); labelWords.removeAll(StringUtils.split(rowLabel, WORD_DELIMITER_PATTERN)); labelWords.removeAll(StringUtils.split(colLabel, WORD_DELIMITER_PATTERN)); labelWords.removeAll(contextWords); return StringUtils.join(labelWords, WORD_SEPARATOR); } AbbreviatingTableLabelingAlgorithm(); @Override void computeLabels(LabeledTableModel model); String[] getContextLabels(); void setContextLabels(String... labels);  }