Changeset 4090


Ignore:
Timestamp:
Jan 18, 2008, 2:10:56 PM (16 years ago)
Author:
Johan Enell
Message:

Merged patch release 2.5.1 to the trunk. Delta 2.5.1 - 2.5

Location:
trunk
Files:
4 deleted
89 edited
3 copied

Legend:

Unmodified
Added
Removed
  • trunk/config/dist/base.config

    r4078 r4090  
    7777# If the internal job queue should be enabled or not
    7878jobqueue.internal.enabled            = true
    79 
    80 # Signal receiver class for sending signals to running jobs (to abort them)
    81 jobqueue.internal.signalreceiver.class = net.sf.basedb.core.signal.LocalSignalReceiver
    82 jobqueue.internal.signalreceiver.init  = jobqueue:0
    8379
    8480# If plugins with useInteralJobQueue = false should be executed or not
  • trunk/config/dist/log4j.properties

    r4074 r4090  
    5454#log4j.logger.net.sf.basedb.core.storage=debug
    5555
    56 ### Log Signal handling events
    57 #log4j.logger.net.sf.basedb.core.signal=debug
    58 
    59 
    6056# -----------------
    6157# Migration loggers
  • trunk/doc/src/docbook/appendix/base.config.xml

    r4078 r4090  
    379379
    380380    <varlistentry>
    381       <term><property>jobqueue.internal.signalreceiver.class</property></term>
    382       <listitem>
    383         <para>
    384          A class implementing the <interfacename docapi="net.sf.basedb.core.signal"
    385          >SignalReceiver</interfacename>
    386          interface. The class must have a public no-argument constructor. If
    387          no value is specified the default setting is:
    388          <classname docapi="net.sf.basedb.core.signal"
    389          >net.sf.basedb.core.signal.LocalSignalReceiver</classname>.
    390          </para>
    391          <para>
    392          Change to <classname docapi="net.sf.basedb.core.signal"
    393          >net.sf.basedb.core.signal.SocketSignalReceiver</classname>
    394          if the internal job queue must be able to receive signals from outside
    395          this JVM.
    396          </para>
    397       </listitem>
    398     </varlistentry>
    399    
    400     <varlistentry>
    401       <term><property>jobqueue.internal.signalreceiver.init</property></term>
    402       <listitem>
    403         <para>
    404         Initialisation string sent to <methodname>SignalReceiver.init()</methodname>.
    405         The syntax and meaning of the string depends on the actual implementation
    406         that is used. Please see the javadoc for more information.
    407          </para>
    408       </listitem>
    409     </varlistentry>
    410 
    411     <varlistentry>
    412381      <term><property>jobqueue.internal.checkinterval</property></term>
    413382      <listitem>
  • trunk/doc/src/docbook/appendix/incompatible.xml

    r4083 r4090  
    4545    </para>
    4646  </note>
    47  
    48   <sect1 id="appendix.incompatible.2.6">
    49     <title>BASE 2.6 release</title>
    50    
    51     <bridgehead>Feature identification methods</bridgehead>
    52     <para>
    53       Array design features can now be identified by three different methods:
    54       COORDINATES, POSITION and FEATURE_ID. The coordinates method was the
    55       only one supported earlier.
    56     </para>
    57    
    58     <itemizedlist>
    59     <listitem>
    60       <para>
    61       Client and plug-in code that depends on features having unique COORDINATES
    62       may no longer work if used with an array design using a different identification method.
    63       Code that is, directly or indirectly, using a
    64       <classname docapi="net.sf.basedb.core">FeatureBatcher</classname> or
    65       <classname docapi="net.sf.basedb.core">RawDataBatcher</classname> are
    66       probably affected by this. For example, a raw data importer which
    67       doesn't know how to set the position or the feature ID can't import data to
    68       an array design that is using one of the new identification methods.
    69       </para>
    70     </listitem>
    71    
    72     <listitem>
    73       <para>
    74       The POSITION identification method will require a unqiue position number.
    75       This value used to be an auto-generated sequence starting at 1. The other
    76       identification methods will still do that, but when using the POSITION identification
    77       method the only requirement is that the position value is a unique positive integer.
    78       Client or plug-in code that depends on the position beeing a number between
    79       1 and the number of features may fail if used with an array design using
    80       the POSITION identification method.
    81       </para>
    82     </listitem>   
    83     </itemizedlist>
    84 
    85   </sect1> 
    8647 
    8748  <sect1 id="appendix.incompatible.2.5">
  • trunk/doc/src/docbook/developerdoc/api_overview.xml

    r4080 r4090  
    730730       
    731731        <para>
    732           The
    733           <property>lastUpdate</property>
    734           property holds the data and time the reporter information was last updated. The
    735           value is managed automatically by the
    736           <classname>ReporterBatcher</classname>
    737           class. That goes for
    738           <property>lastSource</property>
    739           property too, which holds information about where the last update comes from. By
    740           default this is set to the name of the logged in user, but it can be changed by
    741           calling
    742           <methodname>ReporterBatcher.setUpdateSource(String source)</methodname>
    743           before the batcher commits the updates to the database. The source-string
    744           should have the format: <synopsis>[ITEM_TYPE]:[ITEM_NAME]</synopsis> where,in
    745           the file-case, ITEM_TYPE is File and ITEM_NAME is the file's name.
     732          The <property>lastUpdate</property> property holds the data and time
     733          the reporter information was last updated. The value is managed automatically
     734          by the <classname>ReporterBatcher</classname> class.
    746735        </para>
    747736      </sect3>
     
    19581947          from plates. In the first case the features on an array design
    19591948          are described by a reporter map. A reporter map is a file
    1960           that maps a coordinate (block, meta-grid, row, column),
    1961           position or an external ID on an array design to a
    1962           reporter. Which method to use is given by the
    1963           <property>ArrayDesign.featureIdentificationMethod</property> property.
     1949          that maps a coordinate on an array design to a reporter.
    19641950          The coordinate system on an array design is divided into blocks.
    19651951          Each block can be identified either by a <property>blockNumber</property>
     
    19681954          contains several <classname docapi="net.sf.basedb.core.data">FeatureData</classname> items, each
    19691955          one identified by a row and column coordinate. Platforms that doesn't
    1970           divide the array design into blocks or doesn't use the coordinate system at all
    1971           must still create a single super-block that holds all features.
     1956          divide the array design into block should create a single super-block
     1957          that holds all features.
    19721958        </para>
    19731959       
     
    28092795     
    28102796    </sect2>
    2811    
    2812     <sect2 id="core_api.signals">
    2813       <title>Sending signals (to plug-ins)</title>
    2814    
    2815       <para>
    2816         BASE has a simple system for sending signals between different parts of
    2817         a system. This signalling system was initially developed to be able to
    2818         kill plug-ins that a user for some reason wanted to abort. The signalling
    2819         system as such is not limited to this and it can be used for other purposes
    2820         as well. Signals can of course be handled internally in a single JVM but
    2821         also sent externally to other JVM:s running on the same or a different
    2822         computer. The transport mechanism for signals is decoupled from the actual
    2823         handling of them. If you want to, you could implement a signal transporter
    2824         that sends signal as emails and the target plug-in would never know.
    2825       </para>
    2826      
    2827       <para>
    2828         The remainder of this section will focus mainly on the sending and
    2829         transportation of signals. For more information about handling signals
    2830         on the receiving end, see <xref linkend="plugin_developer.signals" />.
    2831       </para>
    2832      
    2833       <sect3 id="core_api.signals.diagram">
    2834         <title>Diagram of classes and methods</title>
    2835         <figure id="core_api.figures.signals">
    2836           <title>The signalling system</title>
    2837           <screenshot>
    2838             <mediaobject>
    2839               <imageobject>
    2840                 <imagedata
    2841                   align="center"
    2842                   scalefit="1" width="100%"
    2843                   fileref="figures/uml/corelayer.signals.png" format="PNG" />
    2844               </imageobject>
    2845             </mediaobject>
    2846           </screenshot>
    2847         </figure>
    2848      
    2849         <para>
    2850           The signalling system is rather simple. An object that wish
    2851           to receieve signals must implement the
    2852           <interfacename docapi="net.sf.basedb.core.signal"
    2853           >SignalTarget</interfacename>. It's only method
    2854           is <methodname>getSignalHandler()</methodname>. A
    2855           <interfacename docapi="net.sf.basedb.core.signal"
    2856           >SignalHandler</interfacename> is an object that
    2857           knows what to do when a signal is delivered to it. The target object
    2858           may implement the <interfacename>SignalHandler</interfacename> itself
    2859           or use one of the existing handlers.
    2860         </para>
    2861        
    2862         <para>
    2863           The difficult part here is to be aware that a signal is usually
    2864           delivered by a separate thread. The target object must be aware
    2865           of this and know how to handle multiple threads. As an example we
    2866           can use the <classname docapi="net.sf.basedb.core.signal"
    2867           >ThreadSignalHandler</classname> which simply
    2868           calls <code>Thread.interrupt()</code> to deliver a signal. The target
    2869           object that uses this signal handler it must know that it should check
    2870           <code>Thread.interrupted()</code> at regular intervals from the main
    2871           thread. If that method returns true, it means that the <constant>ABORT</constant>
    2872           signal has been delivered and the main thread should clean up and exit as
    2873           soon as possible.
    2874         </para>
    2875        
    2876         <para>
    2877           Even if a signal handler could be given directly to the party
    2878           that may be interested in sending a signal to the target this
    2879           is not recommended. This would only work when sending signals
    2880           within the same virtual machine. The signalling system includes
    2881           <interfacename docapi="net.sf.basedb.core.signal"
    2882           >SignalTransporter</interfacename> and
    2883           <interfacename docapi="net.sf.basedb.core.signal"
    2884           >SignalReceiver</interfacename> objects that are used
    2885           to decouple the sending of signals with the handling of signals. The
    2886           implementation usually comes in pairs, for example
    2887           <classname docapi="net.sf.basedb.core.signal"
    2888           >SocketSignalTransporters</classname> and <classname
    2889           docapi="net.sf.basedb.core.signal">SocketSignalReceiver</classname>.
    2890         </para>
    2891        
    2892         <para>
    2893           Setting up the transport mechanism is usually a system responsibility.
    2894           Only the system know what kind of transport that is appropriate for it's current
    2895           setup. Ie. should signals be delievered by TCP/IP sockets, only internally, or
    2896           should a delivery mechanism based on web services be implemented?
    2897           If a system wants to receive signals it must create an appropriate
    2898           <interfacename>SignalReceiver</interfacename> object. Within BASE the
    2899           internal job queue set up it's own signalling system that can be used to
    2900           send signals (eg. kill) running jobs. The job agents do the same but uses
    2901           a different implementation. See <xref linkend="appendix.base.config.jobqueue" />
    2902           for more information about how to configure the internal job queue's
    2903           signal receiver. In both cases, there is only one signal receiver instance
    2904           active in the system.
    2905         </para>
    2906        
    2907         <para>
    2908           Let's take the internal job queue as an example. Here is how it works:
    2909         </para>
    2910        
    2911         <itemizedlist>
    2912         <listitem>
    2913           <para>
    2914           When the internal job queue is started, it will also create a signal
    2915           receiver instance according to the settings in <filename>base.config</filename>.
    2916           The default is to create <classname docapi="net.sf.basedb.core.signal"
    2917           >LocalSignalReceiver</classname>
    2918           which can only be used inside the same JVM. If needed, this can
    2919           be changed to a <classname docapi="net.sf.basedb.core.signal"
    2920           >SocketSignalReceiver</classname> or any other
    2921           user-provided implementation.
    2922           </para>
    2923         </listitem>
    2924        
    2925         <listitem>
    2926           <para>
    2927           When the job queue has found a plug-in to execute it will check if
    2928           it also implements the <interfacename docapi="net.sf.basedb.core.signal"
    2929           >SignalTarget</interfacename>
    2930           interface. If it does, a signal handler is created and registered
    2931           with the signal receiver. This is actually done by the BASE core
    2932           by calling <methodname>PluginExecutionRequest.registerSignalReceiver()</methodname>
    2933           which also makes sure that the the ID returned from the registration is
    2934           stored in the database together with the job item representing the
    2935           plug-in to execute.
    2936           </para>
    2937         </listitem>
    2938        
    2939         <listitem>
    2940           <para>
    2941           Now, when the web client see's a running job which has a non-empty
    2942           signal transporter property, the <guilabel>Abort</guilabel>
    2943           button is activated. If the user clicks this button the BASE core
    2944           uses the information in the database to create
    2945           <interfacename docapi="net.sf.basedb.core.signal"
    2946           >SignalTransporter</interfacename> object. This
    2947           is simply done by calling <code>Job.getSignalTransporter()</code>.
    2948           The created signal transporter knows how to send a signal
    2949           to the signal receiver it was first registered with. When the
    2950           signal arrives at the receiver it will find the handler for it
    2951           and call <code>SignalHandler.handleSignal()</code>. This will in it's turn
    2952           trigger some action in the signal target which soon will abort what
    2953           it is doing and exit.
    2954           </para>
    2955         </listitem>
    2956         </itemizedlist>
    2957        
    2958        
    2959       </sect3>
    2960    
    2961     </sect2>
    2962    
    29632797  </sect1>
    29642798
  • trunk/doc/src/docbook/developerdoc/plugin_developer.xml

    r4078 r4090  
    43654365  </sect1>
    43664366 
    4367   <sect1 id="plugin_developer.signals">
    4368     <title>Enable support for aborting a running a plug-in</title>
    4369    
    4370     <para>
    4371       BASE includes a simple signalling system that can be used to send
    4372       signals to plug-ins. The system was primarly developed to allow a user
    4373       to kill a plug-in when it is executing. Therfore, the focus of this chapter
    4374       will be how to implement a plug-in to make it possible to kill it
    4375       during it's execution.
    4376     </para>
    4377    
    4378     <para>
    4379       Since we don't want to do this by brute force such as destroying the
    4380       process or stopping thread the plug-in executes in, cooperation is needed
    4381       by the plug-in. First, the plug-in must implement the
    4382       <interfacename docapi="net.sf.basedb.core.signal">SignalTarget</interfacename>
    4383       interface. From this, a <interfacename
    4384       docapi="net.sf.basedb.core.signal">SignalHandler</interfacename> can be created.
    4385       A plug-in may choose to implement it's own signal handler or use an existing
    4386       implementation. BASE, for example, provides the <classname docapi="net.sf.basedb.core.signal"
    4387       >ThreadSignalHandler</classname> implementation that supports the <constant>ABORT</constant> signal.
    4388       This is a simple implementation that just calls <code>Thread.interrupt()</code>
    4389       on the plug-in worker thread. This may cause two different effects:
    4390     </para>
    4391    
    4392     <itemizedlist>
    4393     <listitem>
    4394       <para>
    4395       The <code>Thread.interrupted()</code> flag is set. The plug-in must check this
    4396       at regular intervals and if the flag is set it must cleanup, rollback
    4397       open transactions and exit as soon as possible.
    4398       </para>
    4399     </listitem>
    4400    
    4401     <listitem>
    4402       <para>
    4403       If the plug-in is waiting in a blocking call that is interruptable, for
    4404       example <code>Thread.sleep()</code>, an <classname>InterruptedException</classname>
    4405       is thrown. This should cause the same actions as if the flag was set to happen.
    4406       </para>
    4407      
    4408       <warning>
    4409         <title>Not all blocking calls are interruptable</title>
    4410         <para>
    4411         For example calling <code>InputStream.read()</code> may leave the
    4412         plug-in waiting in a non-interruptable state. In this case there
    4413         is nothing BASE can do to wake it up again.
    4414         </para>
    4415       </warning>
    4416     </listitem>
    4417     </itemizedlist>
    4418    
    4419     <para>
    4420       Here is a general outline for a plug-in that uses the
    4421       <classname>ThreadSignalHandler</classname>.
    4422     </para>
    4423     <programlisting language="java">
    4424 <![CDATA[
    4425 private ThreadSignalHandler signalHandler;
    4426 public SignalHandler getSignalHandler()
    4427 {
    4428    signalHandler = new ThreadSignalHandler();
    4429    return signalHandler;
    4430 }
    4431 
    4432 public void run(Request request, Response response, ProgressReporter progress)
    4433 {
    4434    if (signalHandler != null) signalHandler.setWorkerThread(null);
    4435    beginTransaction();
    4436    boolean done = false;
    4437    boolean interrupted = false;
    4438    while (!done && !interrupted)
    4439    {
    4440       try
    4441       {
    4442          done = doSomeWork(); // NOTE! This must not take forever!
    4443          interrupted = Thread.interrupted();
    4444       }
    4445       catch (InterruptedException ex)
    4446       {
    4447          // NOTE! Try-catch is only needed if thread calls
    4448          // a blocking method that is interruptable
    4449          interrupted = true;
    4450       }
    4451    }
    4452    if (interrupted)
    4453    {
    4454       rollbackTransaction();
    4455       response.setError("Aborted by user", null);
    4456    }
    4457    else
    4458    {
    4459       commitTransaction();
    4460       response.setDone("Done");
    4461    }
    4462 }
    4463 ]]>
    4464 </programlisting>
    4465    
    4466     <para>
    4467       Another signal handler implementation is the
    4468       <classname docapi="net.sf.basedb.core.signal">ProgressReporterSignalHandler</classname>.
    4469       See that javadoc for information about how to use it.
    4470       For more information about the signalling system as a whole,
    4471       see <xref linkend="core_api.signals" />.
    4472     </para>
    4473    
    4474   </sect1>
    4475  
    44764367  <sect1 id="plugin_developer.classload">
    44774368    <title>How BASE load plug-in classes</title>
  • trunk/doc/src/docbook/userdoc/rawbioassays.xml

    r4083 r4090  
    138138            The array design can be changed after raw data has been
    139139            imported, but this triggers a new validation. If the raw data
    140             is stored in the database, the features on the new array design must
    141             match the the raw data. The verification can use three different methods:
    142           </para>
    143          
    144           <itemizedlist>
    145           <listitem>
    146             <para>
    147             Coordinates: Verify block, meta-grid, row and column coordinates.
    148             </para>
    149           </listitem>
    150           <listitem>
    151             <para>Position: Verify the position number.</para>
    152           </listitem>
    153           <listitem>
    154             <para>
    155             Feature ID: Verify the feature ID. This option can only be used
    156             if the raw bioassay is currently connected to an array design that
    157             has feature ID values already.
    158             </para>
    159           </listitem>
    160           </itemizedlist>
    161           <para>
    162             In all three cases it is also verified that the reporter of the raw
    163             data matches the reporter of the features.
    164           </para>
    165 
    166           <para>
    167             For Affymetrix data, the
     140            is stored in the database, the position, coordinates and reporter of all features
     141            on the new array design must exactly match the position,
     142            coordinates and reporter of the raw data. For Affymetrix data, the
    168143            CEL file is validated against the CDF file of the new array design.
    169144            If the validation fails, the array design is not changed.
  • trunk/doc/src/docbook/userdoc/webclient.xml

    r4072 r4090  
    15391539          <informalexample>Experiment A, Experiment B, etc.</informalexample>
    15401540        </para>
    1541         <para>
    1542           If you want to filter on several values at the same time, separate the
    1543           values in the filter input box with the <quote>|</quote> character.
    1544           For example, a filter text like <informalexample>Experiment A|C%</informalexample>
    1545           matches both <quote>Experiment A</quote> and values 
    1546           that begin with <quote>C</quote>.
    1547         </para>       
     1541       
    15481542        <para>
    15491543          You can also use operators to find items which has a value that
     
    15771571          <varlistentry>
    15781572            <term><keycap>=</keycap></term>
    1579             <listitem>
    1580               <simpara>
    1581                 Equal to (useful to find items with a null value). Supports
    1582                 filtering on more then one value.
    1583               </simpara>
    1584             </listitem>
     1573            <listitem><simpara>Equal to (useful to find items with a null value)</simpara></listitem>
    15851574          </varlistentry>
    15861575          <varlistentry>
    15871576            <term><keycap>&lt;&gt;</keycap></term>
    15881577            <term><keycap>!=</keycap></term>
    1589             <listitem>
    1590               <simpara>
    1591                 Not equal to (useful to find items with a non-null value). Supports
    1592                 filtering on more then one value.
    1593               </simpara>
    1594             </listitem>
    1595           </varlistentry>
    1596           <varlistentry>
    1597             <term><keycap>==</keycap></term>
    1598             <listitem>
    1599               <simpara>
    1600                 Same as <keycap>=</keycap> but this will ignore <quote>|</quote> as a value separator.
    1601               </simpara>
    1602             </listitem>
     1578            <listitem><simpara>Not equal to (useful to find items with a non-null value)</simpara></listitem>
    16031579          </varlistentry>
    16041580        </variablelist>
  • trunk/src/clients/jobagent/net/sf/basedb/clients/jobagent/Agent.java

    r4078 r4090  
    5050import net.sf.basedb.util.Values;
    5151import net.sf.basedb.util.jobagent.JobAgentServerConnection;
    52 import net.sf.basedb.util.jobagent.JobInfo;
    5352import net.sf.basedb.util.jobagent.RequestHandler;
    5453import net.sf.basedb.util.timer.Scheduler;
     
    251250  private JobAgentServerConnection server;
    252251  private RequestHandler requestHandler;
    253   private AgentSignalReceiver signalReceiver;
    254252  private JobExecutor jobExecutor;
    255253
     
    275273  private final Map<Job.ExecutionTime, Integer> priorities;
    276274 
    277   private final Set<JobInfo> activeJobs;
    278 
    279   /**
    280     Timeout to wait for jobs to act on the ABORT signal when stopping.
    281     Default value is 20 seconds.
    282   */
    283   private int closeTimeout = 20000;
    284 
     275  private final Set<Integer> activeJobs;
     276 
    285277  /**
    286278    The group were all job runners are placed.
     
    352344    runnersGroup.setDaemon(false);
    353345
    354     this.activeJobs = new HashSet<JobInfo>();
     346    this.activeJobs = new HashSet<Integer>();
    355347    isRunning = false;
    356348  }
     
    538530    if (server == null)
    539531    {
    540       this.signalReceiver = new AgentSignalReceiver(this);
    541       this.signalReceiver.init(null);
    542532      this.requestHandler = requestHandler == null ? new DefaultRequestHandler(this) : requestHandler;
    543533      this.server = new JobAgentServerConnection(port, this.requestHandler, logServer);
     
    644634    Get a set containing the ID:s of the jobs that are currently
    645635    beeing executed by this job agent.
    646     @return A set of JobInfo objects
    647     @since 2.6
    648   */
    649   public Set<JobInfo> getRunningJobs()
     636    @return A set of integers
     637  */
     638  public Set<Integer> getRunningJobs()
    650639  {
    651640    if (log.isDebugEnabled()) log.debug("Active jobs: " + activeJobs);
     
    694683    }
    695684    return allow;
    696   }
    697  
    698   /**
    699     Get the signal receiver that is processing signal messages
    700     on behalf of this job agent.
    701     @since 2.6
    702   */
    703   public AgentSignalReceiver getSignalReceiver()
    704   {
    705     return signalReceiver;
    706685  }
    707686 
     
    814793        slotToUse = slots[i];
    815794        usedSlots.put(slotToUse, usedSlots.get(slotToUse) + 1);
    816         activeJobs.add(new JobInfo(job, slotToUse));
     795        activeJobs.add(job.getId());
    817796        log.debug("Slot: " + slotToUse + "; used: " + usedSlots.get(slotToUse) + "; max: " + maxSlots.get(slotToUse));
    818797        break;
     
    851830  {
    852831    usedSlots.put(usedSlot, usedSlots.get(usedSlot) - 1);
    853     activeJobs.remove(new JobInfo(job, usedSlot));
     832    activeJobs.remove(job.getId());
    854833  }
    855834 
     
    936915 
    937916  /**
    938     Try to stop running jobs by interrupting the threads they are executing in.
     917    Try to stop running jobs by interrupting the threads thaey are executing in.
    939918  */
    940919  private void maybeStopRunningJobs()
    941920  {
    942921    log.info("Stopping running jobs. " + activeJobs.size() + " job(s) still active.");
    943    
    944     // Send ABORT to all jobs, that support signals
    945     signalReceiver.close(closeTimeout);
     922    // Interrupt all threads. Hopefully they will do as we tell them.
     923    runnersGroup.interrupt();
    946924  }
    947925 
  • trunk/src/clients/jobagent/net/sf/basedb/clients/jobagent/executors/DummyJobExecutor.java

    r4078 r4090  
    2424package net.sf.basedb.clients.jobagent.executors;
    2525
    26 import java.util.Collections;
    27 
    2826import net.sf.basedb.clients.jobagent.Agent;
    2927import net.sf.basedb.clients.jobagent.JobExecutor;
     
    3230import net.sf.basedb.core.JobAgentSettings;
    3331import net.sf.basedb.core.SessionControl;
    34 import net.sf.basedb.core.signal.SignalReceiver;
    35 import net.sf.basedb.core.signal.ThreadSignalHandler;
    3632import net.sf.basedb.util.Values;
    3733
     
    9389    log.info("Executing job: " + job);
    9490    DbControl dc = null;
    95     boolean aborted = false;
    96     Throwable error = null;
    9791    try
    9892    {
     
    10296      if (wait > 0)
    10397      {
    104         SignalReceiver signalReceiver = agent.getSignalReceiver();
    105         job.setSignalTransporter(signalReceiver.getSignalTransporterClass(),
    106           signalReceiver.registerSignalHandler(new ThreadSignalHandler()));
    10798        job.setProgress(50, "Halfway; waiting " + wait + " seconds");
    10899        dc.commit();
     
    114105          }
    115106        }
    116         catch (InterruptedException ex)
    117         {
    118           aborted = true;
    119         }
    120107        catch (Throwable t)
    121108        {
    122109          log.error(t.getMessage(), t);
    123           error = t;
    124110        }
    125111        dc  = sc.newDbControl();
    126112        dc.reattachItem(job);
    127113      }
    128       if (aborted)
    129       {
    130         job.doneError("Aborted by user");
    131       }
    132       else if (error != null)
    133       {
    134         job.doneError(error.getMessage(), Collections.singleton(error));
    135       }
    136       else
    137       {
    138         job.doneOk("Not really, but used for testing job agent");
    139       }
     114      job.doneOk("Not really, but used for testing job agent");
    140115      dc.commit();
    141116      log.info("Done executing: " + job);
  • trunk/src/clients/jobagent/net/sf/basedb/clients/jobagent/executors/ProcessJobExecutor.java

    r4078 r4090  
    4242import net.sf.basedb.core.PluginDefinition;
    4343import net.sf.basedb.core.SessionControl;
    44 import net.sf.basedb.core.signal.Signal;
    45 import net.sf.basedb.core.signal.SignalHandler;
    46 import net.sf.basedb.core.signal.SignalReceiver;
    47 import net.sf.basedb.core.signal.SignalTransporter;
    48 import net.sf.basedb.core.signal.ThreadSignalHandler;
    4944import net.sf.basedb.util.Values;
    5045
     
    106101  private String javaBin;
    107102  private String options;
    108   private SignalReceiver signalReceiver;
    109   private SignalHandler signalHandler;
    110103 
    111104  public ProcessJobExecutor()
     
    127120    if (javaBin == null) javaBin = "java";
    128121    options = Values.getString(agent.getProperty("agent.executor.process.options"), "-server");
    129     signalReceiver = agent.getSignalReceiver();
    130122  }
    131123 
     
    134126  {
    135127    log.info("Executing job: " + job);
    136 
     128   
    137129    // Generate command for new process
    138130    List<String> cmd = new ArrayList<String>(10);
     
    172164    cmd.add("-t"); // Thread priority
    173165    cmd.add(Integer.toString(agent.getThreadPriority(job.getEstimatedExecutionTime())));
    174     cmd.add("-x"); // Port the job agent is listening on for remote control
    175     cmd.add(Integer.toString(agent.getPort()));
    176166   
    177167    Process process = null;
     
    211201        new InputStreamReader(process.getInputStream()), result));
    212202      t.start();
    213      
     203
    214204      try
    215205      {
    216206        log.info("Waiting for process to end");
    217         signalHandler = new ThreadSignalHandler();
    218         signalReceiver.registerSignalHandler(signalHandler);
    219207        int exitCode = process.waitFor();
    220208        if (exitCode != 0)
     
    236224      {
    237225        log.info("Job was interrupted: " + job, ex);
    238         // First, send ABORT to the job if it supports it
     226        // Kill the process
     227        process.destroy();
    239228        dc = sc.newDbControl();
    240229        job = Job.getById(dc, job.getId());
    241         SignalTransporter signalTransporter = job.getSignalTransporter();
    242         if (signalTransporter != null)
    243         {
    244           signalTransporter.send(Signal.ABORT);
    245         }
    246         else
    247         {
    248           job.doneError("Aborted by user", Arrays.asList(ex));
    249           process.destroy();
    250         }
     230        job.doneError(ex.getMessage(), Arrays.asList(ex));
    251231        dc.commit();
    252       }
    253       finally
    254       {
    255         signalReceiver.unregisterSignalHandler(signalHandler);         
    256232      }
    257233    }
  • trunk/src/clients/jobagent/net/sf/basedb/clients/jobagent/executors/ThreadJobExecutor.java

    r4078 r4090  
    3939import net.sf.basedb.core.SessionControl;
    4040import net.sf.basedb.core.plugin.Response;
    41 import net.sf.basedb.core.signal.SignalReceiver;
    42 import net.sf.basedb.core.signal.SocketSignalReceiver;
    4341import net.sf.basedb.util.SocketUtil;
    4442import net.sf.basedb.util.Values;
     
    6765    org.apache.log4j.LogManager.getLogger("net.sf.basedb.clients.jobagent.executors.ThreadJobExecutor");
    6866 
    69   private SignalReceiver signalReceiver;
    7067 
    7168  public ThreadJobExecutor()
     
    7774  */
    7875  public void init(Agent agent)
    79   {
    80     this.signalReceiver = agent == null ? null : agent.getSignalReceiver();
    81   }
     76  {}
    8277 
    8378  public void executeJob(SessionControl sc, Agent agent, Job job, JobAgentSettings settings,
     
    10499        log.error("Error executing job: " + job, t);
    105100      }
    106       exec.registerSignalReceiver(signalReceiver);
    107101      dc.commit();
    108102
     
    136130  // -------------------------------------------
    137131 
    138   private void setSignalReceiver(SignalReceiver signalReceiver)
    139   {
    140     this.signalReceiver = signalReceiver;
    141   }
    142  
    143132  public static void main(String[] args)
    144133  {
     
    149138    String login = cmdLine.getOption("-u");
    150139    String password = cmdLine.getOption("-p");
    151     String proxyPort = cmdLine.getOption("-x");
    152140    int threadPriority = Values.getInt(cmdLine.getOption("-t"), Thread.NORM_PRIORITY);
    153141
     
    163151    {
    164152      ThreadJobExecutor executor = new ThreadJobExecutor();
    165      
    166       if (proxyPort != null)
    167       {
    168         SocketSignalReceiver signalReceiver = new SocketSignalReceiver();
    169         signalReceiver.init("proxy=" + Application.getHostName() + ":" + proxyPort);
    170         executor.setSignalReceiver(signalReceiver);
    171         Runtime.getRuntime().addShutdownHook(new Thread(new ShutdownHook(signalReceiver)));
    172       }
    173153     
    174154      sc = Application.newSessionControl("net.sf.basedb.clients.jobagent",
     
    208188  }
    209189 
    210   private static class ShutdownHook
    211     implements Runnable
    212   {
    213     private SignalReceiver signalReceiver;
    214    
    215     private ShutdownHook(SignalReceiver signalReceiver)
    216     {
    217       this.signalReceiver = signalReceiver;
    218     }
    219     public void run()
    220     {
    221       signalReceiver.close(5000);
    222     }
    223   }
    224190}
  • trunk/src/clients/jobagent/net/sf/basedb/clients/jobagent/handlers/DefaultRequestHandler.java

    r4078 r4090  
    6969    registerHandler(new StopRequestHandler(agent), "stop");
    7070    registerHandler(new PauseRequestHandler(agent), "pause");
    71     if (agent.getSignalReceiver() != null)
    72     {
    73       registerHandler(new SignalRequestHandler(agent), "signal");
    74     }
    7571  }
    7672 
     
    9389    String answer = null;
    9490    RequestHandler handler = commandHandlers.get(cmd);
    95     if (handler == null && cmd != null && cmd.startsWith("signal://"))
    96     {
    97       handler = commandHandlers.get("signal");
    98     }
    9991    if (!agent.isAllowedControl(remote, cmd))
    10092    {
  • trunk/src/clients/migrate/net/sf/basedb/clients/migrate/ArrayBlockTransfer.java

    r4080 r4090  
    3333import net.sf.basedb.core.DbControl;
    3434import net.sf.basedb.core.FeatureBatcher;
    35 import net.sf.basedb.core.FeatureIdentificationMethod;
    3635import net.sf.basedb.core.ItemNotFoundException;
    3736import net.sf.basedb.core.Plate;
     
    114113          ArrayDesign arrayDesign = ArrayDesign.getById(dc, base2Id);
    115114          PreparedStatement ps = prepareStatementFromFile("selectArrayBlocksByArrayType");
    116           FeatureBatcher featureBatcher = arrayDesign.getFeatureBatcher(FeatureIdentificationMethod.COORDINATES);
     115          FeatureBatcher featureBatcher = arrayDesign.getFeatureBatcher();
    117116          log.debug("Setting batch size to: " + getBatchSize());
    118117          featureBatcher.setBatchSize(getBatchSize());
  • trunk/src/clients/migrate/net/sf/basedb/clients/migrate/RawBioAssayDataTransfer.java

    r4083 r4090  
    168168     */
    169169    cleanUpMemory();
    170     RawDataBatcher batcher = rawBioAssay.getRawDataBatcher(null);
     170    RawDataBatcher batcher = rawBioAssay.getRawDataBatcher();
    171171    batcher.setBatchSize(getBatchSize());
    172172    runRawBioAssay(rawBioAssay, batcher, hasArrayDesign, rawBioAssayId);
  • trunk/src/clients/web/net/sf/basedb/clients/web/fileupload/FileUpload.java

    r4034 r4090  
    774774      throws IOException
    775775    {
    776       if (status.eof || status.atBoundary) return -1;
     776      int available = end - start;
     777      if (available == 0)
     778      {
     779        if (status.eof || status.atBoundary) return -1;
     780        available = readMoreData();
     781      }
    777782      int result = -1;
    778       int available = end - start;
    779       if (available == 0) available = readMoreData();
    780783      if (available > 0)
    781784      {
    782         result = buffer[start];
     785        // Important! Mask with 0xff to get values in range (0,255), NOT (-128,127)
     786        result = buffer[start] & 0xff;
    783787        start++;
    784788      }
  • trunk/src/clients/web/net/sf/basedb/clients/web/plugins/SimpleExport.java

    r3991 r4090  
    468468    template.writeHeaders();
    469469   
    470     int numExported = 0;
     470    long numExported = 0;
    471471    ResultIterator result = null;
    472472    try
     
    506506          if (progress != null)
    507507          {
    508             int percent = (int)(100f * numExported / totalItems);
     508            int percent = (int)(100L * numExported / totalItems);
    509509            progress.display(percent, numExported + " of " + totalItems + " done.");
    510510          }
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/Head.java

    r4084 r4090  
    9090
    9191  /**
    92    
    93   */
    94   private static final long serialVersionUID = 948719986796860767L;
    95 
    96   /**
    9792    The parent &lt;base:page&gt; tag.
    9893  */
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/HideableSection.java

    r4084 r4090  
    193193
    194194  /**
    195    
    196   */
    197   private static final long serialVersionUID = 4750788983708350436L;
    198 
    199   /**
    200195    The parent &lt;base:page&gt; tag.
    201196  */
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/Note.java

    r4084 r4090  
    155155{
    156156
    157   /**
    158    
    159   */
    160   private static final long serialVersionUID = 7490498743887372136L;
    161 
    162157  private static final int NOTE_TYPE_ERROR = 1;
    163158 
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/Page.java

    r4084 r4090  
    278278    throws JspException
    279279  {
    280     StringBuilder sb = new StringBuilder();
    281     sb.append("</html>\n");
    282     try
    283     {
    284       pageContext.getOut().print(sb.toString());
    285     }
    286     catch (Exception ex)
    287     {
    288       throw new JspTagException(ex.getMessage());
     280    if (type != PAGE_TYPE_INCLUDE)
     281    {
     282      StringBuilder sb = new StringBuilder();
     283      sb.append("</html>\n");
     284      try
     285      {
     286        pageContext.getOut().print(sb.toString());
     287      }
     288      catch (Exception ex)
     289      {
     290        throw new JspTagException(ex.getMessage());
     291      }
    289292    }
    290293    return EVAL_PAGE;
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/PropertyValue.java

    r4084 r4090  
    122122
    123123  /**
    124    
    125   */
    126   private static final long serialVersionUID = -92637960053523649L;
    127 
    128   /**
    129124    The item. Should be BasicItem or BasicData.
    130125  */
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/Select.java

    r4084 r4090  
    228228
    229229 
    230   /**
    231    
    232   */
    233   private static final long serialVersionUID = -9096279950931870965L;
    234 
    235230  /**
    236231    Optional <code>class</code> attribute
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/menu/Menuitem.java

    r4084 r4090  
    136136{
    137137  /**
    138    
    139   */
    140   private static final long serialVersionUID = 1431778959423572670L;
    141 
    142   /**
    143138    The parent Menu.
    144139  */
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/menu/Menuseparator.java

    r4084 r4090  
    9191{
    9292
    93   /**
    94    
    95   */
    96   private static final long serialVersionUID = -1758168104130104042L;
    97 
    9893  private Menu menu;
    9994 
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/menu/Submenu.java

    r4084 r4090  
    135135{
    136136  /**
    137    
    138   */
    139   private static final long serialVersionUID = -9170636903520137656L;
    140 
    141   /**
    142137    The parent Menu.
    143138  */
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/tab/Tab.java

    r4084 r4090  
    127127
    128128  /**
    129    
    130   */
    131   private static final long serialVersionUID = -2308568821797105775L;
    132 
    133   /**
    134129    The parent TabControl object.
    135130  */
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/tab/TabControl.java

    r4084 r4090  
    157157{
    158158  /**
    159    
    160   */
    161   private static final long serialVersionUID = 1898616270560551262L;
    162 
    163   /**
    164159    Optional <code>style</code> attribute
    165160  */
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/Button.java

    r4084 r4090  
    167167
    168168  /**
    169    
    170   */
    171   private static final long serialVersionUID = -6294795199053088632L;
    172 
    173   /**
    174169    The parent &lt;tbl:table&gt; tag.
    175170  */
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/Cell.java

    r4084 r4090  
    111111
    112112  /**
    113    
    114   */
    115   private static final long serialVersionUID = -1992298892993613884L;
    116 
    117   /**
    118113    The parent &lt;tbl:table&gt; tag.
    119114  */
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/CellValue.java

    r4084 r4090  
    2323*/
    2424package net.sf.basedb.clients.web.taglib.table;
     25
     26import java.util.List;
    2527
    2628import javax.servlet.jsp.JspException;
     
    8991{
    9092
    91   /**
    92    
    93   */
    94   private static final long serialVersionUID = 4068184541728474047L;
    95 
    9693  private static final Formatter toStringFormatter = new ToStringFormatter();
    9794 
     
    10097  */
    10198  private Object value = null;
    102   private Iterable<?> list = null;
     99  private List<?> list = null;
    103100  private String separator = "; ";
    104101
     
    116113  }
    117114 
    118   public void setList(Iterable<?> list)
     115  public void setList(List<?> list)
    119116  {
    120117    this.list = list;
    121118  }
    122119 
    123   public Iterable<?> getList()
     120  public List<?> getList()
    124121  {
    125122    return list;
     
    154151      theSeparator = separator;
    155152    }
    156     if (list != null)
     153    if (list != null && list.size() > 0)
    157154    {
    158155      for (Object o : list)
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/ColumnDef.java

    r4084 r4090  
    253253  extends TagSupport
    254254{
    255 
    256   /**
    257    
    258   */
    259   private static final long serialVersionUID = -272408513116029365L;
    260255
    261256  /**
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/Columns.java

    r4084 r4090  
    5454{
    5555
    56   /**
    57    
    58   */
    59   private static final long serialVersionUID = 8857257637171219032L;
    6056  private Table table;
    6157  private Data data;
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/Data.java

    r4084 r4090  
    100100
    101101  /**
    102    
    103   */
    104   private static final long serialVersionUID = 6633768910320305875L;
    105 
    106   /**
    107102    The parent &lt;tbl:table&gt; tag.
    108103  */
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/Header.java

    r4084 r4090  
    9292
    9393  /**
    94    
    95   */
    96   private static final long serialVersionUID = -7541520513764712983L;
    97 
    98   /**
    9994    The parent &lt;tbl:table&gt; tag.
    10095  */
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/Label.java

    r4084 r4090  
    137137
    138138  /**
    139    
    140   */
    141   private static final long serialVersionUID = 5326481772609709567L;
    142 
    143   /**
    144139    The parent &lt;tbl:table&gt; tag.
    145140  */
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/Panel.java

    r4084 r4090  
    107107
    108108  /**
    109    
    110   */
    111   private static final long serialVersionUID = 8435173953529878997L;
    112 
    113   /**
    114109    The parent &lt;tbl:table&gt; tag.
    115110  */
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/PresetSelector.java

    r4084 r4090  
    5858  extends TagSupport
    5959{
    60 
    61   /**
    62    
    63   */
    64   private static final long serialVersionUID = 6787200020881710014L;
    6560
    6661  /**
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/Row.java

    r4084 r4090  
    117117
    118118  /**
    119    
    120   */
    121   private static final long serialVersionUID = 1975591924471893645L;
    122 
    123   /**
    124119    The parent &lt;tbl:table&gt; tag.
    125120  */
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/Rows.java

    r4084 r4090  
    5454{
    5555
    56   /**
    57    
    58   */
    59   private static final long serialVersionUID = 2099882746242865479L;
    6056  private Table table;
    6157  private Data data;
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/Table.java

    r4084 r4090  
    203203
    204204  /**
    205    
    206   */
    207   private static final long serialVersionUID = -6717117667917148241L;
    208 
    209   /**
    210205    The parent &lt;base:page&gt; tag.
    211206  */
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/Toolbar.java

    r4084 r4090  
    115115
    116116  /**
    117    
    118   */
    119   private static final long serialVersionUID = -8719987407920036604L;
    120 
    121   /**
    122117    The parent &lt;tbl:table&gt; tag.
    123118  */
  • trunk/src/core/common-queries.xml

    r4080 r4090  
    524524      SELECT s
    525525      FROM net.sf.basedb.core.data.MimeTypeData s
    526       WHERE s.extension = :extension
     526      WHERE LOWER(s.extension) = LOWER(:extension)
    527527    </sql>
    528528    <description>
  • trunk/src/core/net/sf/basedb/core/Affymetrix.java

    r3820 r4090  
    357357      if (hasProgress && (index % progressInterval == 0))
    358358      {
    359         int percent = 5 + 90 * index / numProbesets;
     359        int percent = 5 + (int)(90L * (long)index / numProbesets);
    360360        int remain = numProbesets - index;
    361361        String created = create ? "; " + numCreated + " created" : "";
  • trunk/src/core/net/sf/basedb/core/Job.java

    r4078 r4090  
    12791279    private long lastUpdate;
    12801280   
     1281    private int lastValue;
     1282    private int offset;
     1283   
    12811284    ProgressReporterImpl(Job job, String server, ProgressReporter chained)
    12821285      throws BaseException
     
    12881291      this.chained = chained;
    12891292      this.lastUpdate = 0;
     1293      this.lastValue = 0;
     1294      this.offset = 0;
    12901295    }
    12911296   
     
    12991304      if (System.currentTimeMillis() - lastUpdate > UPDATE_INTERVAL || percent == 100)
    13001305      {
     1306        // If the percent is negative and less then the last value, an offset will be calculated.
     1307        // This will adjust the percent to a realistic value.
     1308        //Notice: It is only possible to give a value close to what expected.
     1309        if (percent < lastValue && percent < 0)
     1310        {
     1311          if (Math.abs(percent) < Math.abs(lastValue))
     1312          {
     1313            offset = offset + 2*Math.abs(lastValue);
     1314          }
     1315          else
     1316          {
     1317            offset = offset + 2*Math.abs(percent);
     1318          }
     1319        }
     1320        lastValue = percent;   
     1321        percent = percent + offset;
     1322       
    13011323        lastUpdate = System.currentTimeMillis();
    13021324        DbControl dc = null;
  • trunk/src/core/net/sf/basedb/core/RawBioAssay.java

    r4083 r4090  
    11641164
    11651165      DataResultIterator<RawData> result = rawQuery.iterate(dc);
    1166       int numValidated = 0;
     1166      long numValidated = 0;
    11671167      int numTotal = getNumDbSpots();
    11681168      while (result.hasNext())
     
    12211221        if (progress != null && numValidated % 100 == 0)
    12221222        {
    1223           int percent = 10 + (90 * numValidated) / numTotal;
     1223          int percent = 10 + ((int)(90L * numValidated) / numTotal);
    12241224          progress.display(percent, "Validated " + numValidated + " of " + numTotal + " spots.");
    12251225        }
  • trunk/src/core/net/sf/basedb/core/SpotImages.java

    r3820 r4090  
    472472          if (progress != null)
    473473          {
    474             int spotsDone = spotImagesPerImage*imageNumber;
    475             int percent = 10 + 90 * spotsDone / totalSpots;
     474            long spotsDone = spotImagesPerImage*imageNumber;
     475            int percent = 10 + (int)(90L * spotsDone / totalSpots);
    476476            progress.display(percent, "Generating spot images ("+spotsDone+" done)...");
    477477          }
  • trunk/src/core/net/sf/basedb/util/BioAssaySetFilterUtil.java

    r4017 r4090  
    123123    }
    124124   
    125     int spotsDone = 0;
     125    long spotsDone = 0;
    126126    int spotsAfter = 0;
    127127    if (progress != null) progress.display(10, "Filtering spots (0 done; "+spotsTotal+" total)...");
     
    139139      if (progress != null)
    140140      {
    141         int percent = 10 + 90 * spotsDone / spotsTotal;
     141        int percent = 10 + (int)(90L * spotsDone / spotsTotal);
    142142        progress.display(percent,
    143143          "Filtering spot intensities ("+spotsDone+" done; "+spotsTotal+" total)...");
     
    205205    // Prepare progress reporting
    206206    int interval = 10;  // Update progress after this many spots >= 10
    207     int spotsDone = 0;
     207    long spotsDone = 0;
    208208    int spotsAfter = 0;
    209209    if (progress != null)
     
    236236            if (spotsDone % interval == 0)
    237237            {
    238               int percent = 10 + 90 * spotsDone / spotsTotal;
     238              int percent = 10 + (int)(90L * spotsDone / spotsTotal);
    239239              progress.display(percent,
    240240                "Filtering spot intensities ("+spotsDone+" done; "+spotsTotal+" total)...");
  • trunk/src/core/net/sf/basedb/util/IntensityCalculatorUtil.java

    r4020 r4090  
    305305    int maxPosition = 0;
    306306   
    307     int spotsDone = 0; // Number of calculated spots
     307    long spotsDone = 0; // Number of calculated spots
    308308    int totalSpots = 0; // Total number of spots
    309309    int interval = 0; // Interval between reporter to the progress reporter
     
    426426          if (spotsDone % interval == 0)
    427427          {
    428             int percent = 10 + 90 * spotsDone / totalSpots;
     428            int percent = 10 + (int)((90L * spotsDone) / totalSpots);
    429429            progress.display(percent, "Calculating spot intensities ("+spotsDone+" done)...");
    430430          }
  • trunk/src/core/net/sf/basedb/util/parser/FlatFileParser.java

    r4020 r4090  
    4747import net.sf.basedb.core.BaseException;
    4848import net.sf.basedb.core.Config;
     49import net.sf.basedb.util.InputStreamTracker;
    4950
    5051/**
     
    176177
    177178  /**
     179    For keeping track of the number of bytes parsed.
     180  */
     181  private InputStreamTracker tracker;
     182 
     183  /**
    178184    The regular expression for matching a header line.
    179185  */
     
    522528  {
    523529    Charset cs = Charset.forName(charsetName == null ? Config.getCharset() : charsetName);
    524     this.reader = new BufferedReader(new InputStreamReader(in, cs));
     530    this.tracker = new InputStreamTracker(in);
     531    this.reader = new BufferedReader(new InputStreamReader(tracker, cs));
    525532  }
    526533
     
    11161123    correspond to the number of parsed bytes depending on the character
    11171124    set of the file.
     1125    @see #getParsedBytes()
    11181126  */
    11191127  public long getParsedCharacters()
    11201128  {
    11211129    return parsedCharacters;
     1130  }
     1131 
     1132  /**
     1133    Get the number of parsed bytes so far. This value may or may not
     1134    correspond to the number of parsed characters depending on the character
     1135    set of the file.
     1136    @since 2.5.1
     1137    @see #getParsedCharacters()
     1138  */
     1139  public long getParsedBytes()
     1140  {
     1141    return tracker == null ? 0 : tracker.getNumRead();
    11221142  }
    11231143 
  • trunk/src/core/net/sf/basedb/util/zip/TarFilePacker.java

    r3675 r4090  
    9797    if (lastModified > 0) entry.setModTime(lastModified);
    9898    entry.setSize(size);
    99     tar.putNextEntry(entry);
     99    TarUtil.putNextEntry(entry, tar);
    100100    if (!isDirectory) FileUtil.copy(in, tar);
    101101    tar.closeEntry();
  • trunk/src/plugins/core/net/sf/basedb/plugins/AbstractFlatFileImporter.java

    r4078 r4090  
    542542        if (section != null && section.type() == FlatFileParser.LineType.SECTION)
    543543        {
    544           if (progress != null) progress.display(getProgress(ffp.getParsedCharacters()), "Parsing section "+section.name()+"...");
     544          if (progress != null) progress.display(getProgress(ffp), "Parsing section "+section.name()+"...");
    545545          try
    546546          {
     
    571571        else
    572572        {
    573           if (progress != null) progress.display(getProgress(ffp.getParsedCharacters()), "Parsing headers...");
     573          if (progress != null) progress.display(getProgress(ffp), "Parsing headers...");
    574574        }
    575575        FlatFileParser.LineType result = ffp.parseHeaders();
     
    609609            " on line " + (line == null ? "-1" : line.lineNo() + ": " + StringUtil.trimString(line.line(), 20)), t);     
    610610        }
    611         if (progress != null) progress.display(getProgress(ffp.getParsedCharacters()), "Parsing data...");
     611        if (progress != null) progress.display(getProgress(ffp), "Parsing data...");
    612612        int progressLine = 0;
    613613       
     
    640640              if (progress != null)
    641641              {
    642                 progress.display(getProgress(ffp.getParsedCharacters()), "Parsing data... (" + ffp.getParsedLines() + " lines so far)");
     642                progress.display(getProgress(ffp), "Parsing data... (" + ffp.getParsedLines() + " lines so far)");
    643643              }
    644644            }
     
    685685  // -------------------------------------------
    686686
    687   private int getProgress(long parsedCharacters)
    688   {
    689     return (int) (100 * parsedCharacters / fileSize);
     687  private int getProgress(FlatFileParser ffp)
     688  {
     689    return (int) (100 * ffp.getParsedBytes() / fileSize);
    690690  }
    691691
  • trunk/src/plugins/core/net/sf/basedb/plugins/Base1PluginExecuter.java

    r4084 r4090  
    18061806        case STRING:
    18071807        {
    1808           StringParameterType t = new StringParameterType(255, defaultValue, false, 1, new Integer(options), 1);
     1808          StringParameterType t = new StringParameterType(65535, defaultValue, false, 1, new Integer(options), 1);
    18091809          parameter = new PluginParameter<String>(name, commonName, "", t);
    18101810          break;
     
    18271827        case HIDDEN_STRING:
    18281828        {
    1829           StringParameterType t = new StringParameterType(255, defaultValue, false, 1, 0, 1);
     1829          StringParameterType t = new StringParameterType(65535, defaultValue, false, 1, 0, 1);
    18301830          parameter = new PluginParameter<String>(name, null, "", t);
    18311831          break;
     
    18551855            enums.add(at.getName(), at.getName());
    18561856          }
    1857           StringParameterType t = new StringParameterType(255, null, false, 1, Values.getInt(options, 30), 1, enums);
     1857          StringParameterType t = new StringParameterType(65535, null, false, 1, Values.getInt(options, 30), 1, enums);
    18581858          parameter = new PluginParameter<String>(name, commonName, "", t);
    18591859          break;
     
    18611861        case ENUMERATION:
    18621862        {
    1863           StringParameterType t = new StringParameterType(255, defaultValue, false, 1, Values.getInt(options, 30), 1, enumOptions);
     1863          StringParameterType t = new StringParameterType(65535, defaultValue, false, 1, Values.getInt(options, 30), 1, enumOptions);
    18641864          parameter = new PluginParameter<String>(name, commonName, "", t);
    18651865          break;
  • trunk/src/plugins/core/net/sf/basedb/plugins/BioAssaySetExporter.java

    r4044 r4090  
    685685    int nof_reporters=bioassayset.getNumReporters();
    686686    int progress_report_interval=nof_reporters/10;
    687     int nof_processed_reporters=0;
     687    long nof_processed_reporters=0;
    688688    while (spotData.hasNext())
    689689    {
    690690      if (progress != null && (nof_processed_reporters%progress_report_interval == 0))
    691691      {
    692         progress.display(100 * nof_processed_reporters / nof_reporters,
     692        progress.display((int)(100L * nof_processed_reporters / nof_reporters),
    693693                         "Exporting ... " + nof_processed_reporters + " of " +
    694694                         nof_reporters + " done.");
     
    781781    int nof_spots=bioassayset.getNumSpots();
    782782    int progress_spot_interval=nof_spots/10;
    783     int nof_processed_spots=0;
     783    long nof_processed_spots=0;
    784784    while (spotData.hasNext())
    785785    {
     
    791791          (nof_processed_spots%progress_spot_interval == 0))
    792792        {
    793           progress.display(100 * nof_processed_spots / nof_spots,
     793          progress.display((int)(100L * nof_processed_spots / nof_spots),
    794794                           "Exporting ..." + nof_processed_spots + " of " +
    795795                           nof_spots + " done.");
  • trunk/src/plugins/core/net/sf/basedb/plugins/LowessNormalization.java

    r4078 r4090  
    408408    query.restrict(intensityRestriction);
    409409    long numSpots = query.count(dc);
    410     int normalizedSpots = 0;
     410    long normalizedSpots = 0;
    411411    if (progress != null) progress.display((int)(normalizedSpots / numSpots * 100), normalizedSpots + " spots normalized");
    412412   
     
    504504            }
    505505            normalizedSpots += smoothCurve.size();
    506             if (progress != null) progress.display((int)((normalizedSpots * 100) / numSpots), normalizedSpots + " spots normalized");
     506            if (progress != null) progress.display((int)((normalizedSpots * 100L) / numSpots), normalizedSpots + " spots normalized");
    507507          }
    508508          fromBlock = toBlock + 1;
  • trunk/src/plugins/core/net/sf/basedb/plugins/MedianRatioNormalization.java

    r4040 r4090  
    349349    query.restrict(intensityRestriction);
    350350    long numSpots = query.count(dc);
    351     int normalizedSpots = 0;
     351    long normalizedSpots = 0;
    352352    if (progress != null) progress.display((int)(normalizedSpots / numSpots * 100), normalizedSpots + " spots normalized");
    353353   
     
    441441            }
    442442            normalizedSpots += toIndex - fromIndex;
    443             if (progress != null) progress.display((int)((normalizedSpots * 100) / numSpots), normalizedSpots + " spots normalized");
     443            if (progress != null) progress.display((int)((normalizedSpots * 100L) / numSpots), normalizedSpots + " spots normalized");
    444444          }
    445445          fromBlock = toBlock + 1;
  • trunk/src/plugins/core/net/sf/basedb/plugins/PackedFileExporter.java

    r3857 r4090  
    356356    // Get parameters
    357357    Directory rootDir = (Directory)job.getValue("root");
     358    rootDir = Directory.getById(dc, rootDir.getId());
    358359    List<Integer> files = (List<Integer>)job.getValues("files");       
    359360    List<Integer> directories = (List<Integer>)job.getValues("directories");
  • trunk/src/plugins/core/net/sf/basedb/plugins/TarFileUnpacker.java

    r3675 r4090  
    2424package net.sf.basedb.plugins;
    2525
     26import java.io.BufferedInputStream;
    2627import java.io.IOException;
    2728import java.io.InputStream;
     
    5354import net.sf.basedb.util.Values;
    5455import net.sf.basedb.util.zip.AbstractFileUnpacker;
     56import net.sf.basedb.util.zip.TarUtil;
    5557
    5658/**
     
    138140    if (isGzip)
    139141    {
    140       tarStream = new TarInputStream(new GZIPInputStream(pin));
     142      tarStream = new TarInputStream(new GZIPInputStream(new BufferedInputStream(pin)));
    141143    }
    142144    else if (isBzip)
     
    145147      pin.read();
    146148      pin.read();
    147       tarStream = new TarInputStream(new CBZip2InputStream(pin));
     149      tarStream = new TarInputStream(new CBZip2InputStream(new BufferedInputStream(pin)));
    148150    }
    149151    else
     
    160162    long totalUnpacked = 0;
    161163    int numFiles = 0;
    162    
    163     while ((entry = tarStream.getNextEntry()) != null)
     164    while ((entry = TarUtil.getNextEntry(tarStream)) != null)
    164165    {
    165166      String subPath = entry.getName();
  • trunk/src/test/TestAnalyzePluginUtil.java

    r4083 r4090  
    7272        rba.setName("TestAnalyzePluginUtil"+i);
    7373        rba.setDescription("RawBioAssay created by TestAnalyzePluginUtil. Number of spots should be "+spots);
    74         RawDataBatcher rawDataBatcher = rba.getRawDataBatcher(null);
     74        RawDataBatcher rawDataBatcher = rba.getRawDataBatcher();
    7575        for (int j = 0; parser.hasMoreData() && j < spots; j++)
    7676        {
  • trunk/src/test/TestArrayDesign.java

    r4083 r4090  
    3131import net.sf.basedb.core.Feature;
    3232import net.sf.basedb.core.FeatureBatcher;
    33 import net.sf.basedb.core.FeatureIdentificationMethod;
    3433import net.sf.basedb.core.File;
    3534import net.sf.basedb.core.FileSetMember;
     
    7574    int id3 = test_create(Platform.AFFYMETRIX, true);
    7675    int id4 = test_create(Platform.AFFYMETRIX, false);
    77     int id6 = test_create(Platform.GENERIC, false);
    7876    test_load(id);
    7977    test_list(-1);
     
    8381    test_import_from_file(id2, "data/test.reportermap.import.txt",
    8482      "\"Block\"\\t\"Column\"\\t\"Row\"\\t\"ID\"\\t\"Name\".*", 0, 2, 1, 3);
    85     test_add_features(id, FeatureIdentificationMethod.COORDINATES, 10);
    86     test_add_features(id6, FeatureIdentificationMethod.FEATURE_ID, 10);
     83    test_add_features(id, 10);
    8784
    8885    write_feature_header();
     
    117114    test_delete(id4);
    118115    test_delete(id5);
    119     test_delete(id6);
    120116   
    121117    TestPlate.test_delete_all();
     
    313309  }
    314310
    315   static void test_add_features(int arrayDesignId, FeatureIdentificationMethod fiMethod, int numFeatures)
     311  static void test_add_features(int arrayDesignId, int numFeatures)
    316312  {
    317313    if (arrayDesignId == 0) return;
     
    332328      }
    333329     
    334       FeatureBatcher batcher = ad.getFeatureBatcher(fiMethod);
     330      FeatureBatcher batcher = ad.getFeatureBatcher();
    335331      int block = 1;
    336332      int row = 1;
    337333      int column = 1;
    338       int position = 1;
    339334      ArrayDesignBlock adBlock = ad.addArrayDesignBlock(new BlockInfo(block, (int)Math.ceil(block/4F), ((block-1)%4)+1));
    340335      time = System.currentTimeMillis();
     
    349344        data.setRow(row);
    350345        data.setColumn(column);
    351         data.setPosition(position);
    352         data.setExternalId(reporter.getExternalId() + "." + position);
    353346
    354347        batcher.insert(data);
    355348        row++;
    356         position++;
    357349        if (row == 11)
    358350        {
     
    403395        wells.addAll(plate.getWells().list(dc));
    404396      }
    405       FeatureBatcher batcher = ad.getFeatureBatcher(FeatureIdentificationMethod.COORDINATES);
     397      FeatureBatcher batcher = ad.getFeatureBatcher();
    406398      int block = 1;
    407399      int row = 1;
     
    557549      dc = TestUtil.getDbControl();
    558550      ArrayDesign ad = ArrayDesign.getById(dc, arrayDesignId);
    559       FeatureBatcher featureBatcher = ad.getFeatureBatcher(FeatureIdentificationMethod.COORDINATES);
     551      FeatureBatcher featureBatcher = ad.getFeatureBatcher();
    560552      ReporterBatcher reporterBatcher = ReporterBatcher.getNew(dc);
    561553   
  • trunk/src/test/TestBioAsssaySetExporter.java

    r4083 r4090  
    171171      ReporterData r2 = Reporter.getById(dc, r2Id);
    172172      ReporterData r3 = Reporter.getById(dc, r3Id);
    173       RawDataBatcher rdb = rba.getRawDataBatcher(null);
     173      RawDataBatcher rdb = rba.getRawDataBatcher();
    174174      for (int i=0; i < 4; ++i)
    175175      {
  • trunk/src/test/TestRawBioAssay.java

    r4083 r4090  
    315315      RawDataType rdt = rba.getRawDataType();
    316316      List<RawDataProperty> extraProperties = rdt.getProperties();
    317       RawDataBatcher rdb = rba.getRawDataBatcher(null);
     317      RawDataBatcher rdb = rba.getRawDataBatcher();
    318318      int block = 1;
    319319      int row = 1;
     
    459459      dc = TestUtil.getDbControl();
    460460      RawBioAssay rba = RawBioAssay.getById(dc, rawBioAssayId);
    461       RawDataBatcher rawDataBatcher = rba.getRawDataBatcher(null);
     461      RawDataBatcher rawDataBatcher = rba.getRawDataBatcher();
    462462      ReporterBatcher reporterBatcher = ReporterBatcher.getNew(dc);
    463463   
  • trunk/src/test/net/sf/basedb/test/FileUtil.java

    r4025 r4090  
    2727
    2828import org.apache.tools.bzip2.CBZip2InputStream;
     29
     30import com.ice.tar.TarInputStream;
    2931
    3032import net.sf.basedb.core.DbControl;
     
    6668   
    6769    boolean isBzip = false;
     70    boolean isTar = false;
    6871    if (filename.endsWith(".bz2"))
    6972    {
    7073      isBzip = true;
    7174      filename = filename.substring(0, filename.length()-4);
     75    }
     76    if (filename.endsWith(".tar"))
     77    {
     78      isTar = true;
     79      filename = filename.substring(0, filename.length() - 4);
    7280    }
    7381 
     
    96104          toUpload = new CBZip2InputStream(toUpload);
    97105        }
     106        if (isTar)
     107        {
     108          // Assume that the TAR only contains a single file
     109          TarInputStream tar = new TarInputStream(toUpload);
     110          tar.getNextEntry();
     111          toUpload = tar;
     112        }
    98113        file.upload(toUpload, false, true);
    99114      }
  • trunk/src/test/net/sf/basedb/test/merge/MergeTest.java

    r4083 r4090  
    4242import net.sf.basedb.core.Experiment;
    4343import net.sf.basedb.core.FeatureBatcher;
    44 import net.sf.basedb.core.FeatureIdentificationMethod;
    4544import net.sf.basedb.core.Formula;
    4645import net.sf.basedb.core.ItemParameterType;
     
    201200    TestUtil.write("--Creating features for array design: " + design.getName() + "\n");
    202201    dc.reattachItem(design);
    203     FeatureBatcher batcher = design.getFeatureBatcher(FeatureIdentificationMethod.COORDINATES);
     202    FeatureBatcher batcher = design.getFeatureBatcher();
    204203    ReporterBatcher reporterBatcher = ReporterBatcher.getNew(dc);
    205204    for (int block = 1; block <= 10; block++)
     
    238237    TestUtil.write("--Creating data for raw bioassay: " + rba.getName() + "\n");
    239238    dc.reattachItem(rba);
    240     RawDataBatcher batcher = rba.getRawDataBatcher(null);
     239    RawDataBatcher batcher = rba.getRawDataBatcher();
    241240    for (int block = 1; block <= 10; block++)
    242241    {
     
    253252        rawData.setExtended("ch1FgMean", ch1 + noise);
    254253        rawData.setExtended("ch2FgMean", ch1 * ratio - noise);
    255         batcher.insert(rawData, externalId, null);
     254        batcher.insert(rawData, externalId);
    256255      }
    257256    }
  • trunk/src/test/net/sf/basedb/test/roles/AdminTest.java

    r4025 r4090  
    120120      dc = TestUtil.getDbControl();
    121121      File reporters = FileUtil.uploadFile(dc, "/mouse", "plates_and_reporters.mouse.v4.37k.txt", FileType.PLATE);
    122       File affyReporters = FileUtil.uploadFile(dc, "/affymetrix/annotations", "MG_U74Av2_annot.csv.bz2", FileType.REPORTER);
     122      File affyReporters = FileUtil.uploadFile(dc, "/affymetrix/annotations", "MG_U74Av2_annot.csv.tar.bz2", FileType.REPORTER);
    123123      dc.commit();
    124124     
  • trunk/src/test/net/sf/basedb/test/roles/PowerUserTest.java

    r4025 r4090  
    161161      File plates = FileUtil.uploadFile(dc, "/mouse", "plates_and_reporters.mouse.v4.37k.txt", FileType.PLATE);     
    162162      File printMap = FileUtil.uploadFile(dc, "/mouse", "printmap.mouse.v4.37k.tam", FileType.PRINT_MAP);
    163       File cdfFile = FileUtil.uploadFile(dc, "/affymetrix/cdf", "MG_U74Av2.cdf.bz2", FileType.REPORTER_MAP);
     163      File cdfFile = FileUtil.uploadFile(dc, "/affymetrix/cdf", "MG_U74Av2.cdf.tar.bz2", FileType.REPORTER_MAP);
    164164      dc.commit();
    165165     
  • trunk/src/test/net/sf/basedb/test/roles/UserTest.java

    r4025 r4090  
    142142      File rawData2DyeSwap = FileUtil.uploadFile(dc, "/mouse", "genepix.mouse.v4.37k.24h.dyeswap.gpr", FileType.RAW_DATA);
    143143     
    144       File affy1 = FileUtil.uploadFile(dc, "/affymetrix/E-TEST-1.ebi.ac.uk", "jos1761.cel.bz2", FileType.RAW_DATA);
    145       File affy2 = FileUtil.uploadFile(dc, "/affymetrix/E-TEST-1.ebi.ac.uk", "jos1762.cel.bz2", FileType.RAW_DATA);
    146       File affy3 = FileUtil.uploadFile(dc, "/affymetrix/E-TEST-1.ebi.ac.uk", "jos1763.cel.bz2", FileType.RAW_DATA);
     144      File affy1 = FileUtil.uploadFile(dc, "/affymetrix/E-TEST-1.ebi.ac.uk", "jos1761.cel.tar.bz2", FileType.RAW_DATA);
     145      File affy2 = FileUtil.uploadFile(dc, "/affymetrix/E-TEST-1.ebi.ac.uk", "jos1762.cel.tar.bz2", FileType.RAW_DATA);
     146      File affy3 = FileUtil.uploadFile(dc, "/affymetrix/E-TEST-1.ebi.ac.uk", "jos1763.cel.tar.bz2", FileType.RAW_DATA);
    147147      dc.commit();
    148148     
  • trunk/www/admin/jobagents/view_agent.jsp

    r4070 r4090  
    3838  import="net.sf.basedb.core.JobAgentSettings"
    3939  import="net.sf.basedb.util.jobagent.JobAgentInfo"
    40   import="net.sf.basedb.util.jobagent.JobInfo"
    4140  import="net.sf.basedb.core.User"
    4241  import="net.sf.basedb.core.PermissionDeniedException"
     
    414413
    415414      <%
    416       Set<JobInfo> jobs = agent.getInfo().getJobInfo();
     415      Set<Integer> jobs = agent.getInfo().getJobs();
    417416      if (jobs == null || jobs.size() == 0)
    418417      {
     
    451450          />
    452451          <tbl:columndef
    453             id="slot"
    454             title="Used slot"
    455           />
    456           <tbl:columndef
    457452            id="started"
    458453            title="Started"
     
    471466            <tbl:rows>
    472467            <%
    473             for (JobInfo jobInfo : jobs)
     468            for (int jobId : jobs)
    474469            {
    475470              Job job = null;
     
    477472              try
    478473              {
    479                 job = Job.getById(dc, jobInfo.getJobId());
     474                job = Job.getById(dc, jobId);
    480475              }
    481476              catch (Throwable t)
     
    488483                <tbl:cell column="plugin"><base:propertyvalue item="<%=job%>" property="pluginDefinition"/></tbl:cell>
    489484                <tbl:cell column="started"><%=job == null ? "" : dateFormatter.format(job.getStarted())%></tbl:cell>
    490                 <tbl:cell column="slot"><%=jobInfo.getSlot() == null ? "" : jobInfo.getSlot().toString()%></tbl:cell>
    491485                <tbl:cell column="percentComplete">
    492486                  <%
  • trunk/www/common/annotations/list_annotations.jsp

    r3979 r4090  
    389389      }
    390390      %>
    391       </div>
    392391
    393392  </base:body>
  • trunk/www/lims/arraydesigns/features/index.jsp

    r4083 r4090  
    4646<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
    4747<%!
    48   private static final ItemContext defaultContext = Base.createDefaultContext("position",
    49     "position,externalId,block,row,column,reporter.name,reporter.externalId");
     48  private static final ItemContext defaultContext = Base.createDefaultContext("position", "position,block,row,column,reporter.name,reporter.externalId");
    5049  private static final Item itemType = Item.FEATURE;
    5150%>
  • trunk/www/lims/arraydesigns/features/list_features.jsp

    r4083 r4090  
    3636  import="net.sf.basedb.core.ArrayDesignBlock"
    3737  import="net.sf.basedb.core.Feature"
    38   import="net.sf.basedb.core.FeatureIdentificationMethod"
    3938  import="net.sf.basedb.core.ReporterType"
    4039  import="net.sf.basedb.core.Reporter"
     
    8988  final ArrayDesign design = ArrayDesign.getById(dc, arrayDesignId);
    9089  final boolean isAffy = design.isAffyChip();
    91   final FeatureIdentificationMethod fiMethod = design.getFeatureIdentificationMethod();
    9290  Formatter<Date> dateFormatter = FormatterFactory.getDateTimeFormatter(sc);
    9391 
     
    114112  int numListed = 0;
    115113  %>
    116 <base:page title="<%=title%>">
     114  <base:page title="<%=title%>">
    117115  <base:head scripts="table.js,tabcontrol.js" styles="table.css,headertabcontrol.css,path.css">
    118116    <script language="JavaScript">
     
    212210        filterable="true"
    213211        exportable="true"
    214         show="<%=fiMethod == FeatureIdentificationMethod.EXTERNAL_ID ? "auto" : "always"%>"
    215       />
    216       <tbl:columndef
    217         id="externalId"
    218         property="externalId"
    219         datatype="string"
    220         title="Feature ID"
    221         sortable="true"
    222         filterable="true"
    223         exportable="true"
    224         show="<%=fiMethod == FeatureIdentificationMethod.EXTERNAL_ID ? "always" : "auto"%>"
     212        show="always"
    225213      />
    226214      <tbl:columndef
     
    552540                <tbl:cell column="position"><div class="link" onclick="itemOnClick(event, <%=itemId%>)"
    553541                  title="<%=tooltip%>"><%=item.getPosition()%></div></tbl:cell>
    554                 <tbl:cell column="externalId"><div class="link" onclick="itemOnClick(event, <%=itemId%>)"
    555                   title="<%=tooltip%>"><%=HTML.encodeTags(item.getExternalId())%></div></tbl:cell>
    556542                <tbl:cell column="block"><%=block.getBlockNumber()%></tbl:cell>
    557543                <tbl:cell column="row"><%=item.getRow()%></tbl:cell>
  • trunk/www/lims/arraydesigns/features/view_feature.jsp

    r4083 r4090  
    7979
    8080  final ArrayDesign design = ArrayDesign.getById(dc, arrayDesignId);
    81  
    8281  final boolean isAffy = design.isAffyChip();
    8382  FeatureData feature = design.getFeatureById(itemId);
     
    108107      </tr>
    109108      <tr>
    110         <td class="prompt">Platform / Variant</td>
    111         <td><base:propertyvalue item="<%=design%>" property="platform" /> / <base:propertyvalue item="<%=design%>" property="variant" /></td>
    112       </tr>
    113       <tr>
    114         <td class="prompt">Feature identification method</td>
    115         <td><%=design.getFeatureIdentificationMethod()%></td>
     109        <td class="prompt">Affy chip</td>
     110        <td><%=isAffy ? " yes" : "no"%></td>
    116111      </tr>
    117112      </table>
     
    119114      <h4>Feature / block</h4>
    120115      <table class="form" cellspacing=0>
    121       <tr>
    122         <td class="prompt">Feature ID</td>
    123         <td colspan="7"><%=HTML.encodeTags(feature.getExternalId())%></td>
    124       </tr>
    125116      <tr>
    126117        <td class="prompt">Position</td>
  • trunk/www/lims/arraydesigns/list_designs.jsp

    r4083 r4090  
    4848  import="net.sf.basedb.core.PermissionDeniedException"
    4949  import="net.sf.basedb.core.PluginDefinition"
    50   import="net.sf.basedb.core.FeatureIdentificationMethod"
    5150  import="net.sf.basedb.core.query.Hql"
    5251  import="net.sf.basedb.core.query.Restrictions"
     
    7372  private static final Item itemType = Item.ARRAYDESIGN;
    7473  private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.LIST);
    75   private static final Enumeration<String, String> fiMethods = new Enumeration<String, String>();
    76   static
    77   {
    78     for (FeatureIdentificationMethod fim : FeatureIdentificationMethod.values())
    79     {
    80       fiMethods.add(Integer.toString(fim.getValue()), fim.toString());
    81     }
    82     fiMethods.lock();
    83   }
    8474%>
    8575<%
     
    315305        filterable="true"
    316306        exportable="true"
    317       /> 
    318       <tbl:columndef
    319         id="featureIdentificationMethod"
    320         property="featureIdentificationMethod"
    321         datatype="int"
    322         title="Feature ID meth."
    323         tooltip="Feature identification method"
    324         sortable="true"
    325         filterable="true"
    326         exportable="true"
    327         enumeration="<%=fiMethods%>"
    328307      /> 
    329308      <tbl:columndef
     
    568547                <tbl:cell column="numDbFeatures"><%=item.getNumDbFeatures()%></tbl:cell>
    569548                <tbl:cell column="numFileFeatures"><%=item.getNumFileFeatures()%></tbl:cell>
    570                 <tbl:cell column="featureIdentificationMethod"><%=item.getFeatureIdentificationMethod()%></tbl:cell>
    571549                <tbl:cell column="batches">
    572550                  <%
  • trunk/www/lims/arraydesigns/view_design.jsp

    r4083 r4090  
    303303        <td class="prompt">Features</td>
    304304        <td><%=design.hasFeatures() ? "yes (db: " + design.getNumDbFeatures() + "; file: " + design.getNumFileFeatures() + ")" : "no"%></td>
    305       </tr>
    306       <tr>
    307         <td class="prompt">Feature identification method</td>
    308         <td><%=design.getFeatureIdentificationMethod()%></td>
    309305      </tr>
    310306      <tr>
  • trunk/www/views/experiments/bioassays/list_bioassays.jsp

    r4057 r4090  
    8888ItemResultIterator<BioAssay> bioAssays = null;
    8989ItemResultList<AnnotationType> annotationTypes = null;
    90 ItemResultList<AnnotationType> experimentalFactors = null;
    9190try
    9291{
     
    9493  final BioAssaySet bioAssaySet = BioAssaySet.getById(dc, bioAssaySetId);
    9594  final Experiment experiment = bioAssaySet.getExperiment();
    96   final ItemQuery<AnnotationType> experimentalFactorQuery = experiment.getExperimentalFactors();
    97   experimentalFactorQuery.include(Include.MINE, Include.SHARED, Include.IN_PROJECT, Include.OTHERS);
    9895  final int experimentId = experiment.getId();
    9996  final RawDataType rawDataType = experiment.getRawDataType();
     
    111108  Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext);
    112109  annotationTypes = annotationTypeQuery.list(dc);
    113   experimentalFactors = experimentalFactorQuery.list(dc);
    114110  try
    115111  {
    116112    final ItemQuery<BioAssay> query = Base.getConfiguredQuery(cc, true, bioAssaySet.getBioAssays(), mode);
    117     query.join(Hql.leftJoin("rawParents", "rba"));
    118113    bioAssays = query.iterate(dc);
    119114  }
    120115  catch (Throwable t)
    121116  {
    122     t.printStackTrace();
    123117    cc.setMessage(t.getMessage());
    124118  }
    125119  int numListed = 0;
    126120  %>
    127   <%@page import="net.sf.basedb.util.BioAssaySetUtil"%>
    128 <base:page title="<%=title%>" type="<%=mode.getPageType()%>">
     121  <base:page title="<%=title%>" type="<%=mode.getPageType()%>">
    129122  <base:head scripts="table.js,tabcontrol.js" styles="table.css,headertabcontrol.css,path.css">
    130123    <script language="JavaScript">
     
    299292          title="<%=HTML.encodeTags(at.getName())+" [A]"%>"
    300293          property="<%="#"+at.getId()%>"
    301           annotation="true"
    302           datatype="<%=at.getValueType().getStringValue()%>"
    303           enumeration="<%=annotationEnum%>"
    304           sortable="false"
    305           filterable="true"
    306           exportable="true"
    307           formatter="<%=formatter%>"
    308         />
    309         <%
    310       }
    311       %>
    312       <%
    313       for (AnnotationType at : experimentalFactors)
    314       {
    315         Enumeration<String, String> annotationEnum = null;
    316         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    317         if (at.isEnumeration())
    318         {
    319           annotationEnum = new Enumeration<String, String>();
    320           List<?> values = at.getValues();
    321           for (Object value : values)
    322           {
    323             String encoded = formatter.format(value);
    324             annotationEnum.add(encoded, encoded);
    325           }
    326         }
    327         %>
    328         <tbl:columndef
    329           id="<%="ef"+at.getId()%>"
    330           title="<%=HTML.encodeTags(at.getName())+" [EF]"%>"
    331           property="<%="$rba.##"+at.getId()%>"
    332294          annotation="true"
    333295          datatype="<%=at.getValueType().getStringValue()%>"
     
    522484                  }
    523485                }
    524                 for (AnnotationType at : experimentalFactors)
    525                 {
    526                   %>
    527                   <tbl:cell column="<%="ef"+at.getId()%>"
    528                     ><tbl:cellvalue
    529                     list="<%=BioAssaySetUtil.getAnnotationValues(dc, item, at)%>"
    530                   /></tbl:cell>
    531                   <%
    532                 }               
    533486                %>
    534487                <tbl:cell column="tools">
  • trunk/www/views/experiments/bioassays/view_bioassay.jsp

    r4057 r4090  
    3636  import="net.sf.basedb.core.BioAssay"
    3737  import="net.sf.basedb.core.RawBioAssay"
    38   import="net.sf.basedb.core.Annotatable"
    39   import="net.sf.basedb.core.AnnotationSet"
    40   import="net.sf.basedb.core.AnnotationType"
    41   import="net.sf.basedb.core.Annotation"
    4238  import="net.sf.basedb.core.ItemQuery"
    4339  import="net.sf.basedb.core.ItemResultList"
     
    4945  import="net.sf.basedb.core.query.Orders"
    5046  import="net.sf.basedb.core.query.Hql"
    51   import="net.sf.basedb.util.formatter.Formatter"
    52   import="net.sf.basedb.clients.web.formatter.FormatterFactory"
    5347  import="net.sf.basedb.clients.web.Base"
    5448  import="net.sf.basedb.clients.web.PermissionUtil"
     
    5650  import="net.sf.basedb.util.Values"
    5751  import="java.util.Map"
    58   import="java.util.List"
    59   import="java.util.HashMap"
    60   import="java.util.LinkedList"
    6152%>
    6253<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
     
    223214          title="Description"
    224215        />
    225         <%
    226         ItemQuery<AnnotationType> efQuery = experiment.getExperimentalFactors();
    227         efQuery.include(Include.ALL);
    228         efQuery.order(Orders.asc(Hql.property("name")));
    229         ItemResultList<AnnotationType> experimentalFactors = efQuery.list(dc);
    230         for (AnnotationType at : experimentalFactors)
    231         {
    232           Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    233           %>
    234           <tbl:columndef
    235             id="<%="at"+at.getId()%>"
    236             title="<%=HTML.encodeTags(at.getName())%>"
    237             formatter="<%=formatter%>"
    238           />
    239           <%
    240         }
    241         %>
    242216        <tbl:data>
    243217          <tbl:columns>
     
    252226              <tbl:cell column="spots"><%=item.getSpots()%></tbl:cell>
    253227              <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell>
    254               <%
    255               AnnotationSet as = item.isAnnotated() ? item.getAnnotationSet() : null;
    256               for (AnnotationType at : experimentalFactors)
    257               {
    258                 String value = "<i>- none -</i>";
    259                 List<Annotation> all = as == null ? null : as.findAnnotations(dc, at, true);
    260                 Map<Annotatable, List> factorValues = new HashMap<Annotatable, List>();
    261                 if (all != null && all.size() > 0)
    262                 {
    263                   for (Annotation a : all)
    264                   {
    265                     List values = a.getValues();
    266                     Annotatable aItem = null;
    267                     try
    268                     {
    269                       aItem = a.getAnnotationSet().getItem();
    270                     }
    271                     catch (Throwable t)
    272                     {}
    273                     List toAdd = factorValues.get(aItem);
    274                     if (toAdd == null)
    275                     {
    276                       toAdd = new LinkedList();
    277                       factorValues.put(aItem, toAdd);
    278                     }
    279                     toAdd.addAll(values);
    280                   }
    281                 }
    282                 %>
    283                 <tbl:cell column="<%="at"+at.getId()%>"
    284                   >
    285                   <%
    286                   for (Map.Entry<Annotatable, List> entry : factorValues.entrySet())
    287                   {
    288                     Annotatable aItem = entry.getKey();
    289                     List values = entry.getValue();
    290                     %>
    291                     <tbl:cellvalue list="<%=values%>" />
    292                     <%
    293                     if (aItem != null && aItem.hasPermission(Permission.WRITE))
    294                     {
    295                       %>: <base:icon image="edit.gif"
    296                         onclick="<%="editInheritedAnnotation('"+aItem.getType().name()+"',"+aItem.getId()+","+at.getId()+")"%>"
    297                         tooltip="Modify the values of this experimental factor" />
    298                       <%
    299                     }
    300                   }
    301                   %>
    302                 </tbl:cell>
    303                 <%
    304               }
    305               %>
    306228            </tbl:row>
    307229            <%
  • trunk/www/views/experiments/bioassaysets/view_bioassayset.jsp

    r3679 r4090  
    174174      }
    175175    }
    176     function changeImage(imageId, url)
    177     {
     176    function runItemPlugin(cmd)
     177    {
     178      Main.openPopup('index.jsp?ID=<%=ID%>&cmd='+cmd+'&experiment_id=<%=experimentId%>&item_id=<%=itemId%>', 'RunPlugin'+cmd, 740, 540);
     179    }
     180    var imageQueue = new Array();
     181    var nextImage = 0;
     182    function addImage(imageId, url)
     183    {
     184      imageQueue[imageQueue.length] = imageId;
    178185      var img = document.getElementById(imageId);
    179       img.src = url;
    180     }
    181     function runItemPlugin(cmd)
    182     {
    183       Main.openPopup('index.jsp?ID=<%=ID%>&cmd='+cmd+'&experiment_id=<%=experimentId%>&item_id=<%=itemId%>', 'RunPlugin'+cmd, 740, 540);
     186      img.realSrc = url;
     187    }
     188    function imageLoaded()
     189    {
     190      nextImage++;
     191      prepareNextImage();
     192    }
     193    function prepareNextImage()
     194    {
     195      if (imageQueue.length > nextImage)
     196      {
     197        var imageId = imageQueue[nextImage];
     198        var img = document.getElementById(imageId);
     199        img.src = '../../../images/plot_generating_400x300.gif';
     200        setTimeout('loadNextImage()', 100);
     201      }
     202    }
     203    function loadNextImage()
     204    {
     205      if (imageQueue.length > nextImage)
     206      {
     207        var imageId = imageQueue[nextImage];
     208        var img = document.getElementById(imageId);
     209        img.onload = imageLoaded;
     210        img.src = img.realSrc;
     211      }
    184212    }
    185213    </script>
     214    <style>
     215    .plot {
     216      border: 1px solid #666666;
     217      background-image: url('../../../images/plot_empty_400x300.png');
     218    }
     219    </style>
    186220  </base:head>
    187   <base:body>
     221  <base:body onload="loadNextImage()">
    188222    <p>
    189223    <p:path>
     
    481515        ItemQuery<BioAssay> bioAssayQuery = bioAssaySet.getBioAssays();
    482516        bioAssayQuery.order(Orders.asc(Hql.property("name")));
     517        StringBuilder script = new StringBuilder();
    483518        for (BioAssay bioAssay : bioAssayQuery.list(dc))
    484519        {
     
    488523          url += "&filter="+filter;
    489524          url += "&title="+HTML.urlEncode(bioAssay.getName());
     525          script.append("addImage('MA").append(bioAssay.getId()).append("','").
     526              append(url).append("');\n");
    490527          %>
    491528          <img id="MA<%=bioAssay.getId()%>"
    492             src="../../../images/plot_generating_400x300.gif"
    493             width="400" height="300" 
     529            src="../../../images/transparent_pixel.gif"
     530            width="400" height="300"
    494531            alt="MA-plot for bioassay <%=HTML.encodeTags(bioAssay.getName())%>"
    495             style="border: 1px solid #666666;">
    496           <script language="JavaScript">
    497           setTimeout("changeImage('MA<%=bioAssay.getId()%>', '<%=url%>')", 100);
    498           </script>
     532            class="plot"
     533            >
    499534          <%
    500535        }
     536        %>
     537        <script language="JavaScript">
     538        <%=script%>
     539        </script>
     540        <%
    501541      }
    502542      %>
     
    513553        String xLabel = HTML.urlEncode("A, log10(ch1 * ch2) / 2");
    514554        String yLabel = HTML.urlEncode("M, log2(ch1 / ch2)");
     555        StringBuilder script = new StringBuilder();
    515556        for (BioAssay bioAssay : bioAssayQuery.list(dc))
    516557        {
     
    519560          url += "&xLabel="+xLabel+"&yLabel="+yLabel;
    520561          url += "&title="+HTML.urlEncode(bioAssay.getName());
     562          script.append("addImage('CF").append(bioAssay.getId()).append("','").
     563          append(url).append("');\n");
    521564          %>
    522565          <img id="CF<%=bioAssay.getId()%>"
    523             src="../../../images/plot_generating_400x300.gif"
    524             width="400" height="300" 
     566            src="../../../images/transparent_pixel.gif"
     567            width="400" height="300"
    525568            alt="Correction factor plot for bioassay <%=HTML.encodeTags(bioAssay.getName())%>"
    526             style="border: 1px solid #666666;">
    527           <script language="JavaScript">
    528           setTimeout("changeImage('CF<%=bioAssay.getId()%>', '<%=url%>')", 100);
    529           </script>
     569            class="plot"
     570            >
    530571          <%
    531572        }
     573        %>
     574        <script language="JavaScript">
     575        <%=script%>
     576        </script>
     577        <%
    532578      }
    533579      %>
  • trunk/www/views/jobs/index.jsp

    r4074 r4090  
    3939  import="net.sf.basedb.core.PermissionDeniedException"
    4040  import="net.sf.basedb.core.ItemAlreadyExistsException"
    41   import="net.sf.basedb.core.signal.SignalTransporter"
    42   import="net.sf.basedb.core.signal.Signal"
    4341  import="net.sf.basedb.util.RemovableUtil"
    4442  import="net.sf.basedb.util.ShareableUtil"
     
    240238    redirect = viewPage;
    241239  }
    242   else if ("AbortJob".equals(cmd))
    243   {
    244     ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    245     dc = sc.newDbControl();
    246     Job job = Job.getById(dc, cc.getId());
    247     if (job.getStatus() == Job.Status.WAITING)
    248     {
    249       job.doneError("Aborted by user");
    250     }
    251     else
    252     {
    253       SignalTransporter signalTransporter = job.getSignalTransporter();
    254       if (signalTransporter != null) signalTransporter.send(Signal.ABORT);
    255     }
    256     dc.commit();
    257     Thread.sleep(500);
    258     redirect = viewPage;
    259   }
    260240  else
    261241  {
  • trunk/www/views/jobs/view_job.jsp

    r4078 r4090  
    4747  import="net.sf.basedb.core.plugin.GuiContext"
    4848  import="net.sf.basedb.core.plugin.Plugin"
    49   import="net.sf.basedb.core.signal.SignalTransporter"
    50   import="net.sf.basedb.core.signal.Signal"
    5149  import="net.sf.basedb.clients.web.Base"
    5250  import="net.sf.basedb.clients.web.util.HTML"
     
    5957  import="java.util.List"
    6058  import="java.util.Collections"
    61   import="java.util.Collection"
    6259%>
    6360<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
     
    106103  Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
    107104  Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc);
    108  
    109   // Check if the plug-in supports the "Abort" signal
    110   boolean supportsAbort = status == Job.Status.WAITING && writePermission;
    111   if (status == Job.Status.EXECUTING && writePermission)
    112   {
    113     try
    114     {
    115       SignalTransporter signalTransporter = job.getSignalTransporter();
    116       Collection<Signal> supportedSignals = signalTransporter != null ?
    117         signalTransporter.getSupportedSignals() : null;
    118       supportsAbort = signalTransporter != null &&
    119         (supportedSignals == null || supportedSignals.contains(Signal.ABORT));
    120     }
    121     catch (Exception ex)
    122     {}
    123   }
    124105  %>
    125106
     
    133114    {
    134115      setTimeout('location.reload()', 10000);
    135     }
    136   }
    137   function abortJob()
    138   {
    139     if (confirm('Are you sure? This action may not be undone'))
    140     {
    141       location.href = 'index.jsp?ID=<%=ID%>&cmd=AbortJob&item_id=<%=itemId%>';
    142116    }
    143117  }
     
    173147  </base:head>
    174148  <base:body onload="autoUpdate()">
     149   
    175150    <h3 class="docked"><%=title%> <base:help tabcontrol="main" /></h3>
    176151    <t:tabcontrol id="main" active="<%=tab%>" position="bottom" contentstyle="<%="height: "+(int)(scale*320)+"px;"%>">
     
    314289      </table>
    315290      </t:tab>
     291     
    316292      <%
    317293      if (job.getStackTrace() != null)
     
    498474      %>
    499475      <%
    500       if (supportsAbort)
    501       {
    502         %>
    503         <base:button onclick="abortJob()" title="Abort&hellip;" image="abort.png" />
    504         <%
    505       }
    506       %>
    507       <%
    508476      if (job.getStatus() == Job.Status.ERROR && job.getJobType() == Job.Type.RUN_PLUGIN)
    509477      {
  • trunk/www/views/rawbioassays/edit_rawbioassay.jsp

    r4083 r4090  
    509509    {
    510510      parentsChanged = true;
    511       <%
    512       if (rawBioAssay != null && rawBioAssay.getNumDbSpots() > 0)
    513       {
    514         %>
    515         var frm = document.forms['rawbioassay'];
    516         var selectedId = frm.arraydesign_id[frm.arraydesign_id.selectedIndex].value;
    517         var showFiMethod = (selectedId > 0 && selectedId != <%=currentArrayDesign == null ? 0 : currentArrayDesign.getId()%>);
    518         if (showFiMethod)
    519         {
    520           Main.show('fiMethod');
    521         }
    522         else
    523         {
    524           Main.hide('fiMethod');
    525         }
    526         <%
    527       }
    528       %>
    529511    }
    530512    function selectArrayDesignOnClick()
     
    553535      list.selectedIndex = 1;
    554536      parentsChanged = true;
    555       arrayDesignOnChange();
    556537    }
    557538   
     
    672653        </td>
    673654      </tr>
    674       <tr id="fiMethod" style="display: none;">
    675         <td></td>
    676         <td>
    677         <select name="fiMethod">
    678         <option value="">-auto- (array design decides)
    679         <option value="COORDINATES">Coordinates
    680         <option value="POSITION">Position
    681         <option value="FEATURE_ID">Feature ID (*)
    682         </select>
    683         <br>
    684         Select a method for feature identification. <br>
    685         (*) The Feature ID method only works if the raw data is currently
    686         connected to an array design which has Feature ID values.
    687         </td>
    688       </tr>
     655
    689656      <tr>
    690657        <td class="prompt">Protocol</td>
  • trunk/www/views/rawbioassays/index.jsp

    r4083 r4090  
    1 <%@page import="net.sf.basedb.core.FeatureIdentificationMethod"%>
    21<%-- $Id$
    32  ------------------------------------------------------------------
     
    9190    private final int arrayDesignId;
    9291    private final SessionControl sc;
    93     private final FeatureIdentificationMethod fiMethod;
    94    
    95     private UpdateArrayDesign(Job job, RawBioAssay rba, ArrayDesign design, FeatureIdentificationMethod fiMethod)
     92   
     93    private UpdateArrayDesign(Job job, RawBioAssay rba, ArrayDesign design)
    9694    {
    9795      this.jobId = job.getId();
     
    9997      this.arrayDesignId = design.getId();
    10098      this.sc = job.getSessionControl();
    101       this.fiMethod = fiMethod;
    10299    }
    103100   
     
    116113        try
    117114        {
    118           rba.updateArrayDesign(design, fiMethod, progress);
     115          rba.updateArrayDesign(design, progress);
    119116          progress.display(99, "Committing changes to database...");
    120117          dc.commit();
     
    127124        catch (Throwable t)
    128125        {
    129           if (dc != null) dc.close();
    130126          dc = sc.newDbControl();
    131127          j = Job.getById(dc, jobId);
     
    288284    Job job = null;
    289285    ArrayDesign ad = null;
    290     FeatureIdentificationMethod fiMethod = null;
    291286    int arrayDesignId = Values.getInt(request.getParameter("arraydesign_id"), -1);
    292287    if (arrayDesignId >= 0) // < 0 = denied or unchanged
     
    295290      if (rba.hasData())
    296291      {
    297         try
    298         {
    299           fiMethod = FeatureIdentificationMethod.valueOf(request.getParameter("fiMethod"));
    300         }
    301         catch (Exception ex)
    302         {}
    303292        if (rba.getRawDataType().isStoredInDb() && ad != null && ad.hasFeatures())
    304293        {
     
    312301        else
    313302        {
    314           rba.updateArrayDesign(ad, fiMethod, null);
     303          rba.updateArrayDesign(ad, null);
    315304        }
    316305      }
     
    334323    {
    335324      redirect = "../jobs/index.jsp?ID="+ID+"&cmd=ViewItem&item_id="+job.getId();
    336       Thread updateThread = new Thread(new UpdateArrayDesign(job, rba, ad, fiMethod));
     325      Thread updateThread = new Thread(new UpdateArrayDesign(job, rba, ad));
    337326      updateThread.setPriority(Thread.currentThread().getPriority() - 1);
    338327      updateThread.start();
  • trunk/www/views/rawbioassays/rawdata/list_rawdata.jsp

    r4083 r4090  
    9595
    9696  final DataQuery<RawData> query = rawBioAssay.getRawData();
    97   query.join(Hql.leftJoin(null, "reporter", "r", null, true));
    98   query.join(Hql.leftJoin(null, "feature", "f", null, true));
    99   query.join(Hql.leftJoin("f", "arrayDesignBlock", "b", null, true));
    10097  cc.configureQuery(query, true);
    10198  if (!"row".equals(cc.getSortProperty())) query.order(Orders.asc(Hql.property("row")));
     
    400397        datatype="int"
    401398        title="[Feat] Position"
    402         sortable="true"
    403         filterable="true"
    404         exportable="true"
    405       />
    406       <tbl:columndef
    407         id="feature.externalId"
    408         property="feature.externalId"
    409         datatype="string"
    410         title="[Feat] Feature ID"
    411399        sortable="true"
    412400        filterable="true"
     
    716704                  %>
    717705                  <tbl:cell column="feature.position"><i>- none -</i></tbl:cell>
    718                   <tbl:cell column="feature.externalId"><i>- none -</i></tbl:cell>
    719706                  <tbl:cell column="feature.row"><i>- none -</i></tbl:cell>
    720707                  <tbl:cell column="feature.column"><i>- none -</i></tbl:cell>
     
    734721                  %>
    735722                  <tbl:cell column="feature.position"><%=feature.getPosition()%></tbl:cell>
    736                   <tbl:cell column="feature.externalId"><%=HTML.encodeTags(feature.getExternalId())%></tbl:cell>
    737723                  <tbl:cell column="feature.row"><%=feature.getRow()%></tbl:cell>
    738724                  <tbl:cell column="feature.column"><%=feature.getColumn()%></tbl:cell>
  • trunk/www/views/reporters/index.jsp

    r4076 r4090  
    4242  import="net.sf.basedb.core.PermissionDeniedException"
    4343  import="net.sf.basedb.core.BaseException"
    44   import="net.sf.basedb.core.User"
    4544  import="net.sf.basedb.util.RemovableUtil"
    4645  import="net.sf.basedb.util.ShareableUtil"
  • trunk/www/views/reporters/list_reporters.jsp

    r4076 r4090  
    243243        exportable="true"
    244244        formatter="<%=timeFormatter%>"
    245       />
    246       <tbl:columndef
    247         id="lastSource"
    248         property="lastSource"
    249         datatype="string"
    250         title="Last source"
    251         sortable="true"
    252         filterable="true"
    253         exportable="true"
    254245      />
    255246      <%
     
    433424                <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell>
    434425                <tbl:cell column="lastUpdate" value="<%=item.getLastUpdate()%>" />
    435                 <tbl:cell column="lastSource"><%=HTML.encodeTags(item.getLastSource())%></tbl:cell>
    436426                <tbl:cell column="reporterType"
    437427                  ><base:propertyvalue
  • trunk/www/views/reporters/view_reporter.jsp

    r4076 r4090  
    191191        <td><%=dateFormatter.format(reporter.getLastUpdate())%></td>
    192192      </tr>
    193       <tr>
    194         <td class="prompt">Last source</td>
    195         <td><%=HTML.niceFormat(reporter.getLastSource())%></td>
    196       </tr>
    197193      </table>
    198194     
Note: See TracChangeset for help on using the changeset viewer.