Changeset 6721
- Timestamp:
- Feb 10, 2015, 1:26:32 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 34 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/3.4-stable merged: 6683,6710-6718 /tags/3.4.1 (added) merged: 6719
- Property svn:mergeinfo changed
-
trunk/credits.txt
r6641 r6721 1 1 $Id$ 2 2 3 The current BASE team is (at BASE 3.4. 0release)3 The current BASE team is (at BASE 3.4.1 release) 4 4 {{{ 5 5 Jari Häkkinen -
trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/Cell.java
r6127 r6721 301 301 content += formatter == null ? value.toString() : formatter.format(value); 302 302 } 303 if (content.length() == 0) content = " ";304 303 boolean overflowed = maxCharacters > 0 && content.length() > maxCharacters && 305 304 HTML.textLength(content) > maxCharacters; -
trunk/src/core/net/sf/basedb/core/AnnotationSet.java
r6420 r6721 23 23 package net.sf.basedb.core; 24 24 25 import java.util.ArrayList; 25 26 import java.util.Collection; 26 27 import java.util.Collections; … … 45 46 import net.sf.basedb.core.snapshot.AnnotationTypeFilter; 46 47 import net.sf.basedb.core.snapshot.SnapshotManager; 47 48 48 import net.sf.basedb.core.data.AnnotationData; 49 49 import net.sf.basedb.core.data.AnnotationSetData; 50 50 import net.sf.basedb.core.data.AnnotationTypeData; 51 import net.sf.basedb.core.hibernate.TypeWrapper; 51 52 import net.sf.basedb.util.AnnotationUtil; 52 53 import net.sf.basedb.util.filter.Filter; … … 219 220 if (progress != null) 220 221 { 221 progress.display(5, "Counting empty annotation sets..."); 222 } 223 224 String filter = "@COL not in (select [annotationset_id] from [Annotations])"+ 225 " and @COL not in (select [annotationset_id] from [InheritedAnnotations])"+ 226 " and @COL not in (select [annotationset_id] from [InheritedAnnotationSets])"+ 227 " and @COL not in (select [inherited_id] from [InheritedAnnotationSets])"; 228 229 // Count number of empty annotation sets 230 String countSql = "select count(*), [item_type] from [AnnotationSets] where "+ 231 filter.replace("@COL", "[id]") + 232 " group by [item_type]"; 233 org.hibernate.Query countQuery = HibernateUtil.createSqlQuery(session, countSql); 234 List<Object[]> counts = (List<Object[]>)countQuery.list(); 235 long totalCount = 0; 236 Map<String, Long> tables = new HashMap<String, Long>(); 237 for (Object[] row : counts) 238 { 239 long count = ((Number)row[0]).longValue(); 240 totalCount += count; 222 progress.display(5, "Loading annotation sets with no primary annotation..."); 223 } 224 225 // This SQL select annotationset id and type of item for annotation sets 226 // that has no primary annotations 227 String sql = "select [aa].[id], [aa].[item_type] from [AnnotationSets] [aa]"+ 228 " left join [Annotations] [a] on [a].[annotationset_id]=[aa].[id]"+ 229 " where [a].[annotationset_id] is null"; 230 231 org.hibernate.Query query = HibernateUtil.createSqlQuery(session, sql); 232 Map<Integer, Integer> possibleAnnotationSets = new HashMap<Integer, Integer>(10000); 233 List<Integer> allIds = new ArrayList<Integer>(10000); 234 for (Object[] row : (List<Object[]>)query.list()) 235 { 236 Integer id = (Integer)row[0]; 237 possibleAnnotationSets.put(id, (Integer)row[1]); 238 allIds.add(id); 239 } 240 if (progress != null) 241 { 242 progress.display(25, "Found " + possibleAnnotationSets.size() + " annotation sets without primary annotation"); 243 } 244 if (possibleAnnotationSets.size() == 0) return 0; 245 246 if (progress != null) 247 { 248 progress.display(30, "Checking for inherited annotations..." ); 249 } 250 251 // These SQL load annotation set ids that exists in one of three columns/tables 252 // Anything we find in theese tables must be removed from the possibleAnnotationSets map 253 String sql1 = "select [annotationset_id] from [InheritedAnnotations] where [annotationset_id] in (:ids)"; 254 String sql2 = "select [annotationset_id] from [InheritedAnnotationSets] where [annotationset_id] in (:ids)"; 255 String sql3 = "select [inherited_id] from [InheritedAnnotationSets] where [inherited_id] in (:ids)"; 256 org.hibernate.Query query1 = HibernateUtil.createSqlQuery(session, sql1); 257 org.hibernate.Query query2 = HibernateUtil.createSqlQuery(session, sql2); 258 org.hibernate.Query query3 = HibernateUtil.createSqlQuery(session, sql3); 259 260 // Divide the query into chunks since the database driver may not support 261 // an arbitrary large number of parameters 262 int startIndex = 0; 263 int maxParameters = HibernateUtil.getDbEngine().getMaxParametersInQuery(); 264 int endIndex = Math.min(maxParameters, allIds.size()); 265 while (startIndex < allIds.size()) 266 { 267 List<Integer> sublist = allIds.subList(startIndex, endIndex); 268 query1.setParameterList("ids", sublist, TypeWrapper.INTEGER.getHibernateType()); 269 query2.setParameterList("ids", sublist, TypeWrapper.INTEGER.getHibernateType()); 270 query3.setParameterList("ids", sublist, TypeWrapper.INTEGER.getHibernateType()); 241 271 242 Item itemType = Item.fromValue((Integer)row[1]); 272 for (Integer id : (List<Integer>)query1.list()) 273 { 274 possibleAnnotationSets.remove(id); 275 } 276 for (Integer id : (List<Integer>)query2.list()) 277 { 278 possibleAnnotationSets.remove(id); 279 } 280 for (Integer id : (List<Integer>)query3.list()) 281 { 282 possibleAnnotationSets.remove(id); 283 } 284 285 startIndex = endIndex; 286 endIndex = Math.min(startIndex + maxParameters, allIds.size()); 287 } 288 289 if (progress != null) 290 { 291 progress.display(50, "Found " + possibleAnnotationSets.size() + " annotations sets without primary or inherited annotations"); 292 } 293 if (possibleAnnotationSets.size() == 0) return 0; 294 295 // Divide the remaining annotation set ids into one list per table to delete from 296 Map<String, List<Integer>> tables = new HashMap<String, List<Integer>>(); 297 for (Map.Entry<Integer, Integer> entry : possibleAnnotationSets.entrySet()) 298 { 299 Integer id = entry.getKey(); 300 Item itemType = Item.fromValue(entry.getValue()); 301 243 302 PersistentClass pClass = HibernateUtil.getClassMapping(itemType.getDataClass().getName()); 244 303 String table = pClass.getTable().getName(); 304 List<Integer> idsInTable = tables.get(table); 305 if (idsInTable == null) 306 { 307 idsInTable = new ArrayList<Integer>(); 308 tables.put(table, idsInTable); 309 } 310 idsInTable.add(id); 311 } 312 313 int totalCount = possibleAnnotationSets.size(); 314 // Now it is finally time to delete from the "AnnotationSets" table 315 // and nullify the reference from the item tables 316 String deleteSql = "delete from [AnnotationSets] where [id] in (:ids)"; 317 org.hibernate.Query deleteQuery = HibernateUtil.createSqlQuery(session, deleteSql); 318 319 for (Map.Entry<String, List<Integer>> entry : tables.entrySet()) 320 { 321 String table = entry.getKey(); 322 List<Integer> ids = entry.getValue(); 323 324 String nullifySql = "update [" + table + "] set [annotationset_id] = null where [annotationset_id] in (:ids)"; 325 org.hibernate.Query nullifyQuery = HibernateUtil.createSqlQuery(session, nullifySql); 326 327 startIndex = 0; 328 endIndex = Math.min(maxParameters, ids.size()); 245 329 246 if (tables.containsKey(table)) count += tables.get(table); 247 tables.put(table, count); 248 } 249 if (progress != null) progress.append(" [" + totalCount + "]"); 250 251 // Unlink (set annotationset_id=null) on item tables 252 long numUnlinked = 0; 253 for (Map.Entry<String, Long> entry : tables.entrySet()) 254 { 255 ThreadSignalHandler.checkInterrupted(); 256 Long count = entry.getValue(); 257 if (count > 0) 258 { 259 String table = entry.getKey(); 330 while (startIndex < ids.size()) 331 { 332 List<Integer> sublist = ids.subList(startIndex, endIndex); 333 260 334 if (progress != null) 261 335 { 262 int percent = (int)( 10+(60*numUnlinked)/totalCount);263 progress.display(percent, "Unlinking " + count + " empty annotation sets from " + table + "table...");336 int percent = (int)(60+(30*numDeleted)/totalCount); 337 progress.display(percent, "Unlinking " + ids.size() + " empty annotation sets from [" + table + "] table..."); 264 338 } 265 String nullifySql = "update [" + table + "] set [annotationset_id] = null where "+filter.replace("@COL", "[annotationset_id]"); 266 org.hibernate.Query nullifyQuery = HibernateUtil.createSqlQuery(session, nullifySql); 267 int rowsUpdated = nullifyQuery.executeUpdate(); 268 if (progress != null) progress.append(" ["+rowsUpdated + "]"); 269 numUnlinked += rowsUpdated; 270 } 271 } 272 273 if (totalCount > 0) 274 { 275 if (progress != null) 276 { 277 progress.display(75, "Deleting " + totalCount + " empty annotation sets..."); 278 } 279 280 String deleteSql = "delete from [AnnotationSets] where "+filter.replace("@COL", "[id]"); 281 org.hibernate.Query deleteQuery = HibernateUtil.createSqlQuery(session, deleteSql); 282 numDeleted = deleteQuery.executeUpdate(); 283 if (progress != null) progress.append(" ["+numDeleted + "]"); 284 } 285 339 340 deleteQuery.setParameterList("ids", sublist, TypeWrapper.INTEGER.getHibernateType()); 341 nullifyQuery.setParameterList("ids", sublist, TypeWrapper.INTEGER.getHibernateType()); 342 nullifyQuery.executeUpdate(); 343 deleteQuery.executeUpdate(); 344 345 numDeleted += sublist.size(); 346 startIndex = endIndex; 347 endIndex = Math.min(startIndex + maxParameters, ids.size()); 348 } 349 } 350 351 if (progress != null) 352 { 353 progress.display(100, "Deleted " + numDeleted + " unused annotation sets"); 354 } 355 286 356 return numDeleted; 287 357 } -
trunk/src/core/net/sf/basedb/core/AnyToAny.java
r6684 r6721 23 23 package net.sf.basedb.core; 24 24 25 import java.util.ArrayList; 25 26 import java.util.List; 26 27 … … 378 379 int index = 0; 379 380 int numItemTypes = itemTypes.size(); 381 int maxParameters = HibernateUtil.getDbEngine().getMaxParametersInQuery(); 380 382 org.hibernate.Query deleteQuery = 381 383 HibernateUtil.getPredefinedQuery(session, "DELETE_STRAY_ANYTOANY"); … … 403 405 */ 404 406 query.setInteger("type", itemType); 405 List<Integer> stray = HibernateUtil.loadList(Integer.class, query, null); 406 if (stray.size() > 0) 407 408 List<Integer> stray = new ArrayList<Integer>(HibernateUtil.loadList(Integer.class, query, null)); 409 int startIndex = 0; 410 int endIndex = Math.min(maxParameters, stray.size()); 411 while (startIndex < stray.size()) 407 412 { 408 deleteQuery.setParameterList("ids", stray , TypeWrapper.INTEGER.getHibernateType());413 deleteQuery.setParameterList("ids", stray.subList(startIndex, endIndex), TypeWrapper.INTEGER.getHibernateType()); 409 414 numDeleted += HibernateUtil.executeUpdate(deleteQuery); 415 startIndex = endIndex; 416 endIndex = Math.min(startIndex + maxParameters, stray.size()); 410 417 } 411 418 index++; -
trunk/src/core/net/sf/basedb/core/Application.java
r6631 r6721 1152 1152 log.info("Cleaning database"); 1153 1153 // Stray any-to-any links 1154 int numDeleted = AnyToAny.deleteStrayLinks(null); 1155 log.info("Found " + numDeleted + " stray any-to-any links"); 1154 try 1155 { 1156 int numDeleted = AnyToAny.deleteStrayLinks(null); 1157 log.info("Found " + numDeleted + " stray any-to-any links"); 1158 } 1159 catch (RuntimeException ex) 1160 { 1161 log.error("Could not delete stray any-to-any links", ex); 1162 } 1156 1163 1157 1164 // Change history entries referencing deleted items 1158 numDeleted = ChangeHistory.deleteStrayEntries(null); 1159 log.info("Found " + numDeleted + " stray change history entries"); 1165 try 1166 { 1167 int numDeleted = ChangeHistory.deleteStrayEntries(null); 1168 log.info("Found " + numDeleted + " stray change history entries"); 1169 } 1170 catch (RuntimeException ex) 1171 { 1172 log.error("Could not delete stray change history entries", ex); 1173 } 1160 1174 1161 1175 // Empty annotation sets 1162 numDeleted = AnnotationSet.deleteEmptyAnnotationSets(null); 1163 log.info("Found " + numDeleted + " empty annotation sets"); 1176 try 1177 { 1178 int numDeleted = AnnotationSet.deleteEmptyAnnotationSets(null); 1179 log.info("Found " + numDeleted + " empty annotation sets"); 1180 } 1181 catch (RuntimeException ex) 1182 { 1183 log.error("Could not delete unused annotation sets", ex); 1184 } 1164 1185 1165 1186 // Item and project keys 1166 numDeleted = ItemKey.deleteUnusedItemKeys(); 1167 log.info("Found " + numDeleted + " unused item keys"); 1168 numDeleted = ProjectKey.deleteUnusedProjectKeys(); 1169 log.info("Found " + numDeleted + " unused project keys"); 1187 try 1188 { 1189 int numDeleted = ItemKey.deleteUnusedItemKeys(); 1190 log.info("Found " + numDeleted + " unused item keys"); 1191 } 1192 catch (RuntimeException ex) 1193 { 1194 log.error("Could not delete unused item keys", ex); 1195 } 1196 1197 try 1198 { 1199 int numDeleted = ProjectKey.deleteUnusedProjectKeys(); 1200 log.info("Found " + numDeleted + " unused project keys"); 1201 } 1202 catch (RuntimeException ex) 1203 { 1204 log.error("Could not delete unused project keys", ex); 1205 } 1170 1206 1171 1207 log.info("Finished cleaning of database"); -
trunk/src/core/net/sf/basedb/core/ChangeHistory.java
r6355 r6721 22 22 package net.sf.basedb.core; 23 23 24 import java.util.ArrayList; 24 25 import java.util.Date; 25 26 import java.util.List; … … 157 158 return query; 158 159 } 159 160 160 161 161 /** 162 162 Delete all change history entries that are linking to non-existing items. This method … … 193 193 int index = 0; 194 194 int numItemTypes = itemTypes.size(); 195 int maxParameters = HibernateUtil.getDbEngine().getMaxParametersInQuery(); 195 196 org.hibernate.Query deleteQuery = 196 197 HibernateUtil.getPredefinedQuery(session, "DELETE_STRAY_CHANGEHISTORY"); … … 218 219 */ 219 220 query.setInteger("type", itemType); 220 List<Integer> stray = HibernateUtil.loadList(Integer.class, query, null); 221 if (stray.size() > 0) 221 List<Integer> stray = new ArrayList<Integer>(HibernateUtil.loadList(Integer.class, query, null)); 222 int startIndex = 0; 223 int endIndex = Math.min(maxParameters, stray.size()); 224 while (startIndex < stray.size()) 222 225 { 223 deleteQuery.setParameterList("ids", stray , TypeWrapper.INTEGER.getHibernateType());226 deleteQuery.setParameterList("ids", stray.subList(startIndex, endIndex), TypeWrapper.INTEGER.getHibernateType()); 224 227 numDeleted += HibernateUtil.executeUpdate(deleteQuery); 228 startIndex = endIndex; 229 endIndex = Math.min(startIndex + maxParameters, stray.size()); 225 230 } 226 231 index++; -
trunk/src/core/net/sf/basedb/core/HibernateUtil.java
r6684 r6721 1245 1245 tx.rollback(); 1246 1246 } 1247 catch (HibernateException ex)1248 { 1249 throw new BaseException(ex);1247 catch (RuntimeException ex) 1248 { 1249 log.error("Exception when rolling back transaction", ex); 1250 1250 } 1251 1251 } … … 1261 1261 if (session.isOpen()) session.close(); 1262 1262 } 1263 catch (HibernateException ex)1263 catch (RuntimeException ex) 1264 1264 { 1265 1265 log.error("Exception when closing session", ex); … … 1277 1277 session.close(); 1278 1278 } 1279 catch (HibernateException ex)1279 catch (RuntimeException ex) 1280 1280 { 1281 1281 log.error("Exception when closing session", ex); -
trunk/src/core/net/sf/basedb/core/dbengine/AbstractDbEngine.java
r6630 r6721 146 146 } 147 147 148 /** 149 Returns 10000. 150 */ 151 @Override 152 public int getMaxParametersInQuery() 153 { 154 return 10000; 155 } 156 148 157 /** 149 158 Return <code>LN(<value>)</code>. -
trunk/src/core/net/sf/basedb/core/dbengine/DbEngine.java
r6630 r6721 351 351 352 352 /** 353 Get the maximum number of parameters that can be used in a prepared 354 statement for a query. 355 @return 356 @since 3.4.1 357 */ 358 public int getMaxParametersInQuery(); 359 360 /** 353 361 Get the function call that takes the natural logarithm 354 362 of a value. For example: <code>LN(value)</code> -
trunk/src/core/net/sf/basedb/core/snapshot/AnnotationSnapshot.java
r6541 r6721 34 34 import net.sf.basedb.core.Item; 35 35 import net.sf.basedb.core.Permission; 36 import net.sf.basedb.core.PermissionDeniedException;37 36 import net.sf.basedb.core.Type; 38 37 import net.sf.basedb.core.Unit; … … 189 188 return true; 190 189 } 191 catch ( PermissionDeniedException ex)190 catch (RuntimeException ex) 192 191 {} 193 192 } … … 199 198 return a.hasPermission(permission); 200 199 } 201 catch ( PermissionDeniedException ex)200 catch (RuntimeException ex) 202 201 {} 203 202 } … … 209 208 return a.hasPermission(permission); 210 209 } 211 catch ( PermissionDeniedException ex)210 catch (RuntimeException ex) 212 211 {} 213 212 } -
trunk/src/core/net/sf/basedb/core/snapshot/SnapshotManager.java
r6686 r6721 185 185 if (!searchPrimary) continue; // with the next snapshot in the list 186 186 187 if ( shot.hasPermission(dc, Permission.READ) && filter.evaluate(shot))187 if (filter.evaluate(shot) && shot.hasPermission(dc, Permission.READ)) 188 188 { 189 189 shot.setItem(snapshot.getItemId(), snapshot.getItemType()); -
trunk/www/admin/hardware/list_hardware.jsp
r6705 r6721 496 496 for (AnnotationLoaderUtil loader : annotationLoaders) 497 497 { 498 if (loader.find(snapshot)) 499 { 500 %> 501 <tbl:cell 502 column="<%="at"+loader.getId()%>" 503 ><tbl:cellvalue 498 %> 499 <tbl:cell 500 column="<%="at"+loader.getId()%>" 501 ><% 502 if (loader.find(snapshot)) 503 { 504 %><tbl:cellvalue 504 505 list="<%=loader.getValues()%>" 505 506 suffix="<%=loader.getUnitSymbol()%>" 506 /></tbl:cell> 507 <% 508 } 507 /><% 508 } 509 %></tbl:cell> 510 <% 509 511 } 510 512 } -
trunk/www/admin/protocols/list_protocol.jsp
r6705 r6721 513 513 for (AnnotationLoaderUtil loader : annotationLoaders) 514 514 { 515 if (loader.find(snapshot)) 516 { 517 %> 518 <tbl:cell 519 column="<%="at"+loader.getId()%>" 520 ><tbl:cellvalue 515 %> 516 <tbl:cell 517 column="<%="at"+loader.getId()%>" 518 ><% 519 if (loader.find(snapshot)) 520 { 521 %><tbl:cellvalue 521 522 list="<%=loader.getValues()%>" 522 523 suffix="<%=loader.getUnitSymbol()%>" 523 /></tbl:cell> 524 <% 525 } 524 /><% 525 } 526 %></tbl:cell> 527 <% 526 528 } 527 529 } -
trunk/www/admin/software/list_software.jsp
r6705 r6721 496 496 for (AnnotationLoaderUtil loader : annotationLoaders) 497 497 { 498 if (loader.find(snapshot)) 499 { 500 %> 501 <tbl:cell 502 column="<%="at"+loader.getId()%>" 503 ><tbl:cellvalue 498 %> 499 <tbl:cell 500 column="<%="at"+loader.getId()%>" 501 ><% 502 if (loader.find(snapshot)) 503 { 504 %><tbl:cellvalue 504 505 list="<%=loader.getValues()%>" 505 506 suffix="<%=loader.getUnitSymbol()%>" 506 /></tbl:cell> 507 <% 508 } 507 /><% 508 } 509 %></tbl:cell> 510 <% 509 511 } 510 512 } -
trunk/www/biomaterials/bioplates/list_bioplates.jsp
r6701 r6721 657 657 for (AnnotationLoaderUtil loader : annotationLoaders) 658 658 { 659 if (loader.find(snapshot)) 660 { 661 %> 662 <tbl:cell 663 column="<%="at"+loader.getId()%>" 664 ><tbl:cellvalue 659 %> 660 <tbl:cell 661 column="<%="at"+loader.getId()%>" 662 ><% 663 if (loader.find(snapshot)) 664 { 665 %><tbl:cellvalue 665 666 list="<%=loader.getValues()%>" 666 667 suffix="<%=loader.getUnitSymbol()%>" 667 /></tbl:cell> 668 <% 669 } 668 /><% 669 } 670 %></tbl:cell> 671 <% 670 672 } 671 673 } -
trunk/www/biomaterials/bioplates/wells/list_biowells.jsp
r6701 r6721 646 646 for (AnnotationLoaderUtil loader : annotationLoaders) 647 647 { 648 if (loader.find(snapshot)) 649 { 650 %> 651 <tbl:cell 652 column="<%="at"+loader.getId()%>" 653 ><tbl:cellvalue 648 %> 649 <tbl:cell 650 column="<%="at"+loader.getId()%>" 651 ><% 652 if (loader.find(snapshot)) 653 { 654 %><tbl:cellvalue 654 655 list="<%=loader.getValues()%>" 655 656 suffix="<%=loader.getUnitSymbol()%>" 656 /></tbl:cell> 657 <% 658 } 657 /><% 658 } 659 %></tbl:cell> 660 <% 659 661 } 660 662 } -
trunk/www/biomaterials/biosources/list_biosources.jsp
r6701 r6721 568 568 for (AnnotationLoaderUtil loader : annotationLoaders) 569 569 { 570 if (loader.find(snapshot)) 571 { 572 %> 573 <tbl:cell 574 column="<%="at"+loader.getId()%>" 575 ><tbl:cellvalue 570 %> 571 <tbl:cell 572 column="<%="at"+loader.getId()%>" 573 ><% 574 if (loader.find(snapshot)) 575 { 576 %><tbl:cellvalue 576 577 list="<%=loader.getValues()%>" 577 578 suffix="<%=loader.getUnitSymbol()%>" 578 /></tbl:cell> 579 <% 580 } 579 /><% 580 } 581 %></tbl:cell> 582 <% 581 583 } 582 584 } -
trunk/www/biomaterials/extracts/list_extracts.jsp
r6701 r6721 956 956 for (AnnotationLoaderUtil loader : annotationLoaders) 957 957 { 958 if (loader.find(snapshot)) 959 { 960 %> 961 <tbl:cell 962 column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>" 963 ><tbl:cellvalue 958 %> 959 <tbl:cell 960 column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>" 961 ><% 962 if (loader.find(snapshot)) 963 { 964 %><tbl:cellvalue 964 965 list="<%=loader.getValues()%>" 965 966 suffix="<%=loader.getUnitSymbol()%>" 966 /></tbl:cell> 967 <% 968 } 967 /><% 968 } 969 %></tbl:cell> 970 <% 969 971 } 970 972 } -
trunk/www/biomaterials/lists/list_lists.jsp
r6701 r6721 489 489 for (AnnotationLoaderUtil loader : annotationLoaders) 490 490 { 491 if (loader.find(snapshot)) 492 { 493 %> 494 <tbl:cell 495 column="<%="at"+loader.getId()%>" 496 ><tbl:cellvalue 491 %> 492 <tbl:cell 493 column="<%="at"+loader.getId()%>" 494 ><% 495 if (loader.find(snapshot)) 496 { 497 %><tbl:cellvalue 497 498 list="<%=loader.getValues()%>" 498 499 suffix="<%=loader.getUnitSymbol()%>" 499 /></tbl:cell> 500 <% 501 } 500 /><% 501 } 502 %></tbl:cell> 503 <% 502 504 } 503 505 } -
trunk/www/biomaterials/lists/members/list_members.jsp
r6701 r6721 1013 1013 for (AnnotationLoaderUtil loader : annotationLoaders) 1014 1014 { 1015 if (loader.find(snapshot)) 1016 { 1017 %> 1018 <tbl:cell 1019 column="<%="at"+loader.getId()%>" 1020 ><tbl:cellvalue 1015 %> 1016 <tbl:cell 1017 column="<%="at"+loader.getId()%>" 1018 ><% 1019 if (loader.find(snapshot)) 1020 { 1021 %><tbl:cellvalue 1021 1022 list="<%=loader.getValues()%>" 1022 1023 suffix="<%=loader.getUnitSymbol()%>" 1023 /></tbl:cell> 1024 <% 1025 } 1024 /><% 1025 } 1026 %></tbl:cell> 1027 <% 1026 1028 } 1027 1029 } -
trunk/www/biomaterials/samples/list_samples.jsp
r6701 r6721 888 888 for (AnnotationLoaderUtil loader : annotationLoaders) 889 889 { 890 if (loader.find(snapshot)) 891 { 892 %> 893 <tbl:cell 894 column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>" 895 ><tbl:cellvalue 890 %> 891 <tbl:cell 892 column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>" 893 ><% 894 if (loader.find(snapshot)) 895 { 896 %><tbl:cellvalue 896 897 list="<%=loader.getValues()%>" 897 898 suffix="<%=loader.getUnitSymbol()%>" 898 /></tbl:cell> 899 <% 900 } 899 /><% 900 } 901 %></tbl:cell> 902 <% 901 903 } 902 904 } -
trunk/www/biomaterials/tags/list_tags.jsp
r6701 r6721 496 496 for (AnnotationLoaderUtil loader : annotationLoaders) 497 497 { 498 if (loader.find(snapshot)) 499 { 500 %> 501 <tbl:cell 502 column="<%="at"+loader.getId()%>" 503 ><tbl:cellvalue 498 %> 499 <tbl:cell 500 column="<%="at"+loader.getId()%>" 501 ><% 502 if (loader.find(snapshot)) 503 { 504 %><tbl:cellvalue 504 505 list="<%=loader.getValues()%>" 505 506 suffix="<%=loader.getUnitSymbol()%>" 506 /></tbl:cell> 507 <% 508 } 507 /><% 508 } 509 %></tbl:cell> 510 <% 509 511 } 510 512 } -
trunk/www/lims/arraybatches/list_batches.jsp
r6702 r6721 580 580 for (AnnotationLoaderUtil loader : annotationLoaders) 581 581 { 582 if (loader.find(snapshot)) 583 { 584 %> 585 <tbl:cell 586 column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>" 587 ><tbl:cellvalue 582 %> 583 <tbl:cell 584 column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>" 585 ><% 586 if (loader.find(snapshot)) 587 { 588 %><tbl:cellvalue 588 589 list="<%=loader.getValues()%>" 589 590 suffix="<%=loader.getUnitSymbol()%>" 590 /></tbl:cell> 591 <% 592 } 591 /><% 592 } 593 %></tbl:cell> 594 <% 593 595 } 594 596 } -
trunk/www/lims/arraydesigns/list_designs.jsp
r6702 r6721 707 707 for (AnnotationLoaderUtil loader : annotationLoaders) 708 708 { 709 if (loader.find(snapshot)) 710 { 711 %> 712 <tbl:cell 713 column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>" 714 ><tbl:cellvalue 709 %> 710 <tbl:cell 711 column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>" 712 ><% 713 if (loader.find(snapshot)) 714 { 715 %><tbl:cellvalue 715 716 list="<%=loader.getValues()%>" 716 717 suffix="<%=loader.getUnitSymbol()%>" 717 /></tbl:cell> 718 <% 719 } 718 /><% 719 } 720 %></tbl:cell> 721 <% 720 722 } 721 723 } -
trunk/www/lims/arrayslides/list_slides.jsp
r6702 r6721 565 565 for (AnnotationLoaderUtil loader : annotationLoaders) 566 566 { 567 if (loader.find(snapshot)) 568 { 569 %> 570 <tbl:cell 571 column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>" 572 ><tbl:cellvalue 567 %> 568 <tbl:cell 569 column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>" 570 ><% 571 if (loader.find(snapshot)) 572 { 573 %><tbl:cellvalue 573 574 list="<%=loader.getValues()%>" 574 575 suffix="<%=loader.getUnitSymbol()%>" 575 /></tbl:cell> 576 <% 577 } 576 /><% 577 } 578 %></tbl:cell> 579 <% 578 580 } 579 581 } -
trunk/www/lims/plates/list_plates.jsp
r6702 r6721 640 640 for (AnnotationLoaderUtil loader : annotationLoaders) 641 641 { 642 if (loader.find(snapshot)) 643 { 644 %> 645 <tbl:cell 646 column="<%="at"+loader.getId()%>" 647 ><tbl:cellvalue 642 %> 643 <tbl:cell 644 column="<%="at"+loader.getId()%>" 645 ><% 646 if (loader.find(snapshot)) 647 { 648 %><tbl:cellvalue 648 649 list="<%=loader.getValues()%>" 649 650 suffix="<%=loader.getUnitSymbol()%>" 650 /></tbl:cell> 651 <% 652 } 651 /><% 652 } 653 %></tbl:cell> 654 <% 653 655 } 654 656 } -
trunk/www/lims/plates/wells/list_wells.jsp
r6702 r6721 629 629 for (AnnotationLoaderUtil loader : annotationLoaders) 630 630 { 631 if (loader.find(snapshot)) 632 { 633 %> 634 <tbl:cell 635 column="<%="at"+loader.getId()%>" 636 ><tbl:cellvalue 631 %> 632 <tbl:cell 633 column="<%="at"+loader.getId()%>" 634 ><% 635 if (loader.find(snapshot)) 636 { 637 %><tbl:cellvalue 637 638 list="<%=loader.getValues()%>" 638 639 suffix="<%=loader.getUnitSymbol()%>" 639 /></tbl:cell> 640 <% 641 } 640 /><% 641 } 642 %></tbl:cell> 643 <% 642 644 } 643 645 } -
trunk/www/views/derivedbioassays/list_bioassays.jsp
r6699 r6721 782 782 for (AnnotationLoaderUtil loader : annotationLoaders) 783 783 { 784 if (loader.find(snapshot)) 785 { 786 %> 787 <tbl:cell 788 column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>" 789 ><tbl:cellvalue 784 %> 785 <tbl:cell 786 column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>" 787 ><% 788 if (loader.find(snapshot)) 789 { 790 %><tbl:cellvalue 790 791 list="<%=loader.getValues()%>" 791 792 suffix="<%=loader.getUnitSymbol()%>" 792 /></tbl:cell> 793 <% 794 } 793 /><% 794 } 795 %></tbl:cell> 796 <% 795 797 } 796 798 } -
trunk/www/views/experiments/bioassays/list_bioassays.jsp
r6700 r6721 554 554 for (AnnotationLoaderUtil loader : annotationLoaders) 555 555 { 556 if (loader.find(snapshot)) 557 { 558 %> 559 <tbl:cell 560 column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>" 561 ><tbl:cellvalue 556 %> 557 <tbl:cell 558 column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>" 559 ><% 560 if (loader.find(snapshot)) 561 { 562 %><tbl:cellvalue 562 563 list="<%=loader.getValues()%>" 563 564 suffix="<%=loader.getUnitSymbol()%>" 564 /></tbl:cell> 565 <% 566 } 565 /><% 566 } 567 %></tbl:cell> 568 <% 567 569 } 568 570 } -
trunk/www/views/experiments/bioassaysets/analysis_tree.jsp
r6700 r6721 837 837 for (AnnotationLoaderUtil loader : annotationLoaders) 838 838 { 839 if (loader.find(snapshot)) 840 { 841 %> 842 <tbl:cell 843 column="<%="at"+loader.getId()%>" 844 ><tbl:cellvalue 839 %> 840 <tbl:cell 841 column="<%="at"+loader.getId()%>" 842 ><% 843 if (loader.find(snapshot)) 844 { 845 %><tbl:cellvalue 845 846 list="<%=loader.getValues()%>" 846 847 suffix="<%=loader.getUnitSymbol()%>" 847 /></tbl:cell> 848 <% 849 } 848 /><% 849 } 850 %></tbl:cell> 851 <% 850 852 } 851 853 } -
trunk/www/views/physicalbioassays/index.jsp
r6695 r6721 89 89 // Register formatters 90 90 cc.setObject("export.formatter.&creationEvent.sources(bioMaterial.name)", new BioMaterialEventSourceFormatter()); 91 cc.setObject("export.formatter.&rootDerivedBioAssays( name)", new NameableFormatter());91 cc.setObject("export.formatter.&rootDerivedBioAssays(%name)", new NameableFormatter()); 92 92 93 93 // Register dataloaders … … 101 101 dbasQuery.restrict(Restrictions.eq(Hql.property("root"), Expressions.bool(true))); 102 102 dbasQuery.order(Orders.asc(Hql.property("name"))); 103 cc.setObject("export.dataloader.&rootDerivedBioAssays( name)", new ItemQueryLoader(dbasQuery, bioassayParameter));103 cc.setObject("export.dataloader.&rootDerivedBioAssays(%name)", new ItemQueryLoader(dbasQuery, bioassayParameter)); 104 104 } 105 105 %> -
trunk/www/views/physicalbioassays/list_bioassays.jsp
r6699 r6721 720 720 for (AnnotationLoaderUtil loader : annotationLoaders) 721 721 { 722 if (loader.find(snapshot)) 723 { 724 %> 725 <tbl:cell 726 column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>" 727 ><tbl:cellvalue 722 %> 723 <tbl:cell 724 column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>" 725 ><% 726 if (loader.find(snapshot)) 727 { 728 %><tbl:cellvalue 728 729 list="<%=loader.getValues()%>" 729 730 suffix="<%=loader.getUnitSymbol()%>" 730 /></tbl:cell> 731 <% 732 } 731 /><% 732 } 733 %></tbl:cell> 734 <% 733 735 } 734 736 } -
trunk/www/views/rawbioassays/list_rawbioassays.jsp
r6699 r6721 824 824 for (AnnotationLoaderUtil loader : annotationLoaders) 825 825 { 826 if (loader.find(snapshot)) 827 { 828 %> 829 <tbl:cell 830 column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>" 831 ><tbl:cellvalue 826 %> 827 <tbl:cell 828 column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>" 829 ><% 830 if (loader.find(snapshot)) 831 { 832 %><tbl:cellvalue 832 833 list="<%=loader.getValues()%>" 833 834 suffix="<%=loader.getUnitSymbol()%>" 834 /></tbl:cell> 835 <% 836 } 835 /><% 836 } 837 %></tbl:cell> 838 <% 837 839 } 838 840 }
Note: See TracChangeset
for help on using the changeset viewer.