private void renderException(Exc exc, StringBuilder result) { result.append(exc.getLemma().replace(' ', '_')); for (String e : exc.getExceptions()) { result.append(' ').append(e.replace(' ', '_')); } }
private void renderException(Exc exc, StringBuilder result) { result.append(exc.getLemma().replace(' ', '_')); for (String e : exc.getExceptions()) { result.append(' ').append(e.replace(' ', '_')); } }
public boolean execute(POS pos, String derivation, BaseFormSet form) throws JWNLException { Exc exc = null == dictionary ? null : dictionary.getException(pos, derivation); if (null != exc) { for (String exception : exc.getExceptions()) { form.add(exception); } return true; } return false; } }
public boolean execute(POS pos, String derivation, BaseFormSet form) throws JWNLException { Exc exc = null == dictionary ? null : dictionary.getException(pos, derivation); if (null != exc) { for (String exception : exc.getExceptions()) { form.add(exception); } return true; } return false; } }
/** * 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"); } }
final Exc e = d.getException(pos, derivation); if (null != e) { if (null != e.getExceptions()) { if (!e.getExceptions().contains(baseform)) { e.getExceptions().add(baseform); if (i < args.length && '-' != args[i].charAt(0)) { final String baseform = args[i].replace('_', ' '); if (null != e.getExceptions()) { if (e.getExceptions().contains(baseform)) { e.getExceptions().remove(baseform); if (0 == e.getExceptions().size()) { d.removeException(e);
final Exc e = d.getException(pos, derivation); if (null != e) { if (null != e.getExceptions()) { if (!e.getExceptions().contains(baseform)) { e.getExceptions().add(baseform); if (i < args.length && '-' != args[i].charAt(0)) { final String baseform = args[i].replace('_', ' '); if (null != e.getExceptions()) { if (e.getExceptions().contains(baseform)) { e.getExceptions().remove(baseform); if (0 == e.getExceptions().size()) { d.removeException(e);