private boolean isEmptyRow(Row w) { for( int col=0; col<w.size(); col++ ) if( !w.get(col).trim().isEmpty() ) return false; return true; }
public String getByColumnPrefix(int row, String column) { int c = -1; String s = ""; for (int i = 0; i < columns.size(); i++) { s = s + ","+columns.get(i); if (columns.get(i).startsWith(column)) c = i; } if (c == -1) return ""; // throw new FHIRException("unable to find column "+column+" in "+s.substring(1)); else if (rows.get(row).size() <= c) return ""; else return rows.get(row).get(c).trim(); }
public String getColumn(int row, String column) { int c = -1; String s = ""; for (int i = 0; i < columns.size(); i++) { s = s + ","+columns.get(i); if (columns.get(i).equalsIgnoreCase(column)) c = i; } if (c == -1) return ""; // throw new FHIRException("unable to find column "+column+" in "+s.substring(1)); else if (rows.get(row).size() <= c) return ""; else { s = rows.get(row).get(c); return s == null ? "" : s.trim(); } }
private Row readRow(Element row) throws DOMException, FHIRException { Row res = new Row(); int ndx = 1; NodeList cells = row.getElementsByTagNameNS(XLS_NS, "Cell"); for (int i = 0; i < cells.getLength(); i++) { Element cell = (Element) cells.item(i); if (cell.hasAttributeNS(XLS_NS, "Index")) { int index = Integer.parseInt(cell.getAttributeNS(XLS_NS, "Index")); while (ndx < index) { res.add(""); ndx++; } } res.add(readData(cell, ndx, res.size() > 0 ? res.get(0) : "?")); ndx++; } return res; }
public String getByColumnPrefix(int row, String column) { int c = -1; String s = ""; for (int i = 0; i < columns.size(); i++) { s = s + ","+columns.get(i); if (columns.get(i).startsWith(column)) c = i; } if (c == -1) return ""; // throw new FHIRException("unable to find column "+column+" in "+s.substring(1)); else if (rows.get(row).size() <= c) return ""; else return rows.get(row).get(c).trim(); }
private boolean isEmptyRow(Row w) { for( int col=0; col<w.size(); col++ ) if( !w.get(col).trim().isEmpty() ) return false; return true; }
public boolean hasColumn(String column) { for (int i = 0; i < columns.size(); i++) { if (columns.get(i).equalsIgnoreCase(column)) return true; } return false; }
public boolean hasColumnContent(String col) { int i = columns.indexOf(col); if (i == -1) return false; for (Row r : rows) { if (r.size() > i && !Utilities.noString(r.get(i))) return true; } return false; }
private Row readRow(Element row) throws DOMException, FHIRException { Row res = new Row(); int ndx = 1; NodeList cells = row.getElementsByTagNameNS(XLS_NS, "Cell"); for (int i = 0; i < cells.getLength(); i++) { Element cell = (Element) cells.item(i); if (cell.hasAttributeNS(XLS_NS, "Index")) { int index = Integer.parseInt(cell.getAttributeNS(XLS_NS, "Index")); while (ndx < index) { res.add(""); ndx++; } } res.add(readData(cell, ndx, res.size() > 0 ? res.get(0) : "?")); ndx++; } return res; }
public String getColumn(int row, String column) { int c = -1; String s = ""; for (int i = 0; i < columns.size(); i++) { s = s + ","+columns.get(i); if (columns.get(i).equalsIgnoreCase(column)) c = i; } if (c == -1) return ""; // throw new FHIRException("unable to find column "+column+" in "+s.substring(1)); else if (rows.get(row).size() <= c) return ""; else { s = rows.get(row).get(c); return s == null ? "" : s.trim(); } }
public boolean hasColumnContent(String col) { int i = columns.indexOf(col); if (i == -1) return false; for (Row r : rows) { if (r.size() > i && !Utilities.noString(r.get(i))) return true; } return false; }
public boolean hasColumn(String column) { for (int i = 0; i < columns.size(); i++) { if (columns.get(i).equalsIgnoreCase(column)) return true; } return false; }