Package org.lifstools.jgoslin.parser
Klasse LipidParser
java.lang.Object
org.lifstools.jgoslin.parser.LipidParser
Implementation that uses all available parsers to parse a given lipid name.
First successful parser implementation wins.
- Autor:
- Dominik Kopczynski, Nils Hoffmann
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungCreate a new lipid parser instance.LipidParser(KnownFunctionalGroups knownFunctionalGroups) Create a new lipid parser instance. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns the grammar name of the last successful parser.Returns the last successful parser instance.This method tries multiple parsers in a defined order to parse the provided lipid name.If no parser is able to parse the name successfully, an exception is thrown.
-
Konstruktordetails
-
LipidParser
public LipidParser()Create a new lipid parser instance. -
LipidParser
Create a new lipid parser instance.- Parameter:
knownFunctionalGroups- the known functional groups
-
-
Methodendetails
-
parse
This method tries multiple parsers in a defined order to parse the provided lipid name.If no parser is able to parse the name successfully, an exception is thrown.- Parameter:
lipidName- the lipid name to parse.- Gibt zurück:
- the
LipidAdductif parsing with at least one parser succeeded. - Löst aus:
LipidParsingException- if now parser was able to parse the provided lipid name.
-
getLastSuccessfulParser
Returns the last successful parser instance. May be null, if either no parser has been applied yet, or no parser has been successfully applied for parsing the last lipid name.- Gibt zurück:
- the last successful parser instance.
-
getLastSuccessfulGrammar
Returns the grammar name of the last successful parser.- Gibt zurück:
- the grammar name of the last successful parser.
-