gedi-geode-office/src/main/java/gedi/solutions/geode/office/StatsToChart.java
public Chart convert(File file)
	{
		if(file == null)
			return null;
		
		try
		{
			
			
		    if(file.isDirectory())
		    {
		    	//Process for all files
		    	Set<File> statsFiles = IO.listFileRecursive(file, "*.gfs");
		    	if(statsFiles == null || statsFiles.isEmpty())
		    		return null;
		    	
		    	for (File statFile : statsFiles)
				{
		    		GfStatsReader reader = new GfStatsReader(statFile.getAbsolutePath());
			    	
			    	reader.accept(visitor);
				}
		    }
		    else
		    {
		    	GfStatsReader reader = new GfStatsReader(file.getAbsolutePath());
		    	
		    	reader.accept(visitor);
		    	
		    }
			
			return visitor.getChart();
		}
		catch (IOException e)
		{
			throw new RuntimeException ("File:"+file+" ERROR:"+e.getMessage(),e);
		}
	}
public Chart convert(File file)
	{
		if(file == null)
			return null;
		
		try
		{
			
			
		    if(file.isDirectory())
		    {
		    	//Process for all files
		    	Set<File> statsFiles = IO.listFileRecursive(file, "*.gfs");
		    	if(statsFiles == null || statsFiles.isEmpty())
		    		return null;
		    	
		    	for (File statFile : statsFiles)
				{
		    		GfStatsReader reader = new GfStatsReader(statFile.getAbsolutePath());
			    	
			    	reader.accept(visitor);
				}
		    }
		    else
		    {
		    	GfStatsReader reader = new GfStatsReader(file.getAbsolutePath());
		    	
		    	reader.accept(visitor);
		    	
		    }
			
			return visitor.getChart();
		}
		catch (IOException e)
		{
			throw new RuntimeException ("File:"+file+" ERROR:"+e.getMessage(),e);
		}
	}
public Chart convert ( File file ) { if ( file == null ) return null ; try { if ( file . isDirectory ( ) ) { //Process for all files Set < File > statsFiles = IO . listFileRecursive ( file , "*.gfs" ) ; if ( statsFiles == null || statsFiles . isEmpty ( ) ) return null ; for ( File statFile : statsFiles ) { GfStatsReader reader = new GfStatsReader ( statFile . getAbsolutePath ( ) ) ; reader . accept ( visitor ) ; } } else { GfStatsReader reader = new GfStatsReader ( file . getAbsolutePath ( ) ) ; reader . accept ( visitor ) ; } return visitor . getChart ( ) ; } catch ( IOException e ) { throw new RuntimeException ( "File:" + file + " ERROR:" + e . getMessage ( ) , e ) ; } }
Accepts a file or directory contain the statistics files
@param file the file or directory
@return the chart for files
Accepts a file or directory contain the statistics files