private Row readRow(){ Map<Column, Cell> values = new LinkedHashMap<Column, Cell>(); try { values.putAll(readMolfile()); values.putAll(readData()); } catch(EOFException eofe){ return null; } catch(IOException ioe){ throw new RuntimeException(ioe); } return new Row(String.valueOf(this.index++), values); }
public Row getRow(int row){ Map<Column, Cell> values = new LinkedHashMap<Column, Cell>(); int columns = getColumnCount(); for(int column = 0; column < columns; column++){ values.put(getColumn(column), getCell(row, column)); } return new Row(formatRowId(row), values); }
rows.add(new Row(rowIds[i], cells));
private void addCompounds(Collection<Compound> compounds) { for (Compound c: compounds) { Map<Column, Cell> values = new LinkedHashMap<Column, Cell>(); addAttribute(c.getId(), ID_COLUMN, values); addAttribute(c.getName(), NAME_COLUMN, values); addAttribute(c.getCas(), CAS_COLUMN, values); addAttribute(c.getInChI(), INCHI_COLUMN, values); rows.add(new Row(c.getId(), values)); } }