Package eu.scape_project.planning.model

Examples of eu.scape_project.planning.model.Plan


     * @param planId
     *            the plan ID
     * @return the loaded plan
     */
    public Plan loadPlan(int planId) {
        Plan plan = em.find(Plan.class, planId);

        this.initializePlan(plan);
        return plan;
    }
View Full Code Here


        }
        // then load the plan
        Object result = em.createQuery("select p.id from Plan p where p.planProperties.id = " + propertyId)
            .getSingleResult();
        if (result != null) {
            Plan plan = loadPlan((Integer) result);
            plan.setReadOnly(readOnly);
            log.info("Plan {} : {} loaded.", propertyId, plan.getPlanProperties().getName());
            return plan;
        } else {
            throw new PlanningException("An unexpected error has occured while loading the plan.");
        }
    }
View Full Code Here

            List<Plan> plans = null;
            do {
                qry.setFirstResult(first);
                plans = qry.getResultList();
                for (Iterator<Plan> iter = plans.iterator(); iter.hasNext();) {
                    Plan p = iter.next();
                    if (p != null) {
                        try {
                            writeStatistics(p);
                        } catch (Exception e) {
                            LOGGER.error("failed to generate statistic for: " + p.getId(), e);
                        }
                    }
                }
                first += step;
            } while ((plans != null) && (!plans.isEmpty()));
View Full Code Here

            .getResourceAsStream("plans/PlanParserTest/PlanParserTest-PLAN_VALIDATED-minimal.xml");

        List<Plan> plans = parser.importProjects(in);

        Assert.assertTrue(plans.size() == 1);
        Plan plan = plans.get(0);

        // Parse original
        InputStream importedStream = Thread.currentThread().getContextClassLoader()
            .getResourceAsStream("plans/PlanParserTest/PlanParserTest-PLAN_VALIDATED-minimal.xml");
        Document original = parsePlan(importedStream);
View Full Code Here

            .getResourceAsStream("plans/PlanParserTest/PlanParserTest-PLAN_VALIDATED-ProfileSamplesPAP.xml");

        List<Plan> plans = parser.importProjects(in);

        Assert.assertTrue(plans.size() == 1);
        Plan plan = plans.get(0);

        // Parse original
        InputStream importedStream = Thread.currentThread().getContextClassLoader()
            .getResourceAsStream("plans/PlanParserTest/PlanParserTest-PLAN_VALIDATED-ProfileSamplesPAP.xml");
        Document original = parsePlan(importedStream);
View Full Code Here

        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);

        QLDGenerator qldGen = new QLDGenerator();
       
        qldGen.generateQLD(plan);
        String qlds = qldGen.getQLDs();
View Full Code Here

TOP

Related Classes of eu.scape_project.planning.model.Plan

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.