Package eu.scape_project.planning.xml

Examples of eu.scape_project.planning.xml.PlanParser


public class PlanStatisticTest {

    @Test
    public void testSinglePlanFromFile() throws PlatoException, IOException {
        PlanParser parser = new PlanParser();

        InputStream in = Thread.currentThread().getContextClassLoader()
            .getResourceAsStream("plans/PlanParserTest/PlanParserTest-PLAN_VALIDATED-minimal.xml");

        File userDir = FileUtils.getUserDirectory();
        File outFile = new File(userDir, "statistics.csv");
        Writer writer = new FileWriter(outFile);
        PlanStatisticsGenerator statistics = new PlanStatisticsGenerator(writer, null);

        List<Plan> plans = parser.importProjects(in);
        for (Iterator<Plan> iter = plans.iterator(); iter.hasNext();) {
            statistics.writeStatistics(iter.next());
        }
        statistics.endReport();
        System.out.printf("Statistics written to : %s", outFile.getAbsolutePath());
View Full Code Here


        System.out.printf("Statistics written to : %s", outFile.getAbsolutePath());
    }

    @Test
    public void testStageSinglePlanFromFile() throws PlatoException, IOException {
        PlanParser parser = new PlanParser();

        InputStream in = Thread.currentThread().getContextClassLoader()
            .getResourceAsStream("plans/Digital_Preservation_of_Video_Games_DOS.xml");

        File userDir = FileUtils.getUserDirectory();
        File outFile = new File(userDir, "stage-statistics.csv");
        Writer writer = new FileWriter(outFile);
        StateChangeLogGenerator statistics = new StateChangeLogGenerator(writer, null);

        List<Plan> plans = parser.importProjects(in);
        for (Iterator<Plan> iter = plans.iterator(); iter.hasNext();) {
            statistics.writeStatistics(iter.next());
        }
        statistics.endReport();
        System.out.printf("Statistics written to : %s", outFile.getAbsolutePath());
View Full Code Here

public class QLDGeneratorTest {

    @Test
    public void generateQLDsBasedOnPlan() throws Exception{
        PlanParser  planParser = new PlanParser();
        List<Plan> plans = planParser.importProjects(getClass().getClassLoader().getResourceAsStream("qld/plan.xml"));
        assertNotNull(plans);
        assertEquals(1, plans.size());
       
        Plan plan = plans.get(0);
View Full Code Here

TOP

Related Classes of eu.scape_project.planning.xml.PlanParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.