public class EnzymeFactory extends Object
Modifier and Type | Method and Description |
---|---|
void |
addEnzyme(Enzyme enzyme)
Adds an enzyme in the factory.
|
boolean |
enzymeLoaded(String enzyme)
Indicates whether an enzyme is loaded in the factory.
|
static EnzymeFactory |
getDefault()
Returns an instance containing only the default enzymes.
|
Enzyme |
getEnzyme(String enzymeName)
Returns the enzyme corresponding to the given name.
|
ArrayList<Enzyme> |
getEnzymes()
Get the imported enzymes.
|
static EnzymeFactory |
getInstance()
Static method to get an instance of the factory.
|
static EnzymeFactory |
getInstance(File enzymeFile)
Static method to get an instance of the factory.
|
static String |
getSerializationFile()
Returns the file where to save the factory.
|
Enzyme |
getUtilitiesEnzyme(String cvTermAccession)
Returns the enzyme associated to the given cvTerm.
|
static EnzymeFactory |
loadFromFile(File file)
Loads an enzyme factory from a file.
|
void |
removeEnzyme(String enzymeName)
Removes an enzyme from the mapping.
|
static void |
saveToFile(EnzymeFactory enzymeFactory,
File file)
Saves en enzyme factory to a file.
|
static void |
setSerializationFile(String serializationFilePath)
Sets the file where to save the factory.
|
void |
writeMsAmandaEnzymeFile(File file)
Creates the MS Amanda enzyme settings file corresponding to the enzymes
loaded in the factory to the given file.
|
public static EnzymeFactory getInstance()
public static EnzymeFactory getInstance(File enzymeFile)
enzymeFile
- the file to load the factory frompublic static EnzymeFactory getDefault()
public static EnzymeFactory loadFromFile(File file) throws IOException
file
- the file to loadIOException
- exception thrown whenever an error occurred while
loading the filepublic static void saveToFile(EnzymeFactory enzymeFactory, File file) throws IOException
enzymeFactory
- the enzyme factory to savefile
- the file where to saveIOException
- exception thrown whenever an error occurred while
saving the filepublic static String getSerializationFile()
public static void setSerializationFile(String serializationFilePath)
serializationFilePath
- the file where to save the factorypublic ArrayList<Enzyme> getEnzymes()
public Enzyme getEnzyme(String enzymeName)
enzymeName
- the name of the desired enzymepublic void addEnzyme(Enzyme enzyme)
enzyme
- the new enzyme to addpublic void removeEnzyme(String enzymeName)
enzymeName
- the name of the enzyme to remove.public boolean enzymeLoaded(String enzyme)
enzyme
- the name of the enzymepublic Enzyme getUtilitiesEnzyme(String cvTermAccession)
cvTermAccession
- the accession of the cv termpublic void writeMsAmandaEnzymeFile(File file) throws IOException
file
- the fileIOException
- exception thrown whenever an error occurred while
writing the fileCopyright © 2018. All rights reserved.