Package eu.planets_project.pp.plato.xml

Examples of eu.planets_project.pp.plato.xml.TreeLoader


        assert true;
    }

    @Test
    public void testImportXML()  {
        ObjectiveTree t = new TreeLoader().load("data/trees/pdfa.xml");
        TreeNode n = t.getRoot();
        assert "PDF/A".equals(n.getName());
        assert n instanceof Node;
        Node node = (Node) n;
        assert node.getChildren().size() == 4;
View Full Code Here


        assert node.getChildren().get(1).getWeight()==0.15;
    }

    @Test
    public void testProjectPersistence() {
        ObjectiveTree t = new TreeLoader().load("data/trees/pdfa.xml");
        Plan p = new Plan();
        p.getPlanProperties().setName("Plato-Testproject number");
        p.getPlanProperties().setAuthor("Christoph Becker");

        Decision d = new Decision();
View Full Code Here

        }
        PolicyTree newtree = null;
        try {
            InputStream istream = new ByteArrayInputStream(organisationalPoliciesMindMap);

            newtree = new TreeLoader().loadFreeMindPolicyTree(istream);
        } catch (Exception e) {
            log.error(e.getMessage(),e);
        }

        if (newtree == null) {
View Full Code Here

        log.debug("FileName: " + fileName);
        log.debug("Length of File: " + file.length);
        log.debug("HasUnits is: " + hasUnits.isBool());
        if (fileName.endsWith("mm")) {
             InputStream istream = new ByteArrayInputStream(this.file);
             ObjectiveTree newtree = new TreeLoader().loadFreeMindStream(
                  istream, this.hasUnits.isBool(), true);

            if (newtree == null) {
                log.debug("File is corrupted and new Tree cannot be built");
                FacesMessages.instance().add(FacesMessage.SEVERITY_ERROR, "This is not a valid Freemind file, maybe it is corrupted. Please make sure you added at least one level of nodes to the midmap.");
View Full Code Here

        }
        PolicyTree newtree = null;
        try {
            InputStream istream = new ByteArrayInputStream(policyMindMap.getData().getData());

            newtree = new TreeLoader().loadFreeMindPolicyTree(istream);
        } catch (Exception e) {
            log.error(e.getMessage(),e);
        }

        if (newtree == null) {
View Full Code Here

TOP

Related Classes of eu.planets_project.pp.plato.xml.TreeLoader

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.