Changeset 4900


Ignore:
Timestamp:
Apr 21, 2009, 2:54:42 PM (13 years ago)
Author:
Martin Svensson
Message:

References #1128 Parents of extracts can now be exported with the SimpleExporter?.

Location:
trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/plugins/DataLoader.java

    • Property svn:keywords changed from Id to Date Id
    r4898 r4900  
    2828    @author martin
    2929  @version 2.12
     30  @base.modified $Date$
    3031 */
    3132interface DataLoader<T>
  • trunk/src/clients/web/net/sf/basedb/clients/web/plugins/ItemQueryLoader.java

    • Property svn:keywords changed from Id to Date Id
    r4899 r4900  
    3434  @author martin
    3535  @version 2.12
    36   @base.modified $Date: 2008-09-11 22:05:50 +0200 (Thu, 11 Sep 2008) $
     36  @base.modified $Date$
    3737*/
    3838public class ItemQueryLoader
  • trunk/src/core/net/sf/basedb/util/formatter/NameableFormatter.java

    • Property svn:keywords changed from Id to Date Id
    r4899 r4900  
     1/**
     2  $Id$
     3
     4  Copyright (C) 2009 Martin Svensson
     5
     6  This file is part of BASE - BioArray Software Environment.
     7  Available at http://base.thep.lu.se/
     8
     9  BASE is free software; you can redistribute it and/or
     10  modify it under the terms of the GNU General Public License
     11  as published by the Free Software Foundation; either version 3
     12  of the License, or (at your option) any later version.
     13
     14  BASE is distributed in the hope that it will be useful,
     15  but WITHOUT ANY WARRANTY; without even the implied warranty of
     16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     17  GNU General Public License for more details.
     18
     19  You should have received a copy of the GNU General Public License
     20  along with BASE. If not, see <http://www.gnu.org/licenses/>.
     21*/
    122package net.sf.basedb.util.formatter;
    223
    324import net.sf.basedb.core.Nameable;
    425
     26/**
     27  Formatter to handle {@link Nameable} items.
     28    @author martin
     29    @version 2.12
     30    @base.modified $Date$
     31 */
    532public class NameableFormatter
    633  implements Formatter<Nameable>
  • trunk/www/biomaterials/extracts/index.jsp

    r4899 r4900  
    5959  import="net.sf.basedb.clients.web.formatter.FormatterFactory"
    6060  import="net.sf.basedb.clients.web.plugins.ItemQueryLoader"
     61  import="net.sf.basedb.clients.web.plugins.ParentBioMaterialLoader"
    6162  import="java.util.Enumeration"
    6263  import="java.util.Set"
     
    7778    cc.setObject("export.formatter.bioWell.column", new WellCoordinateFormatter(false));
    7879    cc.setObject("export.formatter.&children(name)", new NameableFormatter());
     80    cc.setObject("export.formatter.&creationEvent.sourceBioMaterials(name)", new NameableFormatter());
    7981   
    80     String extractParameter = "extracts";
     82    String restrictionParameter = "extracts";
    8183    ItemQuery<LabeledExtract> labeledExtractQuery = LabeledExtract.getQuery();
    8284    labeledExtractQuery.include(cc.getInclude());
    83     labeledExtractQuery.restrict(Restrictions.eq(Hql.property("parent"), Expressions.parameter(extractParameter)));
     85    labeledExtractQuery.restrict(Restrictions.eq(Hql.property("parent"), Expressions.parameter(restrictionParameter)));
    8486    labeledExtractQuery.order(Orders.asc(Hql.property("name")));
    85     cc.setObject("export.dataloader.&children(name)", new ItemQueryLoader(labeledExtractQuery, extractParameter));
     87    cc.setObject("export.dataloader.&children(name)", new ItemQueryLoader(labeledExtractQuery, restrictionParameter));
     88   
     89    ItemQuery<Sample> sampleQuery = Sample.getQuery();   
     90    sampleQuery.include(cc.getInclude());
     91    sampleQuery.restrict(Restrictions.eq(Hql.property("children"), Expressions.parameter(restrictionParameter)));
     92    sampleQuery.order(Orders.asc(Hql.property("name")));
     93    cc.setObject("export.dataloader.&creationEvent.sourceBioMaterials(name)", new ParentBioMaterialLoader());
    8694  }
    8795%>
  • trunk/www/biomaterials/extracts/list_extracts.jsp

    r4899 r4900  
    357357        datatype="string"
    358358        filterable="true"
     359        exportable="true"
    359360      />
    360361      <tbl:columndef
Note: See TracChangeset for help on using the changeset viewer.