Changeset 583


Ignore:
Timestamp:
Feb 12, 2008, 9:40:08 AM (13 years ago)
Author:
Nicklas Nordborg
Message:

References #89: Installation program and documentation

Minor changes to installation and readme instructions. Installation creates software item also.

Location:
trunk/net/sf/basedb/illumina
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/net/sf/basedb/illumina/INSTALL

    r580 r583  
    3434== Installation ==
    3535
    36 This is preliminary instructions only. The final installation
    37 procedure is not yet completed.
    38 
    3936 1. Unpack the tar.gz file to a directory of your choice.
    4037 2. Stop your Tomcat server that is running BASE and all job agents, if any.
    4138 3. Copy the illumina-plugins-xxx.jar (where xxx depends on the version number)
    42    to your BASE plug-ins directory. This directory is specified by the
    43    'plugins.dir' option in your base.config file and defaults to
    44    <basedir>/plugins.[[BR]]   
    45    If you have job agents that are running from another location, copy
    46    the jar file to a location the job agents has access to.   
     39    to your BASE plug-ins directory. This directory is specified by the
     40    'plugins.dir' option in your base.config file and defaults to
     41    <basedir>/plugins.[[BR]]   
     42    If you have job agents that are running from another location, copy
     43    the jar file to a location the job agents has access to.   
    4744 4. From the ''config'' directory, copy:
    48    * ''illumina-extended-properties.xml'' to <basedir>''/www/WEB-INF/classes/extended-properties/''
    49    * ''illumina-raw-data-types-xml'' to <basedir>''/www/WEB-INF/classes/raw-data-types/''[[BR]]
    50     '''Notice: Do you have job agents that are running from another location, copy the
    51    configuration files to a location the job agents has access to.'''   
     45     * ''illumina-extended-properties.xml'' to <basedir>''/www/WEB-INF/classes/extended-properties/''
     46     * ''illumina-raw-data-types-xml'' to <basedir>''/www/WEB-INF/classes/raw-data-types/''[[BR]]
     47       '''Notice: If you have job agents that are running from another location, copy the
     48       configuration files to a location the job agents has access to.'''   
    5249 5. Update the database with Illumina-specific tables and columns by running the
    53    ''updatedb.sh'' script, located in the <basedir>''/bin'' directory.
     50    ''updatedb.sh'' script, located in the <basedir>''/bin'' directory.
    5451 6. Restart the Tomcat server.   
    55  7. Run the auto-installation wizard by going to ''Administrate -> Plugins ->
    56    Definitions''
    57    and click on the 'New' button.   
    58  8. Select the 'Automatical' option.
     52 7. Log in to BASE as an administrator and run the plug-in auto-installation wizard by going
     53    to ''Administrate -> Plugins -> Definitions'' and click on the 'New' button.   
     54 8. Select the 'Automatically' option.
    5955 9. The auto-detection should find the plug-ins listed below. You should
    60    change the 'Install' value to 'yes' for all of them.
    61   * Illumina plug-in package installer
    62   * Illumina BGX feature importer
    63   * Illumina BGX reporter importer
    64   * Illumina Bead Summary importer 
     56    change the 'Install' value to 'yes' or 'plugin+configurations' for all of them.
     57   * Illumina plug-in package installer
     58   * Illumina BGX feature importer
     59   * Illumina BGX reporter importer
     60   * Illumina Bead Summary importer
    6561 10. Find the 'Illumina plug-in package installer' in the list of plug-ins and click on it.
    6662 11. Click on the 'Run plugin' button.
    67  12. Accept the default options.
    68  13. Wait for the plug-in to finish.
    69  14. Done. The Illumina plug-ins are now installed. You can now restart any job
     63 12. Decide which Illumina variants to install and if you want the installation
     64    program to create a scanner and/or software entry.
     65 13. Finish the job registration and wait for the plug-in to finish.
     66 14. Done. The Illumina plug-ins are now installed. You can now restart any job
    7067    agents as well.
    7168   
     
    7471the Tomcat web server. If the job agents are not running from the same BASE
    7572installation directory, you may need to copy the files to a proper location.
    76 You may also have to configure the path the jar file for each job agent using the
    77 web interface.
     73We recommend that you always put the illumina-plugins-xxx.jar inside the
     74plugins.dir directory. If you do, BASE will automatically find the JAR file
     75in job agents. Otherwise, you may have to configure the JAR path manually
     76for each job agent.
  • trunk/net/sf/basedb/illumina/README

    r580 r583  
    173173== Getting started ==
    174174
    175  1. Install this package as described by the instruction in the INSTALL file.
    176  2. Import reporter annotations. You will need the BGX files for this. They can
    177     be downloaded from http://www.switchtoi.com/annotationfiles.ilmn.
     175 1. Install this package as described by the instructions in the INSTALL file.
     176 2. Import reporter annotations. You will need one or more BGX files for this.
     177    BGX files can be downloaded from http://www.switchtoi.com/annotationfiles.ilmn.
    178178     * Upload the BGX file(s) to BASE.
    179179     * Go to the View -> Reporters menu.
  • trunk/net/sf/basedb/illumina/src/net/sf/basedb/illumina/install/Install.java

    r582 r583  
    3535import net.sf.basedb.core.ItemAlreadyExistsException;
    3636import net.sf.basedb.core.ItemNotFoundException;
     37import net.sf.basedb.core.Job;
    3738import net.sf.basedb.core.Permission;
    3839import net.sf.basedb.core.Platform;
     
    4344import net.sf.basedb.core.RawDataType;
    4445import net.sf.basedb.core.RequestInformation;
     46import net.sf.basedb.core.Software;
     47import net.sf.basedb.core.SoftwareType;
    4548import net.sf.basedb.core.StringParameterType;
    4649import net.sf.basedb.core.SystemItems;
     
    119122  private PluginParameter<String> scannerNameParameter;
    120123  private PluginParameter<String> scannerVersionParameter;
     124  private PluginParameter<String> scannerDescriptionParameter;
     125  private PluginParameter<String> installSoftwareParameter;
     126  private PluginParameter<String> softwareNameParameter;
     127  private PluginParameter<String> softwareVersionParameter;
     128  private PluginParameter<String> softwareDescriptionParameter;
    121129 
    122130   
     
    125133  (
    126134    "variantSection",
    127     "Variants",
     135    "Illumina platform variants",
    128136    "Variants available to be installed",
    129137    null
     
    132140  (
    133141    "hardwareSection",
    134     "Hardware",
    135     "Hardware used with the Illumina platform",
     142    "Scanner & Software",
     143    "The scanner and software used with the Illumina platform",
    136144    null
    137145  );
     
    159167    "alreadyInstalledError",
    160168    "Item already exists.",
    161     "How to act when an external id is taken for either the platform or any of the selected variants." +
    162     "If not specified, default value(skip) will be used.\n\n" +
     169    "How to act when an external id is taken for either the platform or " +
     170    "any of the selected variants.\n\n" +
    163171    "abort = Abort the installation, nothing will be created.\n" +
    164172    "skip = The installation will skip the existing item " +
     
    210218    if (command.equals(Request.COMMAND_EXECUTE))
    211219    {
     220      DbControl dc = sc.newDbControl();
    212221      try
    213222      {
     
    215224        boolean installSnp = (Boolean)job.getValue("installSnp");
    216225        */
    217         boolean installExp1 = ((String)job.getValue("installExp1")).equals(YES_OPTION);
    218         boolean installExp2 = ((String)job.getValue("installExp2")).equals(YES_OPTION);       
    219         boolean installScanner = ((String)job.getValue("installScanner")).equals(YES_OPTION);
    220         String alreadyExistingItem = (String)job.getValue("alreadyInstalledError");
     226        boolean installExp1 = YES_OPTION.equals(job.getValue("installExp1"));
     227        boolean installExp2 = YES_OPTION.equals(job.getValue("installExp2"));       
     228        boolean installScanner = YES_OPTION.equals(job.getValue("installScanner"));
     229        boolean installSoftware = YES_OPTION.equals(job.getValue("installSoftware"));
     230        boolean ignoreExisingItems = SKIP_OPTION.equals(job.getValue("alreadyInstalledError"));
    221231
    222232        Set<Integer> expressionTypes = new HashSet<Integer>();
     
    235245        }
    236246       
    237         installIlluminaItems(null, expressionTypes, scannerProperties, alreadyExistingItem.equals(SKIP_OPTION), progress);
     247        installIlluminaItems(dc, false, expressionTypes, ignoreExisingItems, progress);
     248        if (installScanner)
     249        {
     250          String name = (String)job.getValue("scannerName");
     251          String version = (String)job.getValue("scannerVersion");
     252          String description = (String)job.getValue("scannerDescription");
     253          createScanner(dc, name, version, description);
     254        }
     255        if (installSoftware)
     256        {
     257          String name = (String)job.getValue("softwareName");
     258          String version = (String)job.getValue("softwareVersion");
     259          String description = (String)job.getValue("softwareDescription");
     260          createSoftware(dc, name, version, description);
     261        }
     262        dc.commit();
    238263      }
    239264      catch(Throwable ex)
     
    241266        response.setError(ex.getMessage(), Arrays.asList(ex));
    242267        return;
     268      }
     269      finally
     270      {
     271        if (dc != null) dc.close();
    243272      }
    244273      response.setDone("Illumina items were installed successfully");
     
    297326        return;
    298327      }
    299       if (((String)request.getParameterValue(installScannerParameter.getName())).equals(YES_OPTION) &&
    300           request.getParameterValue(scannerNameParameter.getName()) == null)
     328      if (YES_OPTION.equals(request.getParameterValue(installScannerParameter.getName())) &&
     329        request.getParameterValue(scannerNameParameter.getName()) == null)
    301330      {
    302331        response.setError("The scanner to create must have a name. Please specify a name in 'Scanner name'-parameter", null);
    303332        return;
    304333      }
     334      if (YES_OPTION.equals(request.getParameterValue(installSoftwareParameter.getName())) &&
     335        request.getParameterValue(softwareNameParameter.getName()) == null)
     336      {
     337        response.setError("The software to create must have a name. Please specify a name in 'Software name'-parameter", null);
     338        return;
     339      }
     340
    305341      storeValue(job, request, alreadyInstalledErrorParameter);
    306342      storeValue(job, request, installExp1VariantParameter);
     
    313349      storeValue(job, request, scannerNameParameter);
    314350      storeValue(job, request, scannerVersionParameter);
    315      
    316       response.setDone("The job configuration is complete.");
     351      storeValue(job, request, scannerDescriptionParameter);
     352     
     353      storeValue(job, request, installSoftwareParameter);
     354      storeValue(job, request, softwareNameParameter);
     355      storeValue(job, request, softwareVersionParameter);
     356      storeValue(job, request, softwareDescriptionParameter);
     357     
     358      if (request.isAllowedImmediateExecution())
     359      {
     360        response.setExecuteImmediately("Installing Illumina items", Job.ExecutionTime.SHORTEST, false);
     361      }
     362      else
     363      {
     364        response.setDone("The job configuration is complete.", Job.ExecutionTime.SHORTEST);
     365      }
    317366    }
    318367    else
     
    342391    @param expressionTypes A set of numbers. A expression variant will be created for each object in the set
    343392      and the number itself represent the number of strip(s) in an array of the variant to create.
    344     @param scannerProperties A map with properties to set on a scanner/hardware when it is created. Null if no hardware should be installed.
    345393    @param ignoreExistingItems TRUE if items already existing should be ignored and the rest should be installed.
    346394       FALSE if NO items should be created when there is one or more already existing in BASE.
    347395    @throws ItemAlreadyExistsException If ignoreInstalledItems = FALSE and one of the
    348396   */
    349   public void installIlluminaItems(Boolean installSNP, Set<Integer> expressionTypes, Map<String, Object> scannerProperties, boolean ignoreExistingItems, ProgressReporter progress)
     397  public void installIlluminaItems(DbControl dc, Boolean installSNP, Set<Integer> expressionTypes, boolean ignoreExistingItems, ProgressReporter progress)
    350398    throws ItemAlreadyExistsException
    351399  {   
     
    357405          "Illumina plug-in manual.");
    358406    }
    359     DbControl dc = null;
    360407    int largestNumOfStrips = 0;
    361408   
     409    String jarPath = PluginDefinition.getByClassName(dc, this.getClass().getName()).getJarPath();
     410
    362411    /*TODO SNP
    363412    String snpVariantExternalId = "illumina.snp";
     
    376425    }
    377426   
    378     try
    379     {
    380       dc = sc.newDbControl();
    381  
    382       Hardware scanner = null;
    383       if (scannerProperties != null)
    384       {
    385         String name = (String)scannerProperties.get("name");
    386         String scannerVersion = (String)scannerProperties.get("version");
    387         String description = (String)scannerProperties.get("description");
    388         int typeId = SystemItems.getId(HardwareType.SCANNER);
    389         scanner = Hardware.getNew(dc, HardwareType.getById(dc, typeId));
    390         dc.saveItem(scanner);
    391         scanner.setName(name == null ? "Illumina hardware" : name);
    392         scanner.setVersionString(scannerVersion);
    393         scanner.setDescription(description);
    394       }
    395      
    396       reporterMapType = FileType.getById(dc, SystemItems.getId("net.sf.basedb.core.FileType.REPORTER_MAP"));
    397       rawDataType = FileType.getById(dc, SystemItems.getId("net.sf.basedb.core.FileType.RAW_DATA"));
    398 
    399       //Data file types
    400       Map<String, DataFileType> dataFileTypes = new HashMap<String, DataFileType>();     
    401       DataFileType bgx = createDataFileType(dc,
    402         Illumina.BGX_FILE_ID, "BGX file", "Illumina Sentrix Array binary manifest file",
    403         Item.ARRAYDESIGN, BGX_FILEYTPE_EXTENSION, reporterMapType, ignoreExistingItems);
    404       bgx.setValidatorClass(Illumina.BGX_VALIDATOR_METADATAREADER);
    405       bgx.setMetadataReaderClass(Illumina.BGX_VALIDATOR_METADATAREADER);
    406       for (int i = 1; i <= largestNumOfStrips; i++ )
    407       {
    408         String name = "Illumina Bead Summary file " + i; 
    409         DataFileType dft = createDataFileType(dc,
    410           beadSummaryTypePrefix + i, name,
    411           "Illumina Bead Summary file for strip #" + i + " in an array.",
    412           Item.RAWBIOASSAY, BEAD_SUMMARY_FILETYPE_EXTENSION, rawDataType, ignoreExistingItems);
    413         dataFileTypes.put(dft.getExternalId(), dft);
    414       }
    415       //TODO Create data file type for SNP filer.
    416      
    417       //Platform and variants
    418       Platform illuminaPlatform = createPlatform(dc, Illumina.PLATFORM_ID, "Illumina", ignoreExistingItems);
    419       if (illuminaPlatform.getDescription() == null || illuminaPlatform.getDescription().equals(""))
    420       {
    421         illuminaPlatform.setDescription("Illumina platform.");
    422       }
    423            
    424       List<PlatformVariant> platformVariants = new ArrayList<PlatformVariant>();     
    425       String namePrefix = "Expression ";
    426       for (int type : expressionTypes)
    427       {
    428         PlatformVariant pfv = createPlatformVariant(dc, expExternalIdPrefix + type, namePrefix + type,
    429             illuminaPlatform, beadSummaryType, ignoreExistingItems);
    430         if (pfv.getDescription() == null || pfv.getDescription().equals(""))
    431         {
    432           pfv.setDescription("Platform variant to use with Illumina expression containing " + type + " strip(s)/array");
    433         }
    434         pfv.addFileType(bgx, true);
    435         for (int i = 1; i <= type; i++)
    436         {
    437           pfv.addFileType(dataFileTypes.get(beadSummaryTypePrefix+i), true);
    438         }
    439         platformVariants.add(pfv);       
    440       }
    441      
    442       /*TODO SNP
    443       if (installSNP != null && installSNP)
    444       {
    445         PlatformVariant pfv = createPlatformVariant(dc, Illumina.SNP_VARIANT_ID,
    446             "Illumina SNP", illuminaPlatform, 2, ignoreExistingItems);
    447         if (pfv.getDescription() == null || pfv.getDescription().equals(""))
    448         {
    449           pfv.setDescription("Platform variant to be used with Illumina SNP data.");
    450         }
    451         //TODO Add data file types to the SNP variant.
    452         platformVariants.add(pfv);       
    453       }
    454       */ 
    455      
    456       dc.commit();
    457     }
    458     finally
    459     {
    460       if (dc != null)
    461       {
    462         dc.close();
    463       }
    464     }
     427    reporterMapType = FileType.getById(dc, SystemItems.getId("net.sf.basedb.core.FileType.REPORTER_MAP"));
     428    rawDataType = FileType.getById(dc, SystemItems.getId("net.sf.basedb.core.FileType.RAW_DATA"));
     429
     430    //Data file types
     431    Map<String, DataFileType> dataFileTypes = new HashMap<String, DataFileType>();     
     432    DataFileType bgx = createDataFileType(dc,
     433      Illumina.BGX_FILE_ID, "BGX file", "Illumina Sentrix Array binary manifest file",
     434      Item.ARRAYDESIGN, BGX_FILEYTPE_EXTENSION, reporterMapType,
     435      Illumina.BGX_VALIDATOR_METADATAREADER, Illumina.BGX_VALIDATOR_METADATAREADER,
     436      jarPath, ignoreExistingItems);
     437    for (int i = 1; i <= largestNumOfStrips; i++ )
     438    {
     439      String name = "Illumina Bead Summary file " + i; 
     440      DataFileType dft = createDataFileType(dc,
     441        beadSummaryTypePrefix + i, name,
     442        "Illumina Bead Summary file for strip #" + i + " in an array.",
     443        Item.RAWBIOASSAY, BEAD_SUMMARY_FILETYPE_EXTENSION, rawDataType,
     444        null, null, null, ignoreExistingItems);
     445      dataFileTypes.put(dft.getExternalId(), dft);
     446    }
     447    //TODO Create data file type for SNP filer.
     448   
     449    //Platform and variants
     450    Platform illuminaPlatform = createPlatform(dc, Illumina.PLATFORM_ID, "Illumina", ignoreExistingItems);
     451    if (illuminaPlatform.getDescription() == null || illuminaPlatform.getDescription().equals(""))
     452    {
     453      illuminaPlatform.setDescription("Illumina platform.");
     454    }
     455         
     456    List<PlatformVariant> platformVariants = new ArrayList<PlatformVariant>();     
     457    String namePrefix = "Expression ";
     458    for (int type : expressionTypes)
     459    {
     460      PlatformVariant pfv = createPlatformVariant(dc, expExternalIdPrefix + type, namePrefix + type,
     461          illuminaPlatform, beadSummaryType, ignoreExistingItems);
     462      if (pfv.getDescription() == null || pfv.getDescription().equals(""))
     463      {
     464        pfv.setDescription("Platform variant to use with Illumina expression containing " + type + " strip(s)/array");
     465      }
     466      pfv.addFileType(bgx, true);
     467      for (int i = 1; i <= type; i++)
     468      {
     469        pfv.addFileType(dataFileTypes.get(beadSummaryTypePrefix+i), true);
     470      }
     471      platformVariants.add(pfv);       
     472    }
     473   
     474    /*TODO SNP
     475    if (installSNP != null && installSNP)
     476    {
     477      PlatformVariant pfv = createPlatformVariant(dc, Illumina.SNP_VARIANT_ID,
     478          "Illumina SNP", illuminaPlatform, 2, ignoreExistingItems);
     479      if (pfv.getDescription() == null || pfv.getDescription().equals(""))
     480      {
     481        pfv.setDescription("Platform variant to be used with Illumina SNP data.");
     482      }
     483      //TODO Add data file types to the SNP variant.
     484      platformVariants.add(pfv);       
     485    }
     486    */ 
    465487  }
    466488
     
    499521      (
    500522        "installScanner",
    501         "Install scanner",
    502         "Choose '" + YES_OPTION + "' to create a scanner in BASE, or '" + NO_OPTION + "' otherwise",
     523        "Create scanner",
     524        "Choose '" + YES_OPTION + "' to create a scanner entry in BASE, or '" + NO_OPTION + "' otherwise",
    503525        installOptionType
    504526      );
     
    530552        )
    531553      );
     554      scannerDescriptionParameter = new PluginParameter<String>
     555      (
     556        "scannerDescription",
     557        "Scanner description",
     558        "An optional description of the scanner.",
     559        new StringParameterType
     560        (
     561          65535,
     562          "The Illumina BeadArray Reader is a " +
     563          "scanner that can read arrays including Illumina Sentrix BeadChips and " +
     564          "Sentrix Array Matrices (SAMs).",
     565          false,
     566          1,0,0
     567        )
     568      );
     569      installSoftwareParameter = new PluginParameter<String>
     570      (
     571        "installSoftware",
     572        "Create software",
     573        "Choose '" + YES_OPTION + "' to create a software entry in BASE, or '" + NO_OPTION + "' otherwise",
     574        installOptionType
     575      );
     576      softwareNameParameter = new PluginParameter<String>
     577      (
     578        "softwareName",
     579        "Software name",
     580        "The name of the sofware if this should be created. " +
     581        "This could only be left empty if 'Install software' is set to '"+NO_OPTION+"'",
     582        new StringParameterType
     583        (
     584          255,
     585          firstTimeInstallation ? "Illumina BeadScan" : null,
     586          false,
     587          1,0,0         
     588        )
     589      );
     590      softwareVersionParameter = new PluginParameter<String>
     591      (
     592        "softwareVersion",
     593        "Software version",
     594        "Version of the software to create. This has no effect if 'Install software' is set to '" + NO_OPTION + "'",
     595        new StringParameterType
     596        (
     597          255,
     598          null,
     599          false,
     600          1,0,0
     601        )
     602      );
     603      softwareDescriptionParameter = new PluginParameter<String>
     604      (
     605        "softwareDescription",
     606        "Software description",
     607        "An optional description of the software.",
     608        new StringParameterType
     609        (
     610          65535,
     611          "The Illumina BeadScan software operates the BeadArray Reader and " +
     612          "outputs data files resulting from analysis of the scanner images.",
     613          false,
     614          1,0,0
     615        )
     616      );
    532617     
    533618      List<PluginParameter<?>> parameters = new ArrayList<PluginParameter<?>>();
     
    543628      parameters.add(scannerNameParameter);
    544629      parameters.add(scannerVersionParameter);
     630      parameters.add(scannerDescriptionParameter);
     631      parameters.add(installSoftwareParameter);
     632      parameters.add(softwareNameParameter);
     633      parameters.add(softwareVersionParameter);
     634      parameters.add(softwareDescriptionParameter);
     635     
    545636     
    546637      parameters.add(errorSection);
     
    578669  }
    579670 
     671  /**
     672    Create a new data file type. If an item with the given external ID already exists
     673    it will be updated if updateExistingItem=true, otherwise an ItemAlreadyExistsException
     674    is thrown. If an existing item can't be updated, and ItemAlreadyExistsException
     675    is thrown.
     676    @return The new or existing data file type
     677  */
    580678  private DataFileType createDataFileType(DbControl dc, String externalId, String name,
    581     String description, Item itemType, String extension, FileType genericType, boolean ignoreExistingItem)
     679    String description, Item itemType, String extension, FileType genericType,
     680    String validatorClass, String metadataReaderClass, String jarPath,
     681    boolean ignoreExistingItem)
    582682    throws ItemAlreadyExistsException
    583683  {
    584  
     684   
    585685    DataFileType dft = null;
    586     String jarPath = PluginDefinition.getByClassName(dc, this.getClass().getName()).getJarPath();
    587686    try
    588687    {
     
    619718      dft.setDescription(description);
    620719      dft.setGenericType(genericType);
     720      dft.setValidatorClass(validatorClass);
    621721      dft.setValidatorJarPath(jarPath);
     722      dft.setMetadataReaderClass(metadataReaderClass);
    622723      dft.setMetadataReaderJarPath(jarPath);
    623724    }
     
    625726  }
    626727 
    627   private Platform createPlatform(DbControl dc, String externalId, String name, boolean ignoreExistingItem)
     728  public Platform createPlatform(DbControl dc, String externalId, String name, boolean ignoreExistingItem)
    628729  {
    629730    Platform platform = null;
     
    654755    Creates variants associated with a raw data type
    655756   */
    656   private PlatformVariant createPlatformVariant(DbControl dc, String externalId, String name,
     757  public PlatformVariant createPlatformVariant(DbControl dc, String externalId, String name,
    657758      Platform illuminaPlatform, RawDataType rawDataType, boolean ignoreExistingItem)
    658759  {
     
    690791  }
    691792
     793  public Hardware createScanner(DbControl dc, String name, String version, String description)
     794  {
     795    HardwareType scannerType = HardwareType.getById(dc, SystemItems.getId(HardwareType.SCANNER));
     796    Hardware scanner = Hardware.getNew(dc, scannerType);
     797    scanner.setName(name);
     798    scanner.setVersionString(version);
     799    scanner.setDescription(description);
     800    dc.saveItem(scanner);
     801    return scanner;
     802  }
     803 
     804  public Software createSoftware(DbControl dc, String name, String version, String description)
     805  {
     806    SoftwareType featureExtraction = SoftwareType.getById(dc, SystemItems.getId(SoftwareType.FEATURE_EXTRACTION));
     807    Software software = Software.getNew(dc, featureExtraction);
     808    software.setName(name);
     809    software.setVersionString(version);
     810    software.setDescription(description);
     811    dc.saveItem(software);
     812    return software;
     813  }
     814 
    692815  /*
    693816    TODO SNP
Note: See TracChangeset for help on using the changeset viewer.