Package de.isas.lipidomics.palinom.cli
Class CmdLineParser
- java.lang.Object
-
- de.isas.lipidomics.palinom.cli.CmdLineParser
-
public class CmdLineParser extends Object
Create a new command line parser for parsing of lipid names.- Author:
- nils.hoffmann
-
-
Field Summary
Fields Modifier and Type Field Description static String
LIPIDMAPS_CLASS_REGEXP
-
Constructor Summary
Constructors Constructor Description CmdLineParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static String
addGrammarOption(org.apache.commons.cli.Options options)
protected static String
addHelpOption(org.apache.commons.cli.Options options)
protected static String
addLipidFileInputOption(org.apache.commons.cli.Options options)
protected static String
addLipidNameInputOption(org.apache.commons.cli.Options options)
protected static String
addOutputToFileOption(org.apache.commons.cli.Options options)
protected static String
addVersionOption(org.apache.commons.cli.Options options)
static void
main(String[] args)
Runs the command line parser for jgoslin, including validation.protected static org.apache.commons.lang3.tuple.Pair<String,List<de.isas.lipidomics.palinom.cli.CmdLineParser.ValidationResult>>
parseName(String lipidName)
protected static List<org.apache.commons.lang3.tuple.Pair<String,List<de.isas.lipidomics.palinom.cli.CmdLineParser.ValidationResult>>>
parseNames(Stream<String> lipidNames)
protected static List<org.apache.commons.lang3.tuple.Pair<String,List<de.isas.lipidomics.palinom.cli.CmdLineParser.ValidationResult>>>
parseNamesWith(Stream<String> lipidNames, CmdLineParser.ValidationResult.Grammar grammar)
protected static org.apache.commons.lang3.tuple.Pair<String,de.isas.lipidomics.palinom.cli.CmdLineParser.ValidationResult>
parseNameWith(String lipidName, CmdLineParser.ValidationResult.Grammar grammar)
protected static String
toTable(List<org.apache.commons.lang3.tuple.Pair<String,List<de.isas.lipidomics.palinom.cli.CmdLineParser.ValidationResult>>> results)
protected static boolean
writeToFile(File f, List<org.apache.commons.lang3.tuple.Pair<String,List<de.isas.lipidomics.palinom.cli.CmdLineParser.ValidationResult>>> results)
protected static boolean
writeToStdOut(List<org.apache.commons.lang3.tuple.Pair<String,List<de.isas.lipidomics.palinom.cli.CmdLineParser.ValidationResult>>> results)
protected static void
writeToWriter(BufferedWriter bw, List<org.apache.commons.lang3.tuple.Pair<String,List<de.isas.lipidomics.palinom.cli.CmdLineParser.ValidationResult>>> results)
-
-
-
Field Detail
-
LIPIDMAPS_CLASS_REGEXP
public static final String LIPIDMAPS_CLASS_REGEXP
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmdLineParser
public CmdLineParser()
-
-
Method Detail
-
main
public static void main(String[] args) throws Exception
Runs the command line parser for jgoslin, including validation.
-
writeToStdOut
protected static boolean writeToStdOut(List<org.apache.commons.lang3.tuple.Pair<String,List<de.isas.lipidomics.palinom.cli.CmdLineParser.ValidationResult>>> results)
-
writeToFile
protected static boolean writeToFile(File f, List<org.apache.commons.lang3.tuple.Pair<String,List<de.isas.lipidomics.palinom.cli.CmdLineParser.ValidationResult>>> results)
-
toTable
protected static String toTable(List<org.apache.commons.lang3.tuple.Pair<String,List<de.isas.lipidomics.palinom.cli.CmdLineParser.ValidationResult>>> results)
-
writeToWriter
protected static void writeToWriter(BufferedWriter bw, List<org.apache.commons.lang3.tuple.Pair<String,List<de.isas.lipidomics.palinom.cli.CmdLineParser.ValidationResult>>> results)
-
parseNames
protected static List<org.apache.commons.lang3.tuple.Pair<String,List<de.isas.lipidomics.palinom.cli.CmdLineParser.ValidationResult>>> parseNames(Stream<String> lipidNames)
-
parseNamesWith
protected static List<org.apache.commons.lang3.tuple.Pair<String,List<de.isas.lipidomics.palinom.cli.CmdLineParser.ValidationResult>>> parseNamesWith(Stream<String> lipidNames, CmdLineParser.ValidationResult.Grammar grammar)
-
parseNameWith
protected static org.apache.commons.lang3.tuple.Pair<String,de.isas.lipidomics.palinom.cli.CmdLineParser.ValidationResult> parseNameWith(String lipidName, CmdLineParser.ValidationResult.Grammar grammar)
-
parseName
protected static org.apache.commons.lang3.tuple.Pair<String,List<de.isas.lipidomics.palinom.cli.CmdLineParser.ValidationResult>> parseName(String lipidName)
-
addLipidFileInputOption
protected static String addLipidFileInputOption(org.apache.commons.cli.Options options)
-
addLipidNameInputOption
protected static String addLipidNameInputOption(org.apache.commons.cli.Options options)
-
addVersionOption
protected static String addVersionOption(org.apache.commons.cli.Options options)
-
addHelpOption
protected static String addHelpOption(org.apache.commons.cli.Options options)
-
addOutputToFileOption
protected static String addOutputToFileOption(org.apache.commons.cli.Options options)
-
addGrammarOption
protected static String addGrammarOption(org.apache.commons.cli.Options options)
-
-