Revision 671
Added by berkley over 23 years ago
RelationHandler.java | ||
---|---|---|
1 | 1 |
/** |
2 |
* '$RCSfile$' |
|
3 |
* Purpose: A class to asyncronously build the package relation index |
|
4 |
* in the database table xml_relation. |
|
5 |
* Copyright: 2000 Regents of the University of California and the |
|
6 |
* National Center for Ecological Analysis and Synthesis |
|
7 |
* Authors: Chad Berkley |
|
8 |
* Release: @release@ |
|
9 |
* |
|
10 | 2 |
* '$Author$' |
11 | 3 |
* '$Date$' |
12 | 4 |
* '$Revision$' |
... | ... | |
116 | 108 |
String object = rs.getString(3); |
117 | 109 |
|
118 | 110 |
//compare r to each relation in xml_relation |
119 |
pstmt.close(); |
|
111 |
|
|
120 | 112 |
pstmt = conn.prepareStatement("select subject, subdoctype, " + |
121 | 113 |
"relationship, object, objdoctype " + |
122 | 114 |
"from xml_relation"); |
... | ... | |
200 | 192 |
subDoc = new DocumentImpl(conn, subDocid); |
201 | 193 |
subDoctype = subDoc.getDoctype(); |
202 | 194 |
DocumentImpl objDoc = new DocumentImpl(conn, objDocid); |
203 |
objDoc.getDoctype(); |
|
195 |
objDoctype = objDoc.getDoctype();
|
|
204 | 196 |
|
205 | 197 |
//now that the comparisons are done, the new relation can be put |
206 | 198 |
//into xml_relation |
... | ... | |
214 | 206 |
insertStmt.append(relationship).append("', '"); |
215 | 207 |
insertStmt.append(object).append("', '"); |
216 | 208 |
insertStmt.append(objDoctype).append("')"); |
209 |
|
|
217 | 210 |
pstmt = conn.prepareStatement(insertStmt.toString()); |
218 | 211 |
pstmt.execute(); |
219 | 212 |
|
... | ... | |
221 | 214 |
} |
222 | 215 |
|
223 | 216 |
conn.commit(); |
217 |
pstmt.close(); |
|
224 | 218 |
conn.close(); |
225 | 219 |
btThread = null; |
226 | 220 |
|
Also available in: Unified diff
fixed introduced problem with preparedStatements