Changeset 259
- Timestamp:
- 01/05/08 15:29:23 (1 year ago)
- Files:
-
- lex/trunk/.settings/org.eclipse.core.resources.prefs (modified) (3 diffs)
- lex/trunk/jsp/clause.jsp (modified) (8 diffs)
- lex/trunk/jsp/gen-export.jsp (modified) (1 diff)
- lex/trunk/jsp/header.jsp (deleted)
- lex/trunk/jsp/header2.jsp (modified) (1 diff)
- lex/trunk/jsp/navclause.jsp (modified) (6 diffs)
- lex/trunk/jsp/parse.jsp (modified) (3 diffs)
- lex/trunk/jsp/published.jsp (modified) (2 diffs)
- lex/trunk/jsp/WEB-INF/web.xml (modified) (1 diff)
- lex/trunk/src/com/qwirx/crosswire/kjv/KJV.java (modified) (1 diff)
- lex/trunk/src/com/qwirx/db/sql/SqlDatabase.java (modified) (6 diffs)
- lex/trunk/src/com/qwirx/lex/emdros/EmdrosDatabase.java (modified) (12 diffs)
- lex/trunk/src/com/qwirx/lex/GenExporter.java (modified) (8 diffs)
- lex/trunk/src/com/qwirx/lex/hebrew/HebrewConverter.java (modified) (8 diffs)
- lex/trunk/src/com/qwirx/lex/hebrew/HebrewEnglishDatabase.java (modified) (1 diff)
- lex/trunk/src/com/qwirx/lex/Lex.java (modified) (8 diffs)
- lex/trunk/src/com/qwirx/lex/LexContextListener.java (added)
- lex/trunk/src/com/qwirx/lex/lexicon/Lexeme.java (modified) (8 diffs)
- lex/trunk/src/com/qwirx/lex/morph/HebrewMorphemeGenerator.java (modified) (4 diffs)
- lex/trunk/src/com/qwirx/lex/morph/MorphemeHandler.java (modified) (1 diff)
- lex/trunk/src/com/qwirx/lex/ontology/OntologyDb.java (modified) (2 diffs)
- lex/trunk/src/com/qwirx/lex/parser/MorphEdge.java (modified) (1 diff)
- lex/trunk/src/com/qwirx/lex/Search.java (modified) (7 diffs)
- lex/trunk/src/com/qwirx/lex/wordnet/Wordnet.java (modified) (2 diffs)
- lex/trunk/test/com/qwirx/lex/EmdrosDatabaseTest.java (modified) (3 diffs)
- lex/trunk/test/com/qwirx/lex/GenExporterTest.java (modified) (3 diffs)
- lex/trunk/test/com/qwirx/lex/JswordExamples.java (modified) (1 diff)
- lex/trunk/test/com/qwirx/lex/LexemeTest.java (modified) (3 diffs)
- lex/trunk/test/com/qwirx/lex/SearchTest.java (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lex/trunk/.settings/org.eclipse.core.resources.prefs
r216 r259 1 # Fri Dec 28 01:47:54 CET 20071 #Wed Jan 02 17:36:47 CET 2008 2 2 eclipse.preferences.version=1 3 encoding//jsp/attributes.jsp=UTF-8 3 4 encoding//jsp/auth.jsp=UTF-8 4 5 encoding//jsp/clause.jsp=UTF-8 … … 6 7 encoding//jsp/dump.jsp=UTF-8 7 8 encoding//jsp/error.jsp=UTF-8 9 encoding//jsp/export.jsp=UTF-8 10 encoding//jsp/footer.jsp=UTF-8 8 11 encoding//jsp/gen-export.jsp=UTF-8 9 encoding//jsp/header .jsp=UTF-812 encoding//jsp/header2.jsp=UTF-8 10 13 encoding//jsp/index.jsp=UTF-8 11 14 encoding//jsp/login.jsp=UTF-8 … … 13 16 encoding//jsp/navclause.jsp=UTF-8 14 17 encoding//jsp/parse.jsp=UTF-8 18 encoding//jsp/published.jsp=UTF-8 15 19 encoding//jsp/rules.jsp=UTF-8 20 encoding//jsp/search.jsp=UTF-8 16 21 encoding/<project>=UTF-8 lex/trunk/jsp/clause.jsp
r256 r259 9 9 <%@ page import="com.qwirx.lex.parser.*" %> 10 10 <%@ page import="com.qwirx.lex.morph.*" %> 11 <%@ page import="com.qwirx.lex.lexicon.*" %> 11 12 <%@ page import="com.qwirx.crosswire.kjv.KJV" %> 12 13 <%@ page import="org.crosswire.jsword.book.*" %> … … 129 130 } 130 131 } 131 132 132 133 BorderTableRenderer rend = new BorderTableRenderer(); 133 134 … … 157 158 StringBuffer hebrewText = new StringBuffer(); 158 159 List morphEdges = new ArrayList(); 159 HebrewMorphemeGenerator generator = new HebrewMorphemeGenerator( emdros);160 HebrewMorphemeGenerator generator = new HebrewMorphemeGenerator(); 160 161 161 162 /* Prescan to find the predicate lexeme and populate the chart */ … … 272 273 !phrases.hasNext() && !words.hasNext()); 273 274 274 generator.parse(word, hfc, true );275 generator.parse(word, hfc, true, sql); 275 276 isFirstWord = false; 276 277 … … 460 461 461 462 SheafConstIterator phrases = clause.getSheaf().const_iterator(); 462 while (phrases.hasNext()) { 463 while (phrases.hasNext()) 464 { 463 465 MatchedObject phrase = 464 466 phrases.next().const_iterator().next(); … … 480 482 words.next().const_iterator().next(); 481 483 column++; 482 boolean canWriteToWord = emdros.canWriteTo(word);483 484 484 485 if (type.equals("word")) 485 486 { 486 String lexeme = HebrewConverter.wordTranslitToHtml(word, 487 generator); 488 String part_of_speech = (String) 489 parts_of_speech.get(word.getEMdFValue("phrase_dependent_part_of_speech") 490 .toString()); 487 Lexeme lexeme = Lexeme.findOrBuild(sql, word); 488 489 String part_of_speech = word.getFeatureAsString( 490 word.getEMdFValueIndex( 491 "phrase_dependent_part_of_speech")); 492 boolean canWriteToWord = emdros.canWriteTo(word); 491 493 492 494 Cell cell = new Cell(); 493 cell.label = lexeme ;495 cell.label = lexeme.getTranslit(); 494 496 cell.columns = 1; 495 497 word_row.addElement(cell); 496 498 497 499 int wid = word.getID_D(); 498 499 PreparedStatement stmt = sql.prepareSelect( 500 "SELECT ID, Gloss FROM lexicon_entries "+ 501 "WHERE Lexeme = ?"); 502 stmt.setString(1, lexeme); 503 ResultSet rs = sql.select(); 504 String lexiconGloss = ""; 505 int lexId = -1; 506 if (rs.next()) 507 { 508 lexId = rs.getInt(1); 509 lexiconGloss = rs.getString(2); 510 if (lexiconGloss == null) lexiconGloss = ""; 511 } 512 sql.finish(); 513 500 514 501 // lexicon gloss 515 502 { … … 520 507 request.getParameter("ewgs") != null) 521 508 { 522 lexiconGloss = request.getParameter("gloss"); 523 Change ch; 524 if (lexId == -1) 525 { 526 ch = sql.createChange( 527 SqlChange.INSERT, "lexicon_entries", null); 528 ch.setString("Lexeme", lexeme); 529 } 530 else 531 { 532 ch = sql.createChange( 533 SqlChange.UPDATE, "lexicon_entries", 534 "ID = "+lexId); 535 } 536 ch.setString("Gloss", lexiconGloss); 537 ch.execute(); 509 lexeme.setGloss(request.getParameter("gloss")); 510 lexeme.save(); 511 lexeme = Lexeme.load(sql, word); 538 512 ewgId = -1; 539 513 } 514 515 String lexiconGloss = lexeme.getGloss(); 540 516 541 517 if (ewgId == wid) 542 518 { 519 if (lexiconGloss == null) 520 { 521 lexiconGloss = ""; 522 } 543 523 glossCell.html = "<form method=\"post\">\n" + 544 524 "<input type=\"hidden\" name=\"ewg\"" + 545 525 " value=\"" + wid + "\">\n" + 546 526 "<input name=\"gloss\" size=\"10\" value=\"" + 547 lexiconGloss.replaceAll("<", "<") 548 .replaceAll(">", ">") + 527 HebrewConverter.toHtml(lexiconGloss) + 549 528 "\">\n" + 550 529 "<input type=\"submit\" name=\"ewgs\""+ … … 554 533 else 555 534 { 535 if (lexiconGloss == null) 536 { 537 lexiconGloss = "(gloss)"; 538 } 556 539 glossCell.html = "<a href=\"clause.jsp?ewg=" + 557 wid + "\">" + 558 (lexiconGloss.equals("") ? "(gloss)" : 559 lexiconGloss) + 560 "</a>"; 540 wid + "\">" + lexiconGloss + "</a>"; 561 541 } 562 542 } lex/trunk/jsp/gen-export.jsp
r257 r259 68 68 "attachment; filename=export.gen"); 69 69 response.getWriter().print( 70 new GenExporter( emdros).export(clause, verseData));70 new GenExporter().export(clause, verseData, sql)); 71 71 } 72 72 finally lex/trunk/jsp/header2.jsp
r247 r259 78 78 try 79 79 { 80 emdros = Lex.getEmdrosDatabase(username, hostname );80 emdros = Lex.getEmdrosDatabase(username, hostname, sql); 81 81 int min_m = emdros.getMinM(), max_m = emdros.getMaxM(); 82 82 int real_min_m = min_m, real_max_m = max_m; lex/trunk/jsp/navclause.jsp
r245 r259 33 33 } 34 34 } 35 35 36 36 { 37 37 boolean foundBook = false; … … 82 82 if (min_m < new_min_m) min_m = new_min_m; 83 83 if (max_m > new_max_m) max_m = new_max_m; 84 if (min_m > max_m) max_m = min_m + 1; 84 85 // System.out.println("book restricts to " + min_m + "-" + max_m); 85 86 } … … 170 171 int new_min_m = Integer.parseInt(monad_row.getColumn(2)); 171 172 int new_max_m = Integer.parseInt(monad_row.getColumn(3)); 173 System.out.println("before chapter was " + min_m + "-" + max_m); 172 174 if (min_m < new_min_m) min_m = new_min_m; 173 175 if (max_m > new_max_m) max_m = new_max_m; 174 // System.out.println("chapter restricts to " + min_m + "-" + max_m); 176 if (min_m > max_m) max_m = min_m + 1; 177 System.out.println("chapter restricts to " + min_m + "-" + max_m); 175 178 } 176 179 … … 196 199 <% 197 200 int selVerseNum = 1; 201 System.out.println("4"); 198 202 199 203 { … … 261 265 <% 262 266 int selClauseId = 0; 267 System.out.println("5"); 263 268 264 269 { … … 280 285 boolean foundSelectedClause = false; 281 286 int defaultClauseId = 0; 282 HebrewMorphemeGenerator generator = new HebrewMorphemeGenerator( emdros);287 HebrewMorphemeGenerator generator = new HebrewMorphemeGenerator(); 283 288 284 289 Sheaf sheaf = emdros.getSheaf lex/trunk/jsp/parse.jsp
r239 r259 263 263 " type_id, macrorole_number "+ 264 264 " [word GET lexeme, phrase_dependent_part_of_speech, "+ 265 " tense, wordnet_gloss, wordnet_synset, " +265 " tense, stem, wordnet_gloss, wordnet_synset, " + 266 266 " graphical_preformative, " + 267 267 " graphical_locative, " + … … 305 305 { 306 306 TreeNode root = new TreeNode("root"); 307 HebrewMorphemeGenerator gen = new HebrewMorphemeGenerator( emdros);307 HebrewMorphemeGenerator gen = new HebrewMorphemeGenerator(); 308 308 309 309 { … … 364 364 morphEdges); 365 365 366 gen.parse(word, hfc, true );366 gen.parse(word, hfc, true, sql); 367 367 368 368 hebrewText.append(" "); lex/trunk/jsp/published.jsp
r254 r259 45 45 <table class="search_results"> 46 46 <tr> 47 <th>Reference</th>48 47 <th>Verb</th> 49 48 <th>Logical Structure</th> 49 <th>Reference</th> 50 50 </tr> 51 51 <% … … 57 57 %> 58 58 <tr> 59 <td><a href="result.getLinkUrl()"><%= result.getLocation() %></a></td> 60 <td><%= HebrewConverter.toHebrew(result.getPredicate()) %></td> 61 <td><%= HebrewConverter.toHtml(result.getLogicalStructure()) %></td> 59 <td><%= 60 HebrewConverter.toHebrew(result.getPredicate()) 61 %></td> 62 <td><%= 63 HebrewConverter.toHtml(result.getLogicalStructure()) 64 %></td> 65 <td><a href="<%= result.getLinkUrl() %>"><%= 66 result.getLocation() 67 %></a></td> 62 68 </tr> 63 69 <% lex/trunk/jsp/WEB-INF/web.xml
r26 r259 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 2 3 <!DOCTYPE web-app 3 PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"4 "http://java.sun.com/dtd/web-app_2_3.dtd">4 PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" 5 "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd"> 5 6 6 7 <web-app> 7 8 <display-name>Lex</display-name> 8 9 <description>Lex</description> 10 11 <!-- lifecycle listeners --> 12 13 <listener> 14 <listener-class>com.qwirx.lex.LexContextListener</listener-class> 15 </listener> 9 16 10 17 <!-- Filters --> lex/trunk/src/com/qwirx/crosswire/kjv/KJV.java
r249 r259 7 7 import java.util.List; 8 8 import java.util.Map; 9 import java.util.Set;10 import java.util.TreeSet;11 9 12 10 import jemdros.Table; lex/trunk/src/com/qwirx/db/sql/SqlDatabase.java
r213 r259 32 32 public class SqlDatabase implements Database 33 33 { 34 private Connection conn;34 private Connection m_Connection; 35 35 private PreparedStatement stmt; 36 36 private ResultSet rs; … … 42 42 throws DatabaseException 43 43 { 44 this. conn = conn;44 this.m_Connection = conn; 45 45 this.username = username; 46 46 this.database = database; … … 88 88 } 89 89 } 90 90 91 public Connection getConnection() 92 { 93 return m_Connection; 94 } 95 91 96 public void executeDirect(String sql) throws DatabaseException 92 97 { … … 94 99 { 95 100 long startTime = System.currentTimeMillis(); 96 PreparedStatement s = conn.prepareStatement(sql);101 PreparedStatement s = m_Connection.prepareStatement(sql); 97 102 s.executeUpdate(); 98 103 s.close(); … … 121 126 try 122 127 { 123 stmt = conn.prepareStatement(sql);128 stmt = m_Connection.prepareStatement(sql); 124 129 } 125 130 catch (SQLException e) … … 184 189 { 185 190 return new SqlChange(username, database, 186 (SqlChange.Type)type, table, (String)conditions, conn);191 (SqlChange.Type)type, table, (String)conditions, m_Connection); 187 192 } 188 193 189 194 public void close() throws SQLException 190 195 { 191 conn.close();196 m_Connection.close(); 192 197 } 193 198 lex/trunk/src/com/qwirx/lex/emdros/EmdrosDatabase.java
r234 r259 18 18 import jemdros.BadMonadsException; 19 19 import jemdros.EmdrosEnv; 20 import jemdros.EmdrosException; 20 21 import jemdros.FlatSheaf; 21 22 import jemdros.MatchedObject; … … 46 47 { 47 48 private EmdrosEnv env; 48 private Connection conn;49 private Connection m_LogDatabase; 49 50 private String username, userhost, database; 50 51 private static final Logger m_LOG = Logger.getLogger(EmdrosDatabase.class); … … 52 53 public EmdrosDatabase(String dbHost, String dbName, String dbUser, 53 54 String dbPass, String logUser, String logFrom, Connection logDb) 54 throws DatabaseException 55 throws DatabaseException, EmdrosException 55 56 { 56 57 env = new EmdrosEnv(eOutputKind.kOKConsole, … … 63 64 } 64 65 65 this.conn= logDb;66 m_LogDatabase = logDb; 66 67 this.username = logUser; 67 68 this.userhost = logUser + "@" + logFrom; … … 72 73 { 73 74 return env.connectionOk(); 75 } 76 77 public void setLogConnection(Connection logDb) 78 { 79 m_LogDatabase = logDb; 74 80 } 75 81 … … 301 307 302 308 public SetOfMonads intersect(SetOfMonads set, int min_m, int max_m) 303 { 309 throws EmdrosException 310 { 311 System.out.println(set.toString()); 312 System.out.println(min_m + " : " + max_m); 304 313 return SetOfMonads.intersect(set, new SetOfMonads(min_m, max_m)); 305 314 } 306 315 307 316 public Change createChange(ChangeType changeType, String objectType, 308 Object objectIds) throws DatabaseException 317 Object objectIds) 318 throws DatabaseException 309 319 { 310 320 int [] id_ds = (int [])objectIds; … … 319 329 } 320 330 } 321 catch ( DatabaseException e)331 catch (Exception e) 322 332 { 323 333 throw new DatabaseException("Failed to determine object access", … … 326 336 327 337 return new EmdrosChange(username+"@"+userhost, database, 328 (EmdrosChange.Type)changeType, objectType, conn, this,338 (EmdrosChange.Type)changeType, objectType, m_LogDatabase, this, 329 339 id_ds); 330 340 } … … 394 404 395 405 public SetOfMonads getVisibleMonads() 396 throws SQLException 397 { 398 PreparedStatement stmt = conn.prepareStatement406 throws SQLException, EmdrosException 407 { 408 PreparedStatement stmt = m_LogDatabase.prepareStatement 399 409 ( 400 410 "SELECT Monad_First, Monad_Last " + … … 437 447 438 448 public boolean canWriteTo(String objectType, int objectId) 439 throws DatabaseException 449 throws DatabaseException, EmdrosException 440 450 { 441 451 return canWriteTo(objectType, new int[]{objectId}); … … 443 453 444 454 public boolean canWriteTo(String objectType, int[] objectIds) 445 throws DatabaseException 455 throws DatabaseException, EmdrosException 446 456 { 447 457 String query = "GET MONADS FROM OBJECTS WITH ID_DS = "; … … 493 503 try 494 504 { 495 stmt = conn.prepareStatement(query);505 stmt = m_LogDatabase.prepareStatement(query); 496 506 stmt.setString(1, username); 497 507 rs = stmt.executeQuery(); lex/trunk/src/com/qwirx/lex/GenExporter.java
r220 r259 2 2 3 3 import java.io.IOException; 4 import java.sql.SQLException; 4 5 6 import jemdros.EmdrosException; 5 7 import jemdros.MatchedObject; 6 8 import jemdros.SheafConstIterator; … … 11 13 12 14 import com.qwirx.db.DatabaseException; 13 import com.qwirx. lex.emdros.EmdrosDatabase;15 import com.qwirx.db.sql.SqlDatabase; 14 16 import com.qwirx.lex.hebrew.HebrewConverter; 15 17 import com.qwirx.lex.morph.HebrewMorphemeGenerator; … … 18 20 public class GenExporter 19 21 { 20 private HebrewMorphemeGenerator m_Generator; 21 22 public GenExporter(EmdrosDatabase emdros) 23 throws IOException, DatabaseException, SAXException 24 { 25 m_Generator = new HebrewMorphemeGenerator(emdros); 26 } 27 28 public String export(MatchedObject object, BookData verse) 29 throws IOException, BookException 22 public String export(MatchedObject object, BookData verse, SqlDatabase sql) 23 throws IOException, BookException, SAXException, 24 DatabaseException, SQLException, EmdrosException 30 25 { 31 26 StringBuffer buf = new StringBuffer(); … … 44 39 "\n"); 45 40 46 exportObject(object, verse, buf );41 exportObject(object, verse, buf, sql); 47 42 48 43 return buf.toString(); … … 63 58 boolean lastMorpheme, String desc, 64 59 String morphNode) 60 throws EmdrosException 65 61 { 66 62 String raw = m_Word.getEMdFValue(surface).getString(); … … 82 78 83 79 private void exportObject(MatchedObject object, BookData verse, 84 StringBuffer buf) 85 throws IOException, BookException 80 StringBuffer buf, SqlDatabase sql) 81 throws IOException, BookException, SAXException, 82 DatabaseException, SQLException, EmdrosException 86 83 { 87 84 if (object.getObjectTypeName().equals("word")) … … 90 87 new HebrewFeatureConverter(object, buf); 91 88 92 m_Generator.parse(object, hfc, true);89 new HebrewMorphemeGenerator().parse(object, hfc, true, sql); 93 90 } 94 91 … … 99 96 { 100 97 MatchedObject child = straws.next().const_iterator().next(); 101 exportObject(child, verse, buf );98 exportObject(child, verse, buf, sql); 102 99 } 103 100 } lex/trunk/src/com/qwirx/lex/hebrew/HebrewConverter.java
r241 r259 1 1 package com.qwirx.lex.hebrew; 2 2 3 import java.io.IOException; 4 5 import org.xml.sax.SAXException; 6 3 import jemdros.EmdrosException; 7 4 import jemdros.MatchedObject; 8 5 9 import com.qwirx.db.DatabaseException;10 6 import com.qwirx.lex.emdros.EmdrosDatabase; 11 7 import com.qwirx.lex.morph.HebrewMorphemeGenerator; … … 271 267 String substr = input.substring(i); 272 268 char c = input.charAt(i); 269 270 /* 273 271 char c2 = 0xffff; 274 272 if (i < input.length() - 1) … … 276 274 c2 = input.charAt(i + 1); 277 275 } 276 */ 278 277 279 278 if (substr.matches("[BGDKPT]\\.[@AEIOUW;:].*")) … … 382 381 } 383 382 384 static class Transliterator implements MorphemeHandler383 public static class Transliterator implements MorphemeHandler 385 384 { 386 385 private MatchedObject m_Word; … … 393 392 } 394 393 395 public void convert(String surface, 396 boolean lastMorpheme, String desc, 394 public void convert(String surface, boolean lastMorpheme, String desc, 397 395 String morphNode) 396 throws EmdrosException 398 397 { 399 398 String raw = m_Word.getEMdFValue(surface).getString(); … … 414 413 } 415 414 416 public void convert(String surface, 417 boolean lastMorpheme, String desc, 415 public void convert(String surface, boolean lastMorpheme, String desc, 418 416 String morphNode) 417 throws EmdrosException 419 418 { 420 419 String raw = m_Word.getEMdFValue(surface).getString(); … … 425 424 426 425 public static String wordToHtml(MatchedObject word, EmdrosDatabase emdros) 427 throws IOException, DatabaseException, SAXException428 { 429 return wordTranslitToHtml(word, new HebrewMorphemeGenerator( emdros));426 throws EmdrosException 427 { 428 return wordTranslitToHtml(word, new HebrewMorphemeGenerator()); 430 429 } 431 430 432 431 public static String wordTranslitToHtml(MatchedObject word, 433 432 HebrewMorphemeGenerator generator) 433 throws EmdrosException 434 434 { 435 435 StringBuffer out = new StringBuffer(); 436 436 Transliterator xlit = new Transliterator(word, out); 437 generator.parse(word, xlit, false );437 generator.parse(word, xlit, false, (String)null); 438 438 return toHtml(out.toString()); 439 439 } … … 441 441 public static String wordHebrewToHtml(MatchedObject word, 442 442 HebrewMorphemeGenerator generator) 443 throws EmdrosException 443 444 { 444 445 StringBuffer out = new StringBuffer(); 445 446 Hebrewator xlit = new Hebrewator(word, out); 446 generator.parse(word, xlit, false );447 generator.parse(word, xlit, false, (String)null); 447 448 return toHtml(out.toString()); 448 449 } lex/trunk/src/com/qwirx/lex/hebrew/HebrewEnglishDatabase.java
r189 r259 159 159 return m_Instance; 160 160 } 161 162 public synchronized static void delete() 163 { 164 m_Instance = null; 165 } 161 166 } lex/trunk/src/com/qwirx/lex/Lex.java
r250 r259 10 10 import java.net.URL; 11 11 import java.sql.Connection; 12 import java.sql.DriverManager;13 12 import java.sql.SQLException; 14 13 import java.util.Hashtable; 14 import java.util.Iterator; 15 15 import java.util.Map; 16 import java.util.Properties; 16 17 import java.util.Stack; 17 18 … … 20 21 import org.xml.sax.SAXException; 21 22 23 import com.mysql.jdbc.Driver; 22 24 import com.qwirx.db.DatabaseException; 23 25 import com.qwirx.db.sql.DbColumn; … … 117 119 return emdrosDb; 118 120 } 121 122 public void clear() 123 { 124 for (Iterator<EmdrosDatabase> i = m_Pool.iterator(); i.hasNext();) 125 { 126 EmdrosDatabase db = i.next(); 127 db.delete(); 128 i.remove(); 129 } 130 } 119 131 } 120 132 …
