From: Jie B. <ba...@us...> - 2007-08-16 03:50:27
|
Update of /cvsroot/cob/COBEditor/src/edu/iastate/ato/po In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21525/src/edu/iastate/ato/po Modified Files: DB2OWL.java Log Message: Index: DB2OWL.java =================================================================== RCS file: /cvsroot/cob/COBEditor/src/edu/iastate/ato/po/DB2OWL.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DB2OWL.java 13 Jun 2006 21:55:24 -0000 1.1 --- DB2OWL.java 16 Aug 2007 03:50:20 -0000 1.2 *************** *** 157,160 **** --- 157,161 ---- String is_obsolete = resultSet.getString("is_obsolete") ; + id = id.replace(" ", "_"); out.write("<Term rdf:ID=\"" + id + "\">\n") ; *************** *** 190,205 **** out.write(str) ; } ! ! // SELECT DISTINCT relation, term.id AS parent FROM relation ! // WHERE id = '59056' AND relation.pid = term.oid sql = ! "SELECT DISTINCT relation, term.id AS parent FROM relation " + ! "WHERE id = '" + oid + "' AND relation.pid = term.oid" ; Statement stmt2 = db.createStatement() ; ResultSet resultSet2 = stmt2.executeQuery(sql) ; while(resultSet2.next()) { ! String relation = resultSet2.getString("relation") ; String parent = resultSet2.getString("parent") ; str = makeTerm_Relation(relation, parent) ; --- 191,210 ---- out.write(str) ; } ! ! // write parents ! //SELECT DISTINCT relation, term.id AS parent FROM relation,term ! //WHERE relation.id = '27291' AND relation.pid = term.oid ! sql = ! "SELECT DISTINCT relation, term.id AS parent FROM relation,term " + ! "WHERE relation.id = '" + oid + "' AND relation.pid = term.oid" ; Statement stmt2 = db.createStatement() ; ResultSet resultSet2 = stmt2.executeQuery(sql) ; while(resultSet2.next()) { ! String relation = resultSet2.getString("relation"); String parent = resultSet2.getString("parent") ; + parent = parent.replace(" ", "_"); + str = makeTerm_Relation(relation, parent) ; |