Package moa.gui.experimentertab
Class ReadFile
- java.lang.Object
-
- moa.gui.experimentertab.ReadFile
-
public class ReadFile extends Object
This class processes the results files of the algorithms in each directory.- Author:
- Alberto Verdecia Cabrera (averdeciac@gmail.com).
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
deleteDrectory(File directory)
Delete the selected directory.LinkedList<String>
getAlgNames()
Returns the name of the algorithms.ArrayList<String>
getAlgShortNames()
Returns the short name of the algorithms.LinkedList<String>
getMeasures()
Returns the common measures to all algorithms.String
getPath()
Returns the path of the results.LinkedList<String>
getStream()
Returns the name of the streams.String
processFiles()
Processes the results files of the algorithms in each directory.static ArrayList<String[]>
readCSV(String path)
Allow to read a csv file.void
setPath(String path)
Sets the directory of the results file.String
updateMeasures(String[] algNames, String stream)
-
-
-
Constructor Detail
-
ReadFile
public ReadFile(String path)
File Constructor- Parameters:
path
-
-
-
Method Detail
-
processFiles
public String processFiles()
Processes the results files of the algorithms in each directory.- Returns:
- If all the files were processed correctly it returns an empty string, else return the problem file.
-
getAlgNames
public LinkedList<String> getAlgNames()
Returns the name of the algorithms.- Returns:
- a LinkedList with the name of the algorithms.
-
getMeasures
public LinkedList<String> getMeasures()
Returns the common measures to all algorithms.- Returns:
- a LinkedList with the measures.
-
getStream
public LinkedList<String> getStream()
Returns the name of the streams.- Returns:
- a LinkedList with the streams.
-
getAlgShortNames
public ArrayList<String> getAlgShortNames()
Returns the short name of the algorithms.- Returns:
- an ArrayList with the short name of the algorithms.
-
getPath
public String getPath()
Returns the path of the results.- Returns:
- the path of the results.
-
setPath
public void setPath(String path)
Sets the directory of the results file.- Parameters:
path
-
-
deleteDrectory
public static void deleteDrectory(File directory)
Delete the selected directory.- Parameters:
directory
-
-
readCSV
public static ArrayList<String[]> readCSV(String path) throws UnsupportedEncodingException, FileNotFoundException, IOException
Allow to read a csv file.- Parameters:
path
-- Returns:
- Throws:
UnsupportedEncodingException
FileNotFoundException
IOException
-
-