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.
|
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 String |
getSerializationFolder()
Returns the folder where to save the factory.
|
ArrayList<String> |
getSortedEnzymeNames()
Get the sorted list of enzyme names.
|
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.
|
void |
saveFactory()
Saves the factory in the user folder.
|
static void |
saveToFile(EnzymeFactory enzymeFactory,
File file)
Saves en enzyme factory to a file.
|
static void |
setDefaultEnzymes()
Sets the instance to only contain the default enzymes.
|
static void |
setSerializationFolder(String serializationFilePath)
Sets the folder where to save the factory.
|
public static EnzymeFactory getInstance()
public void saveFactory() throws IOException
IOException
- exception thrown whenever an error occurred while
saving the modificationFactorypublic static void setDefaultEnzymes()
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 getSerializationFolder()
public static void setSerializationFolder(String serializationFilePath)
serializationFilePath
- the folder where to save the factorypublic ArrayList<Enzyme> getEnzymes()
public ArrayList<String> getSortedEnzymeNames()
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 enzymeCopyright © 2021. All rights reserved.