/*
import java.io.File;
import java.util.Locale;

import feat2.FeatTask;
import feat2.TemplateLoader;
import feat2.config.BasicFileLocator;
import feat2.config.FileLocator;
import feat2.config.newapi.ConfigReader;
import feat2.template.HTMLDocument;
import feat2.template.HTMLTemplate;
*/

public class Main {
    /*
    public static void main(String[] args) {
        Main m = new Main();

        try {
            m.loadConfig();
            //m.executeTask();
        }
        catch (Exception ex) {
            ex.printStackTrace();
        }
    }

    public void loadConfig() throws Exception {
        FileLocator config = new BasicFileLocator(new File("web/WEB-INF/feat-config.xml"));
        FileLocator app = new BasicFileLocator(new File("web"));
        FeatConfig conf = ConfigReader.parseFeatConfig(app, config);
        conf.validate();
        FeatureDeclaration feature = conf.getFeatureDeclaration("login");
        FeatureConfig featureConf = feature.getFeatureConfig();
        System.out.println("resource:"+featureConf.getFeatureDeclaration().getStringResource("error.auth", null));
        ResponseDeclaration responseDec = feature.getResponseDeclaration("index");
        if ( responseDec instanceof PageDeclaration ) {
            PageDeclaration pageDecl = (PageDeclaration)responseDec;
            FileLocator file = featureConf.getTemplateLocation().newLocation(pageDecl.getTemplateName());
            HTMLTemplate template = TemplateLoader.load(file, new Locale("ja", "JP"), null);
            HTMLDocument doc = template.getDocument();
        }

    }

    public void executeTask() {
        FeatTask task = new FeatTask();
        task.setAppdir(new File("web"));
        task.setDestdir(new File("gensrc"));
        task.execute();
    }
    */
}

