From: Steve S. <se...@us...> - 2007-07-30 13:52:43
|
Update of /cvsroot/gmod/apollo/src/java/apollo/dataadapter/ensj/controller In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv28748 Modified Files: EventHandler.java Log Message: When looking for a suitable coordinate system when a seq region name is entered use one with a 'default_version' attrib if available Index: EventHandler.java =================================================================== RCS file: /cvsroot/gmod/apollo/src/java/apollo/dataadapter/ensj/controller/EventHandler.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** EventHandler.java 6 Nov 2005 10:19:55 -0000 1.6 --- EventHandler.java 30 Jul 2007 13:52:42 -0000 1.7 *************** *** 245,248 **** --- 245,249 ---- String name; String version; + String attribs; try{ *************** *** 251,255 **** names = statement.executeQuery( ! "select coord_system.name, coord_system.version from seq_region, coord_system where "+ " seq_region.coord_system_id = coord_system.coord_system_id and "+ " seq_region.name = '" + regionName + "'" --- 252,256 ---- names = statement.executeQuery( ! "select coord_system.name, coord_system.version, coord_system.attrib from seq_region, coord_system where "+ " seq_region.coord_system_id = coord_system.coord_system_id and "+ " seq_region.name = '" + regionName + "'" *************** *** 259,262 **** --- 260,265 ---- name = names.getString(1); version = names.getString(2); + attribs = names.getString(3); + if(version == null) { returnString = new String (FindCoordSystemsHandler.NULL_VERSION + "--" + name); *************** *** 265,268 **** --- 268,274 ---- } log("Retreived coord system: "+ name + " " + version); + if (attribs.indexOf("default_version") != -1) { + break; + } } |