Changeset 3716


Ignore:
Timestamp:
Sep 12, 2007, 1:00:57 PM (14 years ago)
Author:
Johan Enell
Message:

Fixes #754

Location:
branches/2.4-stable/src
Files:
3 edited

Legend:

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

    r3679 r3716  
    290290        BioAssaySet bas = getCurrentBioAssaySet(dc);
    291291        int channels = bas.getRawDataType().getChannels();
    292         Integer maxChannels = (Integer) configuration.getValue(maxChannelsParameter.getName());
    293         Integer minChannels = (Integer) configuration.getValue(minChannelsParameter.getName());;
     292        int maxChannels = Values.getInt(String.valueOf(configuration.getValue(maxChannelsParameter.getName())), 0);
     293        int minChannels = Values.getInt(String.valueOf(configuration.getValue(minChannelsParameter.getName())), 0);
    294294        if (channels < minChannels || ( maxChannels != 0 && channels > maxChannels))
    295295        {
    296           message = configuration.getPluginConfiguration().getName() + " can't work on " + channels + "-channel data; min=" + minChannels + "; max=" + maxChannels;
    297           return message;
     296          return configuration.getPluginConfiguration().getName() + " can't work on " + channels + "-channel data; min=" + minChannels + "; max=" + maxChannels;
    298297        }
    299298        List<String> extraValues = new ArrayList<String>();
     
    302301          extraValues.add(ev.getExtraValueType().getExternalId());
    303302        }
    304         Pattern p = Pattern.compile("_xc_(.+)\\t?");
    305         Matcher m = p.matcher((CharSequence) configuration.getValue(usedFieldsParameter.getName()));
    306         while (message == null && m.find())
    307         {
    308           if (!extraValues.contains(m.group(1)))
    309           {
    310             throw new InvalidDataException("Requires extra value '"+ m.group(1) +"' attached to BioAssaySet");
    311           }
    312         }
     303        String[] usedFields = String.valueOf(configuration.getValue(usedFieldsParameter.getName())).split("\\\\t");
     304        for (String field : usedFields)
     305        {
     306          if (field.startsWith("_xc_") && !extraValues.contains(field.substring(4)))
     307          {
     308            return "Requires extra value '"+ field.substring(4) +"' attached to BioAssaySet";
     309          }
     310        }
     311       
     312//        System.out.println(configuration.getValue(usedFieldsParameter.getName()));
     313//        while (m.find())
     314//        {
     315//          System.out.println(m.group(1));
     316//          if (!extraValues.contains(m.group(1)))
     317//          {
     318//          }
     319//        }
     320      }
     321      catch (Exception e)
     322      {
     323        message = ""+e.getMessage();
     324        e.printStackTrace();
    313325      }
    314326      finally
  • branches/2.4-stable/src/test/set_classpath.bat

    r3675 r3716  
    3131REM Testdata
    3232SET CP=%CP%;data
     33SET CP=%CP%;../../data
    3334SET CP=%CP%;../../testdata
    3435
  • branches/2.4-stable/src/test/set_classpath.sh

    r3675 r3716  
    3131# Testdata
    3232CP=$CP:data
     33CP=$CP:../../data
    3334CP=$CP:../../testdata
    3435
Note: See TracChangeset for help on using the changeset viewer.