/** * Returns a rendering of this table with all cells converted to text. **/ public String[][] asText() { String[][] result = new String[ getRowCount() ][ getColumnCount() ]; for (int i = 0; i < result.length; i++) { for (int j= 0; j < result[0].length; j++) { result[i][j] = getCellAsText( i, j ); } } return result; }
/** * Returns a rendering of this table with all cells converted to text. **/ public String[][] asText() { String[][] result = new String[ getRowCount() ][ getColumnCount() ]; for (int i = 0; i < result.length; i++) { for (int j= 0; j < result[0].length; j++) { result[i][j] = getCellAsText( i, j ); } } return result; }
/** * Returns a rendering of this table with all cells converted to text. **/ public String[][] asText() { String[][] result = new String[ getRowCount() ][ getColumnCount() ]; for (int i = 0; i < result.length; i++) { for (int j= 0; j < result[0].length; j++) { result[i][j] = getCellAsText( i, j ); } } return result; }
public boolean matchesCriteria( Object htmlElement, Object criteria ) { WebTable table = ((WebTable) htmlElement); for (int row = 0; row < table.getRowCount(); row++) { for (int col = 0; col < table.getColumnCount(); col++) { if (HttpUnitUtils.hasPrefix( table.getCellAsText( row, col ).trim(), (String) criteria)) return true; } } return false; } };
public boolean matchesCriteria( Object htmlElement, Object criteria ) { WebTable table = ((WebTable) htmlElement); for (int row = 0; row < table.getRowCount(); row++) { for (int col = 0; col < table.getColumnCount(); col++) { if (HttpUnitUtils.matches( table.getCellAsText( row, col ).trim(), (String) criteria)) return true; } } return false; } };
public boolean matchesCriteria( Object htmlElement, Object criteria ) { WebTable table = ((WebTable) htmlElement); for (int row = 0; row < table.getRowCount(); row++) { for (int col = 0; col < table.getColumnCount(); col++) { if (HttpUnitUtils.hasPrefix( table.getCellAsText( row, col ).trim(), (String) criteria)) return true; } } return false; } };
public boolean matchesCriteria( Object htmlElement, Object criteria ) { WebTable table = ((WebTable) htmlElement); for (int row = 0; row < table.getRowCount(); row++) { for (int col = 0; col < table.getColumnCount(); col++) { if (HttpUnitUtils.matches( table.getCellAsText( row, col ).trim(), (String) criteria)) return true; } } return false; } };
public boolean matchesCriteria( Object htmlElement, Object criteria ) { WebTable table = ((WebTable) htmlElement); for (int row = 0; row < table.getRowCount(); row++) { for (int col = 0; col < table.getColumnCount(); col++) { if (HttpUnitUtils.hasPrefix( table.getCellAsText( row, col ).trim(), (String) criteria)) return true; } } return false; } };
public boolean matchesCriteria( Object htmlElement, Object criteria ) { WebTable table = ((WebTable) htmlElement); for (int row = 0; row < table.getRowCount(); row++) { for (int col = 0; col < table.getColumnCount(); col++) { if (HttpUnitUtils.matches( table.getCellAsText( row, col ).trim(), (String) criteria)) return true; } } return false; } };
protected Object scrape() throws IOException, SAXException, ProcessingException { WebResponse response = goTo(project._getURL()+"/servlets/SummarizeList?listName="+name); WebTable listInfo = response.getTableStartingWith("List address"); if (listInfo == null) throw new ProcessingException("Unable to find the list table"); description = listInfo.getCellAsText(1,1); totalMessages = new Integer(listInfo.getCellAsText(2,1)); WebTable monthInfo = response.getTableStartingWith("Month"); messagesPerMonth = new ArrayList<MessagePerMonth>(); if(monthInfo==null) { if(totalMessages==0) return null; //this is to be expected else throw new ProcessingException("month table not found, even though the total message count isn't 0"); } int numRows = monthInfo.getRowCount(); // we start at row 1, since the row 0 is the header for (int r = 1; r < numRows; r++) { String month = monthInfo.getCellAsText(r,0).trim(); String messages = monthInfo.getCellAsText(r,1).trim(); messagesPerMonth.add( new MessagePerMonth(month,Integer.parseInt(messages)) ); } return null; } }.run();
if( tbl.getCellAsText(0,2).indexOf("Roles requested")==-1 ) continue; if( tbl.getCellAsText(0,3).indexOf("Operations")==-1 ) continue;
JNUser user = root.getUser(users.getCellAsText(r,0).trim()); String cell = users.getCellAsText(r, 2);
if (getCellAsText(row,col).trim().length() == 0) continue; if (getTableCell(row,col).getColSpan() == 1 && getTableCell(row,col).getRowSpan() == 1) { if (!rowHasText[row]) numRowsWithText++;
if (getCellAsText(row,col).trim().length() == 0) continue; if (getTableCell(row,col).getColSpan() == 1 && getTableCell(row,col).getRowSpan() == 1) { if (!rowHasText[row]) numRowsWithText++;
if (getCellAsText(row,col).trim().length() == 0) continue; if (getTableCell(row,col).getColSpan() == 1 && getTableCell(row,col).getRowSpan() == 1) { if (!rowHasText[row]) numRowsWithText++;
if( !t.getCellAsText(i,0).trim().equals(user.getName()) ) continue; if( !t.getCellAsText(i,2).trim().equals(roleName) ) continue;