Class IdentificationParametersFactory
java.lang.Object
com.compomics.util.experiment.identification.identification_parameters.IdentificationParametersFactory
public class IdentificationParametersFactory extends Object
Factory for the identification parameters.
- Author:
- Marc Vaudel
-
Field Summary
Fields Modifier and Type Field Description static String
PARAMETERS_EXTENSION
The extension for a parameters file.static String
PARAMETERS_FOLDER
The identification parameters. -
Method Summary
Modifier and Type Method Description void
addIdentificationParameters(IdentificationParameters identificationParameters)
Adds the given identification parameters to the factory.IdentificationParameters
getIdentificationParameters(String name)
Returns the identification parameters corresponding to the given name.static File
getIdentificationParametersFile(String name)
Returns the identification parameters corresponding to the given name.static IdentificationParametersFactory
getInstance()
Static method to get the instance of the factory.ArrayList<String>
getParametersList()
Returns an ordered list of the names of the implemented parameters.static String
getParentFolder()
Returns the parent folder.void
removeIdentificationParameters(String name)
Deletes the identification parameters of the given name.static void
setParentFolder(String PARENT_FOLDER)
Set the parent folder.void
updateIdentificationParameters(IdentificationParameters oldParameters, IdentificationParameters newParameters)
Replaces old parameters by new.
-
Field Details
-
PARAMETERS_FOLDER
The identification parameters.- See Also:
- Constant Field Values
-
PARAMETERS_EXTENSION
The extension for a parameters file.- See Also:
- Constant Field Values
-
-
Method Details
-
getInstance
Static method to get the instance of the factory.- Returns:
- the instance of the factory
-
getParametersList
Returns an ordered list of the names of the implemented parameters.- Returns:
- an ordered list of the names of the implemented parameters
-
getIdentificationParameters
Returns the identification parameters corresponding to the given name. Null if not found.- Parameters:
name
- the name of the parameters to return- Returns:
- the identification parameters corresponding to the given name
-
getIdentificationParametersFile
Returns the identification parameters corresponding to the given name. Null if not found.- Parameters:
name
- the name of the parameters to return- Returns:
- the identification parameters corresponding to the given name
-
removeIdentificationParameters
Deletes the identification parameters of the given name.- Parameters:
name
- the name of the parameters to delete
-
addIdentificationParameters
public void addIdentificationParameters(IdentificationParameters identificationParameters) throws IOException, FileNotFoundException, ClassNotFoundExceptionAdds the given identification parameters to the factory.- Parameters:
identificationParameters
- the identification parameters- Throws:
IOException
- exception thrown whenever an error occurred while saving the fileFileNotFoundException
- exception thrown whenever an error occurred while saving the fileClassNotFoundException
- exception thrown whenever an error occurred while saving the file
-
updateIdentificationParameters
public void updateIdentificationParameters(IdentificationParameters oldParameters, IdentificationParameters newParameters) throws IOException, FileNotFoundException, ClassNotFoundExceptionReplaces old parameters by new.- Parameters:
oldParameters
- the old identification parametersnewParameters
- the new identification parameters- Throws:
IOException
- exception thrown whenever an error occurred while saving the fileFileNotFoundException
- exception thrown whenever an error occurred while saving the fileClassNotFoundException
- exception thrown whenever an error occurred while saving the file
-
getParentFolder
Returns the parent folder.- Returns:
- the parent folder
-
setParentFolder
Set the parent folder.- Parameters:
PARENT_FOLDER
- the parent folder
-