Package eu.planets_project.pp.plato.model.tree

Examples of eu.planets_project.pp.plato.model.tree.PolicyTree


   
    public void uploadFreemindTree() {
        if (organisationalPoliciesMindMap == null) {
            return;
        }
        PolicyTree newtree = null;
        try {
            InputStream istream = new ByteArrayInputStream(organisationalPoliciesMindMap);

            newtree = new TreeLoader().loadFreeMindPolicyTree(istream);
        } catch (Exception e) {
View Full Code Here


        } catch (SAXException e) {
            log.error("Document is not a valid Freemind file. Cause: " + e.getMessage());
            return null;
        }

        PolicyTree tree = new PolicyTree();
        tree.setRoot(map.getPolicyTreeRoot());
        return tree;
    }
View Full Code Here

    public String uploadPolicyMindMap() {

        if (policyMindMap == null) {
            return "";
        }
        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) {
            log.error("Cannot upload policy tree.");

            FacesMessages.instance().add(FacesMessage.SEVERITY_ERROR, "The uploaded file is not a valid Freemind mindmap. Maybe it is corrupted?");

            return null;
        }

        selectedPlan.getProjectBasis().getPolicyTree().setRoot(newtree.getRoot());

        return "";
    }
View Full Code Here

TOP

Related Classes of eu.planets_project.pp.plato.model.tree.PolicyTree

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.