@Test public void importProjectsMinimalMainOjects() throws PlatoException { PlanParser parser = new PlanParser(); InputStream in = Thread.currentThread().getContextClassLoader() .getResourceAsStream("plans/PlanParserTest/PlanParserTest-PLAN_VALIDATED-minimal.xml"); List<Plan> plans = parser.importProjects(in); Assert.assertTrue(plans.size() == 1); Plan plan = plans.get(0); Assert.assertNotNull(plan.getPlanProperties()); Assert.assertNotNull(plan.getSampleRecordsDefinition()); Assert.assertNotNull(plan.getProjectBasis()); Assert.assertNotNull(plan.getRequirementsDefinition()); Assert.assertNotNull(plan.getTree()); Assert.assertNotNull(plan.getAlternativesDefinition()); Assert.assertNotNull(plan.getEvaluation()); Assert.assertNotNull(plan.getTransformation()); Assert.assertNotNull(plan.getImportanceWeighting()); Assert.assertNotNull(plan.getRecommendation()); Assert.assertNotNull(plan.getDecision()); Assert.assertNotNull(plan.getExecutablePlanDefinition()); Assert.assertNotNull(plan.getPreservationActionPlan()); Assert.assertNotNull(plan.getPlanDefinition()); Assert.assertNotNull(plan.getChangeLog()); Assert.assertTrue(plan.getChangeLog().getCreatedBy().equals("test1")); }
public List<Plan> importProjects(final String file) throws PlatoException { try { FileInputStream in = new FileInputStream(file); return importProjects(in); } catch (FileNotFoundException e) { throw new PlatoException("IMPORT FAILED: could not find file " + file, e); } }
PlanParser { public List<Plan> importProjects(final String file) throws PlatoException { try { FileInputStream in = new FileInputStream(file); return importProjects(in); } catch (FileNotFoundException e) { throw new PlatoException("IMPORT FAILED: could not find file " + file, e); } } }
PlanParser { public List<Plan> importProjects(final String file) throws PlatoException { try { FileInputStream in = new FileInputStream(file); return importProjects(in); } catch (FileNotFoundException e) { throw new PlatoException("IMPORT FAILED: could not find file " + file, e); } }  }
PlanParser { public List<Plan> importProjects(final String file) throws PlatoException { try { FileInputStream in = new FileInputStream(file); return importProjects(in); } catch (FileNotFoundException e) { throw new PlatoException("IMPORT FAILED: could not find file " + file, e); } }  List<Plan> importProjects(final String file); void setProject(final Plan p); void setTemplate(final TemplateTree t); List<TemplateTree> importTemplates(final InputStream in); List<Plan> importProjects(final InputStream in); }
PlanParser { public List<Plan> importProjects(final String file) throws PlatoException { try { FileInputStream in = new FileInputStream(file); return importProjects(in); } catch (FileNotFoundException e) { throw new PlatoException("IMPORT FAILED: could not find file " + file, e); } }  List<Plan> importProjects(final String file); void setProject(final Plan p); void setTemplate(final TemplateTree t); List<TemplateTree> importTemplates(final InputStream in); List<Plan> importProjects(final InputStream in);  }