Changeset 3731


Ignore:
Timestamp:
Sep 14, 2007, 10:59:20 AM (15 years ago)
Author:
Johan Enell
Message:

Fixes #731

Added mapping for all hard coded data. Corrected some spelling errors (found a new function in eclipse :) )

Location:
branches/2.4-stable/src/plugins/core/net/sf/basedb/plugins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.4-stable/src/plugins/core/net/sf/basedb/plugins/Base1PluginExecuter.java

    r3729 r3731  
    4444import net.sf.basedb.core.Include;
    4545import net.sf.basedb.core.IntegerParameterType;
    46 import net.sf.basedb.core.InvalidDataException;
    4746import net.sf.basedb.core.Item;
    4847import net.sf.basedb.core.ItemNotFoundException;
     
    109108import java.util.Set;
    110109import java.util.TreeMap;
    111 import java.util.regex.Matcher;
    112110import java.util.regex.Pattern;
    113111
     
    138136 
    139137  /**
    140     The plug-ing permissions.
     138    The plug-in permissions.
    141139  */
    142140  private static final Set<Permissions> permissions = new HashSet<Permissions>();
     
    207205 
    208206  /**
    209     The reporter fields that should be exported as a tab separeated string
     207    The reporter fields that should be exported as a tab separated string
    210208    of column headers.
    211209  */
     
    214212  /**
    215213    The spot fields that should be exported as a tab separated string of
    216     column headres.
     214    column headers.
    217215  */
    218216  private PluginParameter<String> usedFieldsParameter;
     
    265263  private int pluginDirectoryId = -1;
    266264
    267   /* From InteractivePlugin iterface*/
     265  /* From InteractivePlugin interface*/
    268266
    269267  /**
     
    273271    @param context The context from where the plugin is invoked.
    274272    @param item The item that should be checked if it is in context.
    275     @return null if the the item is in context, otherwise an error messge.
     273    @return null if the the item is in context, otherwise an error message.
    276274    @see net.sf.basedb.core.plugin.AbstractAnalysisPlugin#isInContext(net.sf.basedb.core.plugin.GuiContext, java.lang.Object)
    277275  */
     
    407405        storeValue(configuration, request, usedFieldsParameter);
    408406        storeValue(configuration, request, jobParametersParameter);
    409         // test the xml in the jobParameters parameres
     407        // test the xml in the jobParameters parameters
    410408        try
    411409        {
     
    448446 
    449447  /**
    450     Copies the content from a File to a directory on the filesystem.
     448    Copies the content from a File to a directory on the file system.
    451449   
    452450    @param f The file to be copied.
     
    483481        // Load existing...
    484482        jobDirectory = Directory.getByPath(dc, path);
    485         // ...and remove files and subdirectories in it
     483        // ...and remove files and sub directories in it
    486484        emptyDir(dc, path);
    487485      }
     
    503501 
    504502  /**
    505     Deletes all files and subdirectories under dir.
     503    Deletes all files and sub directories under dir.
    506504   
    507505    @param dir
    508     @return Returnes true if all deletions were succssful
     506    @return true if all deletions were successful
    509507  */
    510508  private boolean deleteDir(java.io.File dir)
     
    527525 
    528526  /**
    529     Deletes all files and subdirectories under dir. The directory given
     527    Deletes all files and sub directories under dir. The directory given
    530528    itself is not deleted.
    531529   
    532530    @param dc
    533531    @param dir
    534     @return Returnes true if all deletions were succssful
     532    @return true if all deletions were successful
    535533  */
    536534  private boolean emptyDir(DbControl dc, Path dir)
     
    846844    Map<String, String> names = new HashMap<String, String>();
    847845   
    848     names.put("reporter", "rep.id");
    849     names.put("reporterId", "rep.externalId");
    850    
    851846    ItemQuery<Formula> queryFormula = Formula.getQuery(Formula.Type.COLUMN_EXPRESSION,
    852847      bas.getRawDataType());
     
    857852      names.put(f.getName(), "frm."+f.getId());
    858853    }
     854   
     855    names.put("lastUpdate", "rep.lastUpdate");
     856    names.put("geneName", "rep.name");
     857    names.put("position", "rep.position");
     858    names.put("reporter", "rep.id");
     859    names.put("reporterId", "rep.externalId");
     860    names.put("geneSymbol", "rep.symbol");
     861   
     862    names.put("rawPosition", "raw.position");
     863    names.put("block", "raw.block");
     864    names.put("numCol", "raw.col");
     865    names.put("numRow", "raw.row");
     866    names.put("x", "raw.x");
     867    names.put("y", "raw.y");
    859868   
    860869    for (ExtraValue ev : bas.getExtraValues().list(dc))
     
    11641173 
    11651174  /**
    1166     Get the exec directory as a java.io.File. The exec directory is a sudirectory in
     1175    Get the exec directory as a java.io.File. The exec directory is a sub directory in
    11671176    "java.io.tmpdir".
    11681177   
     
    12901299   
    12911300    @return The id of the transformation the data is connected to.
    1292     @throws IOException if there is any error reading from stdou.txt
     1301    @throws IOException if there is any error reading from stdout.txt
    12931302  */
    12941303  private int importData(DbControl dc, File stdout, Transformation t)
     
    15001509//              {
    15011510//                if (!posMap.get(position).equals(reporter))
    1502 //                  throw new BaseException("Invalid data. Position, "+position+", occures twice with different reporter data.");
     1511//                  throw new BaseException("Invalid data. Position, "+position+", occurs twice with different reporter data.");
    15031512//               
    15041513//              }
     
    16061615 
    16071616  /**
    1608     This thread read everything from one input streat ant writes everything to an output stream.
     1617    This thread read everything from one input stream ant writes everything to an output stream.
    16091618   
    16101619    @author Johan Enell
     
    16241633
    16251634    /**
    1626       Creates a steam handler connected to the specifiv streams.
     1635      Creates a steam handler connected to the specific streams.
    16271636     
    16281637      @param is The stream to read from.
  • branches/2.4-stable/src/plugins/core/net/sf/basedb/plugins/BioAssaySetExporter.java

    r3730 r3731  
    815815  {
    816816    List<QueryItem> items = new ArrayList<QueryItem>();
    817     items.add(new QueryItem("raw.position", "[Raw] Position", "position", "raw('position')", Formula.AverageMethod.NONE));
     817    items.add(new QueryItem("raw.position", "[Raw] Position", "rawPosition", "raw('position')", Formula.AverageMethod.NONE));
    818818    items.add(new QueryItem("raw.block", "[Raw] Array block", "block", "raw('block')", Formula.AverageMethod.NONE));
    819819    items.add(new QueryItem("raw.metaGridX", "[Raw] Meta grid X", "metaGridX", "raw('metaGridX')", Formula.AverageMethod.NONE));
Note: See TracChangeset for help on using the changeset viewer.