com.compomics.software
Class CompomicsWrapper

java.lang.Object
  extended by com.compomics.software.CompomicsWrapper

public class CompomicsWrapper
extends java.lang.Object

A general wrapper for compomics tools. All tools shall contain a resources/conf folder. In it a JavaOptions.txt and splash screen. Eventually JavaHome.txt and proxy/uniprotjapi.properties.

Author:
Marc Vaudel

Constructor Summary
CompomicsWrapper()
          Constructor.
 
Method Summary
static void checkForNewVersion(java.lang.String currentVersion, java.lang.String toolName, java.lang.String googleCodeToolName)
          Check if a newer version of the tool is available on Google Code.
static java.lang.String getJarFilePath(java.lang.String classPath, java.lang.String toolName)
          Returns the path to the jar file.
 void launchTool(java.lang.String toolName, java.io.File jarFile, java.lang.String splashName, java.lang.String mainClass)
          Starts the launcher by calling the launch method.
 void launchTool(java.lang.String toolName, java.io.File jarFile, java.lang.String splashName, java.lang.String mainClass, java.lang.String[] args)
          Starts the launcher by calling the launch method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompomicsWrapper

public CompomicsWrapper()
Constructor.

Method Detail

launchTool

public void launchTool(java.lang.String toolName,
                       java.io.File jarFile,
                       java.lang.String splashName,
                       java.lang.String mainClass)
Starts the launcher by calling the launch method. Use this as the main class in the jar file.

Parameters:
toolName -
jarFile - the jar file to execute
splashName - the splash name, for example peptide-shaker-splash.png
mainClass - the main class to execute, for example eu.isas.peptideshaker.gui.PeptideShakerGUI

launchTool

public void launchTool(java.lang.String toolName,
                       java.io.File jarFile,
                       java.lang.String splashName,
                       java.lang.String mainClass,
                       java.lang.String[] args)
Starts the launcher by calling the launch method. Use this as the main class in the jar file.

Parameters:
toolName -
jarFile - the jar file to execute
splashName - the splash name, for example peptide-shaker-splash.png
mainClass - the main class to execute, for example eu.isas.peptideshaker.gui.PeptideShakerGUI
args - the arguments to pass to the tool (ignored if null)

getJarFilePath

public static java.lang.String getJarFilePath(java.lang.String classPath,
                                              java.lang.String toolName)
Returns the path to the jar file. Verifies that the path exists and tries to decode from Unicode if not.

Parameters:
classPath - the class path to extract the jar file path from
toolName - the name of the tool, e.g., "PeptideShaker" or "SearchGUI".
Returns:
the path to the jar file

checkForNewVersion

public static void checkForNewVersion(java.lang.String currentVersion,
                                      java.lang.String toolName,
                                      java.lang.String googleCodeToolName)
Check if a newer version of the tool is available on Google Code.

Parameters:
currentVersion - the version number of the tool currently running
toolName - the name of the tool, e.g., "PeptideShaker"
googleCodeToolName - the google code name of the tool, e.g., "peptide-shaker"


Copyright © 2013. All Rights Reserved.