View Javadoc

1   /*
2    *                Doelan development code
3    *
4    * This code may be freely distributed and modified under the
5    * terms of the GNU General Public Licence.  This should
6    * be distributed with the code. If you do not have a copy,
7    * see:
8    *
9    *      http://www.gnu.org/copyleft/gpl.txt
10   *
11   * Copyright (c) 2004-2005 ENS Microarray Platform
12   * Copyright for this code is held jointly by the individual
13   * authors.  These should be listed in @author doc comments.
14   *
15   * For more information on the Doelan project and its aims,
16   * or to join the Doelan mailing list, visit the home page
17   * at:
18   *
19   *      http://www.transcriptome.ens.fr/doelan
20   */
21  
22  package fr.ens.transcriptome.doelan.tests;
23  
24  import fr.ens.transcriptome.doelan.Defaults;
25  import fr.ens.transcriptome.doelan.DoelanRegistery;
26  import fr.ens.transcriptome.nividic.om.BioAssay;
27  import fr.ens.transcriptome.nividic.platform.PlatformException;
28  import fr.ens.transcriptome.nividic.platform.module.AboutModule;
29  import fr.ens.transcriptome.nividic.platform.module.Module;
30  import fr.ens.transcriptome.nividic.platform.module.ModuleDescription;
31  import fr.ens.transcriptome.nividic.util.SystemUtils;
32  
33  /***
34   * This class defines a test for not found spot flag.
35   * @author Laurent Jourdren
36   */
37  public class BadFeatureTest extends FeatureFlagTest implements Module {
38  
39    /*** Default value of the threshold. */
40    private static final double DEFAULT_THRESHOLD = 5.0;
41    private static AboutModule aboutModule;
42  
43    /***
44     * Get the description of the module.
45     * @return The description of the module
46     */
47    public AboutModule aboutModule() {
48  
49      if (aboutModule == null) {
50  
51        ModuleDescription md = null;
52        try {
53          md = new ModuleDescription("BadFeatureTest",
54              "Test for bad feature flag (Flag=-100)");
55          md.setWebsite(DoelanRegistery.getAppURL());
56          md.setHTMLDocumentation(SystemUtils.readTextRessource("/files/test-"
57              + SystemUtils.getClassShortName(this.getClass()) + ".html"));
58          md.setStability(AboutModule.STATE_STABLE);
59          md.setVersion(Defaults.DEFAULT_TEST_VERSION);
60        } catch (PlatformException e) {
61          getLogger().error("Unable to create the module description");
62        }
63        aboutModule = md;
64      }
65  
66      return aboutModule;
67    }
68  
69    protected int getFlagFilterValue() {
70      return BioAssay.FLAG_BAD;
71    }
72  
73    protected String getFlagFilerType() {
74      return "Bad";
75    }
76  
77    protected double getDefaultThreshold() {
78      return DEFAULT_THRESHOLD;
79    }
80  
81    //
82    // Constructor
83    //
84  
85    /***
86     * Public constructor.
87     * @throws PlatformException If the name or the version of the element is
88     *                 <b>null </b>.
89     */
90    public BadFeatureTest() throws PlatformException {
91      // MUST BE EMPTY
92    }
93  }