@Test public void testComputeCellLabels() { LabeledTableModel model = new MockLabeledTableModel(); algorithm.computeCellLabels(model, Collections.<String>emptySet()); assertEquals(model.getCellName(0, 0), ""); assertEquals(model.getCellName(0, 1), ""); assertEquals(model.getCellName(1, 0), ""); assertEquals(model.getCellName(1, 1), ""); }
void computeCellLabels(LabeledTableModel model, Set<String> contextWords) { for (int row=0; row < model.getRowCount(); ++row) { for (int col=0; col < model.getColumnCount(); ++col) { String identifier = model.getIdentifierAt(row, col); String rowLabel = model.getFullRowName(row); String colLabel = model.getFullColumnName(col); model.setCellName(row, col, computeCellLabel(identifier, rowLabel, colLabel, contextWords)); } } }
AbbreviatingTableLabelingAlgorithm extends TableLabelingAlgorithm { void computeCellLabels(LabeledTableModel model, Set<String> contextWords) { for (int row=0; row < model.getRowCount(); ++row) { for (int col=0; col < model.getColumnCount(); ++col) { String identifier = model.getIdentifierAt(row, col); String rowLabel = model.getFullRowName(row); String colLabel = model.getFullColumnName(col); model.setCellName(row, col, computeCellLabel(identifier, rowLabel, colLabel, contextWords)); } } } }
AbbreviatingTableLabelingAlgorithm extends TableLabelingAlgorithm { void computeCellLabels(LabeledTableModel model, Set<String> contextWords) { for (int row=0; row < model.getRowCount(); ++row) { for (int col=0; col < model.getColumnCount(); ++col) { String identifier = model.getIdentifierAt(row, col); String rowLabel = model.getFullRowName(row); String colLabel = model.getFullColumnName(col); model.setCellName(row, col, computeCellLabel(identifier, rowLabel, colLabel, contextWords)); } } } AbbreviatingTableLabelingAlgorithm(); }
AbbreviatingTableLabelingAlgorithm extends TableLabelingAlgorithm { void computeCellLabels(LabeledTableModel model, Set<String> contextWords) { for (int row=0; row < model.getRowCount(); ++row) { for (int col=0; col < model.getColumnCount(); ++col) { String identifier = model.getIdentifierAt(row, col); String rowLabel = model.getFullRowName(row); String colLabel = model.getFullColumnName(col); model.setCellName(row, col, computeCellLabel(identifier, rowLabel, colLabel, contextWords)); } } } AbbreviatingTableLabelingAlgorithm(); @Override void computeLabels(LabeledTableModel model); String[] getContextLabels(); void setContextLabels(String... labels); }
AbbreviatingTableLabelingAlgorithm extends TableLabelingAlgorithm { void computeCellLabels(LabeledTableModel model, Set<String> contextWords) { for (int row=0; row < model.getRowCount(); ++row) { for (int col=0; col < model.getColumnCount(); ++col) { String identifier = model.getIdentifierAt(row, col); String rowLabel = model.getFullRowName(row); String colLabel = model.getFullColumnName(col); model.setCellName(row, col, computeCellLabel(identifier, rowLabel, colLabel, contextWords)); } } } AbbreviatingTableLabelingAlgorithm(); @Override void computeLabels(LabeledTableModel model); String[] getContextLabels(); void setContextLabels(String... labels);  }