public Object getKey() { return getLemma(); }
public Object getKey() { return getLemma(); }
private void renderException(Exc exc, StringBuilder result) { result.append(exc.getLemma().replace(' ', '_')); for (String e : exc.getExceptions()) { result.append(' ').append(e.replace(' ', '_')); } }
public String toString() { StringBuilder str = new StringBuilder(); for (int i = 0; i < exceptions.size(); i++) { str.append(exceptions.get(i)); if (i != exceptions.size() - 1) { str.append(", "); } } return ResourceBundleSet.insertParams("Exc: [Lemma: {0}] Exceptions: {1}]", new Object[]{getLemma(), str.toString()}); } }
public String toString() { StringBuilder str = new StringBuilder(); for (int i = 0; i < exceptions.size(); i++) { str.append(exceptions.get(i)); if (i != exceptions.size() - 1) { str.append(", "); } } return ResourceBundleSet.insertParams("Exc: [Lemma: {0}] Exceptions: {1}]", new Object[]{getLemma(), str.toString()}); } }
private void renderException(Exc exc, StringBuilder result) { result.append(exc.getLemma().replace(' ', '_')); for (String e : exc.getExceptions()) { result.append(' ').append(e.replace(' ', '_')); } }
/** * Store the exceptions file. * * @param itr iterator * @throws SQLException SQLException */ protected void storeExceptions(Iterator<Exc> itr) throws SQLException { log.info("storing exceptions"); PreparedStatement exStmt = connection.prepareStatement("INSERT INTO exceptions VALUES(?,?,?,?)"); while (itr.hasNext()) { Exc exc = itr.next(); exStmt.setString(4, exc.getLemma()); for (Object o : exc.getExceptions()) { exStmt.setInt(1, nextId()); exStmt.setString(2, exc.getPOS().getKey()); exStmt.setString(3, (String) o); exStmt.addBatch(); } } exStmt.executeBatch(); log.info("stored exceptions"); } }
/** * Store the exceptions file. * * @param itr iterator * @throws SQLException SQLException */ protected void storeExceptions(Iterator<Exc> itr) throws SQLException { log.info("storing exceptions"); PreparedStatement exStmt = connection.prepareStatement("INSERT INTO exceptions VALUES(?,?,?,?)"); while (itr.hasNext()) { Exc exc = itr.next(); exStmt.setString(4, exc.getLemma()); for (Object o : exc.getExceptions()) { exStmt.setInt(1, nextId()); exStmt.setString(2, exc.getPOS().getKey()); exStmt.setString(3, (String) o); exStmt.addBatch(); } } exStmt.executeBatch(); log.info("stored exceptions"); } }