Changeset 1227


Ignore:
Timestamp:
May 24, 2010, 2:05:46 PM (11 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #266: Investigate and fix issues with external files introduced in BASE 2.16

MeV functionality was only enabled for file with location=Location.PRIMARY. Now check isDownloadable() instead.

There was an issue with the download servlet and files of unknown size.

Also replaces calls to deprecated methods.

Location:
extensions/net.sf.basedb.mev/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.mev/trunk/README

    r1191 r1227  
    11== Requirements ==
    22
    3  1. BASE 2.14.0 or later.
     3 1. BASE 2.16.0 or later.
    44 
    55== Introduction ==
  • extensions/net.sf.basedb.mev/trunk/build.xml

    r1193 r1227  
    2323  <property name="javac.target" value="1.5" />
    2424  <property name="javac.encoding" value="UTF-8" />
    25   <property name="depend.jars" value="http://base2.thep.lu.se/base/jars/2.14.0" />
     25  <property name="depend.jars" value="http://base2.thep.lu.se/base/jars/2.16.0" />
    2626
    2727  <!-- set up classpath for compiling -->
  • extensions/net.sf.basedb.mev/trunk/src/server/net/sf/basedb/mev/export/CghExporter.java

    r1082 r1227  
    1212import net.sf.basedb.core.DynamicSpotQuery;
    1313import net.sf.basedb.core.IntensityTransform;
     14import net.sf.basedb.core.Type;
    1415import net.sf.basedb.core.query.SqlResult;
    1516import net.sf.basedb.util.export.TableWriter;
     
    252253  protected void addReporterFields()
    253254  {
    254     addReporterField(ExportableFieldFactory.reporter("externalId", "ProbeID", null, null));
     255    addReporterField(ExportableFieldFactory.reporter("externalId", "ProbeID", Type.STRING, null, null));
    255256    addReporterField(chromosome);
    256257    addReporterField(start);
  • extensions/net.sf.basedb.mev/trunk/src/server/net/sf/basedb/mev/export/TdmsExporter.java

    r1081 r1227  
    1616import net.sf.basedb.core.Formula;
    1717import net.sf.basedb.core.IntensityTransform;
     18import net.sf.basedb.core.Type;
    1819import net.sf.basedb.core.query.SqlResult;
    1920import net.sf.basedb.util.Values;
     
    259260  protected void addReporterFields()
    260261  {
    261     addReporterField(ExportableFieldFactory.jep("pos()", "id", Formula.AverageMethod.NONE, null));
    262     addReporterField(ExportableFieldFactory.reporter("externalId", null, null, null));
    263     addReporterField(ExportableFieldFactory.reporter("symbol", null, null, null));
     262    addReporterField(ExportableFieldFactory.jep("pos()", "id", Type.INT, Formula.AverageMethod.NONE, null));
     263    addReporterField(ExportableFieldFactory.reporter("externalId", null, Type.STRING, null, null));
     264    addReporterField(ExportableFieldFactory.reporter("symbol", null, Type.STRING, null, null));
    264265    for (ExtendedProperty ep : ExtendedProperties.getProperties("ReporterData"))
    265266    {
  • extensions/net.sf.basedb.mev/trunk/src/server/net/sf/basedb/mev/factory/MevButtonFactory.java

    r1083 r1227  
    3232import net.sf.basedb.core.File;
    3333import net.sf.basedb.core.FileStoreUtil;
    34 import net.sf.basedb.core.Location;
    3534import net.sf.basedb.core.Permission;
    3635import net.sf.basedb.util.Values;
     
    168167      if (mevFile != null)
    169168      {
    170         if (mevFile.getLocation() != Location.PRIMARY) mevFile = null;
     169        if (!mevFile.getLocation().isDownloadable()) mevFile = null;
    171170      }
    172171    }
  • extensions/net.sf.basedb.mev/trunk/src/server/net/sf/basedb/mev/plugin/CghExporterPlugin.java

    r1159 r1227  
    2929import net.sf.basedb.core.RequestInformation;
    3030import net.sf.basedb.core.StringParameterType;
     31import net.sf.basedb.core.Type;
    3132import net.sf.basedb.core.plugin.About;
    3233import net.sf.basedb.core.plugin.AboutImpl;
     
    281282    exporter.setSource(source);
    282283    exporter.setWriter(new TableWriter(new OutputStreamWriter(out, characterSet)));
    283     exporter.setChromosomeField(ExportableFieldFactory.reporter(chromosome, "Chromosome", null, null));
    284     exporter.setStartField(ExportableFieldFactory.reporter(start, "Start", null, null));
    285     exporter.setEndField(ExportableFieldFactory.reporter(end, "End", null, null));
    286     exporter.setDescriptionField(ExportableFieldFactory.reporter(description, "Description", null, null));
     284    ExtendedProperties.getProperty("ReporterData", chromosome);
     285    exporter.setChromosomeField(ExportableFieldFactory.reporter(chromosome, "Chromosome", null, null, null));
     286    exporter.setStartField(ExportableFieldFactory.reporter(start, "Start", null, null, null));
     287    exporter.setEndField(ExportableFieldFactory.reporter(end, "End", null, null, null));
     288    exporter.setDescriptionField(ExportableFieldFactory.reporter(description, "Description", Type.TEXT, null, null));
    287289    exporter.doExport();
    288290   
  • extensions/net.sf.basedb.mev/trunk/src/server/net/sf/basedb/mev/servlet/MevDownload.java

    r1165 r1227  
    9999        response.setDateHeader("Last-Modified", file.getLastUpdate().getTime());
    100100      }
    101       if (file.getSize() < Integer.MAX_VALUE)
     101      if (file.getSize() > 0 && file.getSize() < Integer.MAX_VALUE)
    102102      {
    103103        response.setContentLength((int)file.getSize());
Note: See TracChangeset for help on using the changeset viewer.