Show Teasite.java syntax highlighted
package net.time4tea.webstats.main;
import net.time4tea.webstats.site.SiteGenerator;
import net.time4tea.webstats.statistic.repo.DiskBasedStatisticMapRepository;
import net.time4tea.webstats.statistic.repo.SingleStatisticMapRepository;
import net.time4tea.webstats.statistic.repo.StatisticMapRepository;
import net.time4tea.webstats.util.FileHelper;
import java.io.File;
/**
* Originally richja 16-Jul-2007
*/
public class Teasite {
private StatisticMapRepository repository;
public Teasite(StatisticMapRepository repository) {
this.repository = repository;
}
public void generate() throws Exception {
File targetDirectory = new File("website");
FileHelper.recursivelyDelete(targetDirectory);
targetDirectory.mkdirs();
new SiteGenerator(repository).generateSite(targetDirectory);
}
public static void main(String[] args) throws Exception {
DiskBasedStatisticMapRepository ondisk = new DiskBasedStatisticMapRepository(new File("repository"));
StatisticMapRepository repository = new SingleStatisticMapRepository(ondisk);
// MonthlyStatisticMapRepository repository = new MonthlyStatisticMapRepository(simpleRepository);
Teasite teasite = new Teasite(repository);
teasite.generate();
}
}
See more files for this project here