public class IdentificationParametersFactory extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PARAMETERS_EXTENSION
The extension for a parameters file.
|
static String |
PARAMETERS_FOLDER
The identification parameters.
|
Modifier and Type | Method and 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.
|
public static final String PARAMETERS_FOLDER
public static final String PARAMETERS_EXTENSION
public static IdentificationParametersFactory getInstance()
public ArrayList<String> getParametersList()
public IdentificationParameters getIdentificationParameters(String name)
name
- the name of the parameters to returnpublic static File getIdentificationParametersFile(String name)
name
- the name of the parameters to returnpublic void removeIdentificationParameters(String name)
name
- the name of the parameters to deletepublic void addIdentificationParameters(IdentificationParameters identificationParameters) throws IOException, FileNotFoundException, ClassNotFoundException
identificationParameters
- the identification parametersIOException
- 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 filepublic void updateIdentificationParameters(IdentificationParameters oldParameters, IdentificationParameters newParameters) throws IOException, FileNotFoundException, ClassNotFoundException
oldParameters
- the old identification parametersnewParameters
- the new identification parametersIOException
- 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 filepublic static String getParentFolder()
public static void setParentFolder(String PARENT_FOLDER)
PARENT_FOLDER
- the parent folderCopyright © 2016. All rights reserved.