Changeset 6721


Ignore:
Timestamp:
Feb 10, 2015, 1:26:32 PM (8 years ago)
Author:
Nicklas Nordborg
Message:

Merged patch release 3.4.1 to trunk.

Location:
trunk
Files:
34 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/credits.txt

    r6641 r6721  
    11$Id$
    22
    3 The current BASE team is (at BASE 3.4.0 release)
     3The current BASE team is (at BASE 3.4.1 release)
    44{{{
    55Jari Häkkinen
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/Cell.java

    r6127 r6721  
    301301      content += formatter == null ? value.toString() : formatter.format(value);
    302302    }
    303     if (content.length() == 0) content = " ";
    304303    boolean overflowed = maxCharacters > 0 && content.length() > maxCharacters &&
    305304      HTML.textLength(content) > maxCharacters;
  • trunk/src/core/net/sf/basedb/core/AnnotationSet.java

    r6420 r6721  
    2323package net.sf.basedb.core;
    2424
     25import java.util.ArrayList;
    2526import java.util.Collection;
    2627import java.util.Collections;
     
    4546import net.sf.basedb.core.snapshot.AnnotationTypeFilter;
    4647import net.sf.basedb.core.snapshot.SnapshotManager;
    47 
    4848import net.sf.basedb.core.data.AnnotationData;
    4949import net.sf.basedb.core.data.AnnotationSetData;
    5050import net.sf.basedb.core.data.AnnotationTypeData;
     51import net.sf.basedb.core.hibernate.TypeWrapper;
    5152import net.sf.basedb.util.AnnotationUtil;
    5253import net.sf.basedb.util.filter.Filter;
     
    219220    if (progress != null)
    220221    {
    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());
    241271     
    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     
    243302      PersistentClass pClass = HibernateUtil.getClassMapping(itemType.getDataClass().getName());
    244303      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());
    245329     
    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       
    260334        if (progress != null)
    261335        {
    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...");
    264338        }
    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   
    286356    return numDeleted;
    287357  }
  • trunk/src/core/net/sf/basedb/core/AnyToAny.java

    r6684 r6721  
    2323package net.sf.basedb.core;
    2424
     25import java.util.ArrayList;
    2526import java.util.List;
    2627
     
    378379      int index = 0;
    379380      int numItemTypes = itemTypes.size();
     381      int maxParameters = HibernateUtil.getDbEngine().getMaxParametersInQuery();
    380382      org.hibernate.Query deleteQuery =
    381383        HibernateUtil.getPredefinedQuery(session, "DELETE_STRAY_ANYTOANY");
     
    403405        */
    404406        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())
    407412        {
    408           deleteQuery.setParameterList("ids", stray, TypeWrapper.INTEGER.getHibernateType());
     413          deleteQuery.setParameterList("ids", stray.subList(startIndex, endIndex), TypeWrapper.INTEGER.getHibernateType());
    409414          numDeleted += HibernateUtil.executeUpdate(deleteQuery);
     415          startIndex = endIndex;
     416          endIndex = Math.min(startIndex + maxParameters, stray.size());
    410417        }
    411418        index++;
  • trunk/src/core/net/sf/basedb/core/Application.java

    r6631 r6721  
    11521152      log.info("Cleaning database");
    11531153      // 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      }
    11561163     
    11571164      // 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      }
    11601174     
    11611175      // 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      }
    11641185     
    11651186      // 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      }
    11701206     
    11711207      log.info("Finished cleaning of database");
  • trunk/src/core/net/sf/basedb/core/ChangeHistory.java

    r6355 r6721  
    2222package net.sf.basedb.core;
    2323
     24import java.util.ArrayList;
    2425import java.util.Date;
    2526import java.util.List;
     
    157158    return query;   
    158159  }
    159  
    160  
     160   
    161161  /**
    162162    Delete all change history entries that are linking to non-existing items. This method
     
    193193      int index = 0;
    194194      int numItemTypes = itemTypes.size();
     195      int maxParameters = HibernateUtil.getDbEngine().getMaxParametersInQuery();
    195196      org.hibernate.Query deleteQuery =
    196197        HibernateUtil.getPredefinedQuery(session, "DELETE_STRAY_CHANGEHISTORY");
     
    218219        */
    219220        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())
    222225        {
    223           deleteQuery.setParameterList("ids", stray, TypeWrapper.INTEGER.getHibernateType());
     226          deleteQuery.setParameterList("ids", stray.subList(startIndex, endIndex), TypeWrapper.INTEGER.getHibernateType());
    224227          numDeleted += HibernateUtil.executeUpdate(deleteQuery);
     228          startIndex = endIndex;
     229          endIndex = Math.min(startIndex + maxParameters, stray.size());
    225230        }
    226231        index++;
  • trunk/src/core/net/sf/basedb/core/HibernateUtil.java

    r6684 r6721  
    12451245      tx.rollback();
    12461246    }
    1247     catch(HibernateException ex)
    1248     {
    1249       throw new BaseException(ex);
     1247    catch (RuntimeException ex)
     1248    {
     1249      log.error("Exception when rolling back transaction", ex);
    12501250    }
    12511251  }
     
    12611261      if (session.isOpen()) session.close();
    12621262    }
    1263     catch(HibernateException ex)
     1263    catch (RuntimeException ex)
    12641264    {
    12651265      log.error("Exception when closing session", ex);
     
    12771277      session.close();
    12781278    }
    1279     catch(HibernateException ex)
     1279    catch (RuntimeException ex)
    12801280    {
    12811281      log.error("Exception when closing session", ex);
  • trunk/src/core/net/sf/basedb/core/dbengine/AbstractDbEngine.java

    r6630 r6721  
    146146  }
    147147
     148  /**
     149    Returns 10000.
     150  */
     151  @Override
     152  public int getMaxParametersInQuery()
     153  {
     154    return 10000;
     155  }
     156 
    148157  /**
    149158    Return <code>LN(&lt;value&gt;)</code>.
  • trunk/src/core/net/sf/basedb/core/dbengine/DbEngine.java

    r6630 r6721  
    351351 
    352352  /**
     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  /**
    353361    Get the function call that takes the natural logarithm
    354362    of a value. For example: <code>LN(value)</code>
  • trunk/src/core/net/sf/basedb/core/snapshot/AnnotationSnapshot.java

    r6541 r6721  
    3434import net.sf.basedb.core.Item;
    3535import net.sf.basedb.core.Permission;
    36 import net.sf.basedb.core.PermissionDeniedException;
    3736import net.sf.basedb.core.Type;
    3837import net.sf.basedb.core.Unit;
     
    189188        return true;
    190189      }
    191       catch (PermissionDeniedException ex)
     190      catch (RuntimeException ex)
    192191      {}
    193192    }
     
    199198        return a.hasPermission(permission);
    200199      }
    201       catch (PermissionDeniedException ex)
     200      catch (RuntimeException ex)
    202201      {}
    203202    }
     
    209208        return a.hasPermission(permission);
    210209      }
    211       catch (PermissionDeniedException ex)
     210      catch (RuntimeException ex)
    212211      {}
    213212    }
  • trunk/src/core/net/sf/basedb/core/snapshot/SnapshotManager.java

    r6686 r6721  
    185185        if (!searchPrimary) continue; // with the next snapshot in the list
    186186       
    187         if (shot.hasPermission(dc, Permission.READ) && filter.evaluate(shot))
     187        if (filter.evaluate(shot) && shot.hasPermission(dc, Permission.READ))
    188188        {
    189189          shot.setItem(snapshot.getItemId(), snapshot.getItemType());
  • trunk/www/admin/hardware/list_hardware.jsp

    r6705 r6721  
    496496                  for (AnnotationLoaderUtil loader : annotationLoaders)
    497497                  {
    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
    504505                          list="<%=loader.getValues()%>"
    505506                          suffix="<%=loader.getUnitSymbol()%>"
    506                       /></tbl:cell>
    507                       <%
    508                     }
     507                        /><%
     508                      }
     509                      %></tbl:cell>
     510                    <%
    509511                  }
    510512                }
  • trunk/www/admin/protocols/list_protocol.jsp

    r6705 r6721  
    513513                  for (AnnotationLoaderUtil loader : annotationLoaders)
    514514                  {
    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
    521522                          list="<%=loader.getValues()%>"
    522523                          suffix="<%=loader.getUnitSymbol()%>"
    523                       /></tbl:cell>
    524                       <%
    525                     }
     524                        /><%
     525                      }
     526                      %></tbl:cell>
     527                    <%
    526528                  }
    527529                }
  • trunk/www/admin/software/list_software.jsp

    r6705 r6721  
    496496                  for (AnnotationLoaderUtil loader : annotationLoaders)
    497497                  {
    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
    504505                          list="<%=loader.getValues()%>"
    505506                          suffix="<%=loader.getUnitSymbol()%>"
    506                       /></tbl:cell>
    507                       <%
    508                     }
     507                        /><%
     508                      }
     509                      %></tbl:cell>
     510                    <%
    509511                  }
    510512                }
  • trunk/www/biomaterials/bioplates/list_bioplates.jsp

    r6701 r6721  
    657657                  for (AnnotationLoaderUtil loader : annotationLoaders)
    658658                  {
    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
    665666                          list="<%=loader.getValues()%>"
    666667                          suffix="<%=loader.getUnitSymbol()%>"
    667                       /></tbl:cell>
    668                       <%
    669                     }
     668                        /><%
     669                      }
     670                      %></tbl:cell>
     671                    <%
    670672                  }
    671673                }
  • trunk/www/biomaterials/bioplates/wells/list_biowells.jsp

    r6701 r6721  
    646646                  for (AnnotationLoaderUtil loader : annotationLoaders)
    647647                  {
    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
    654655                          list="<%=loader.getValues()%>"
    655656                          suffix="<%=loader.getUnitSymbol()%>"
    656                       /></tbl:cell>
    657                       <%
    658                     }
     657                        /><%
     658                      }
     659                      %></tbl:cell>
     660                    <%
    659661                  }
    660662                }
  • trunk/www/biomaterials/biosources/list_biosources.jsp

    r6701 r6721  
    568568                  for (AnnotationLoaderUtil loader : annotationLoaders)
    569569                  {
    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
    576577                          list="<%=loader.getValues()%>"
    577578                          suffix="<%=loader.getUnitSymbol()%>"
    578                       /></tbl:cell>
    579                       <%
    580                     }
     579                        /><%
     580                      }
     581                      %></tbl:cell>
     582                    <%
    581583                  }
    582584                }
  • trunk/www/biomaterials/extracts/list_extracts.jsp

    r6701 r6721  
    956956                  for (AnnotationLoaderUtil loader : annotationLoaders)
    957957                  {
    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
    964965                          list="<%=loader.getValues()%>"
    965966                          suffix="<%=loader.getUnitSymbol()%>"
    966                       /></tbl:cell>
    967                       <%
    968                     }
     967                        /><%
     968                      }
     969                      %></tbl:cell>
     970                    <%
    969971                  }
    970972                }
  • trunk/www/biomaterials/lists/list_lists.jsp

    r6701 r6721  
    489489                  for (AnnotationLoaderUtil loader : annotationLoaders)
    490490                  {
    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
    497498                          list="<%=loader.getValues()%>"
    498499                          suffix="<%=loader.getUnitSymbol()%>"
    499                       /></tbl:cell>
    500                       <%
    501                     }
     500                        /><%
     501                      }
     502                      %></tbl:cell>
     503                    <%
    502504                  }
    503505                }
  • trunk/www/biomaterials/lists/members/list_members.jsp

    r6701 r6721  
    10131013                  for (AnnotationLoaderUtil loader : annotationLoaders)
    10141014                  {
    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
    10211022                          list="<%=loader.getValues()%>"
    10221023                          suffix="<%=loader.getUnitSymbol()%>"
    1023                       /></tbl:cell>
    1024                       <%
    1025                     }
     1024                        /><%
     1025                      }
     1026                      %></tbl:cell>
     1027                    <%
    10261028                  }
    10271029                }
  • trunk/www/biomaterials/samples/list_samples.jsp

    r6701 r6721  
    888888                  for (AnnotationLoaderUtil loader : annotationLoaders)
    889889                  {
    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
    896897                          list="<%=loader.getValues()%>"
    897898                          suffix="<%=loader.getUnitSymbol()%>"
    898                       /></tbl:cell>
    899                       <%
    900                     }
     899                        /><%
     900                      }
     901                      %></tbl:cell>
     902                    <%
    901903                  }
    902904                }
  • trunk/www/biomaterials/tags/list_tags.jsp

    r6701 r6721  
    496496                  for (AnnotationLoaderUtil loader : annotationLoaders)
    497497                  {
    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
    504505                          list="<%=loader.getValues()%>"
    505506                          suffix="<%=loader.getUnitSymbol()%>"
    506                       /></tbl:cell>
    507                       <%
    508                     }
     507                        /><%
     508                      }
     509                      %></tbl:cell>
     510                    <%
    509511                  }
    510512                }
  • trunk/www/lims/arraybatches/list_batches.jsp

    r6702 r6721  
    580580                  for (AnnotationLoaderUtil loader : annotationLoaders)
    581581                  {
    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
    588589                          list="<%=loader.getValues()%>"
    589590                          suffix="<%=loader.getUnitSymbol()%>"
    590                       /></tbl:cell>
    591                       <%
    592                     }
     591                        /><%
     592                      }
     593                      %></tbl:cell>
     594                    <%
    593595                  }
    594596                }
  • trunk/www/lims/arraydesigns/list_designs.jsp

    r6702 r6721  
    707707                  for (AnnotationLoaderUtil loader : annotationLoaders)
    708708                  {
    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
    715716                          list="<%=loader.getValues()%>"
    716717                          suffix="<%=loader.getUnitSymbol()%>"
    717                       /></tbl:cell>
    718                       <%
    719                     }
     718                        /><%
     719                      }
     720                      %></tbl:cell>
     721                    <%
    720722                  }
    721723                }
  • trunk/www/lims/arrayslides/list_slides.jsp

    r6702 r6721  
    565565                  for (AnnotationLoaderUtil loader : annotationLoaders)
    566566                  {
    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
    573574                          list="<%=loader.getValues()%>"
    574575                          suffix="<%=loader.getUnitSymbol()%>"
    575                       /></tbl:cell>
    576                       <%
    577                     }
     576                        /><%
     577                      }
     578                      %></tbl:cell>
     579                    <%
    578580                  }
    579581                }
  • trunk/www/lims/plates/list_plates.jsp

    r6702 r6721  
    640640                  for (AnnotationLoaderUtil loader : annotationLoaders)
    641641                  {
    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
    648649                          list="<%=loader.getValues()%>"
    649650                          suffix="<%=loader.getUnitSymbol()%>"
    650                       /></tbl:cell>
    651                       <%
    652                     }
     651                        /><%
     652                      }
     653                      %></tbl:cell>
     654                    <%
    653655                  }
    654656                }
  • trunk/www/lims/plates/wells/list_wells.jsp

    r6702 r6721  
    629629                  for (AnnotationLoaderUtil loader : annotationLoaders)
    630630                  {
    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
    637638                          list="<%=loader.getValues()%>"
    638639                          suffix="<%=loader.getUnitSymbol()%>"
    639                       /></tbl:cell>
    640                       <%
    641                     }
     640                        /><%
     641                      }
     642                      %></tbl:cell>
     643                    <%
    642644                  }
    643645                }
  • trunk/www/views/derivedbioassays/list_bioassays.jsp

    r6699 r6721  
    782782                  for (AnnotationLoaderUtil loader : annotationLoaders)
    783783                  {
    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
    790791                          list="<%=loader.getValues()%>"
    791792                          suffix="<%=loader.getUnitSymbol()%>"
    792                       /></tbl:cell>
    793                       <%
    794                     }
     793                        /><%
     794                      }
     795                      %></tbl:cell>
     796                    <%
    795797                  }
    796798                }
  • trunk/www/views/experiments/bioassays/list_bioassays.jsp

    r6700 r6721  
    554554                  for (AnnotationLoaderUtil loader : annotationLoaders)
    555555                  {
    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
    562563                          list="<%=loader.getValues()%>"
    563564                          suffix="<%=loader.getUnitSymbol()%>"
    564                       /></tbl:cell>
    565                       <%
    566                     }
     565                        /><%
     566                      }
     567                      %></tbl:cell>
     568                    <%
    567569                  }
    568570                }
  • trunk/www/views/experiments/bioassaysets/analysis_tree.jsp

    r6700 r6721  
    837837                      for (AnnotationLoaderUtil loader : annotationLoaders)
    838838                      {
    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
    845846                              list="<%=loader.getValues()%>"
    846847                              suffix="<%=loader.getUnitSymbol()%>"
    847                           /></tbl:cell>
    848                           <%
    849                         }
     848                            /><%
     849                          }
     850                          %></tbl:cell>
     851                        <%
    850852                      }
    851853                    }
  • trunk/www/views/physicalbioassays/index.jsp

    r6695 r6721  
    8989    // Register formatters
    9090    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());
    9292   
    9393    // Register dataloaders
     
    101101    dbasQuery.restrict(Restrictions.eq(Hql.property("root"), Expressions.bool(true)));
    102102    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));
    104104  }
    105105%>
  • trunk/www/views/physicalbioassays/list_bioassays.jsp

    r6699 r6721  
    720720                  for (AnnotationLoaderUtil loader : annotationLoaders)
    721721                  {
    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
    728729                          list="<%=loader.getValues()%>"
    729730                          suffix="<%=loader.getUnitSymbol()%>"
    730                       /></tbl:cell>
    731                       <%
    732                     }
     731                        /><%
     732                      }
     733                      %></tbl:cell>
     734                    <%
    733735                  }
    734736                }
  • trunk/www/views/rawbioassays/list_rawbioassays.jsp

    r6699 r6721  
    824824                  for (AnnotationLoaderUtil loader : annotationLoaders)
    825825                  {
    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
    832833                          list="<%=loader.getValues()%>"
    833834                          suffix="<%=loader.getUnitSymbol()%>"
    834                       /></tbl:cell>
    835                       <%
    836                     }
     835                        /><%
     836                      }
     837                      %></tbl:cell>
     838                    <%
    837839                  }
    838840                }
Note: See TracChangeset for help on using the changeset viewer.