Examples of PolicyTree


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

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

        } 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

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

    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

Examples of eu.scape_project.planning.model.tree.PolicyTree

        ceTrigger.setDescription("Changed environment description");
        triggers.setTrigger(ceTrigger);
        triggers.setTrigger(new Trigger(TriggerType.CHANGED_COLLECTION_PROFILE));
        basis.setTriggers(triggers);

        PolicyTree policyTree = new PolicyTree();
        PolicyNode root = new PolicyNode();
        root.setName("Root node");
        PolicyNode child1 = new PolicyNode();
        child1.setName("Child 1");
        child1.setParent(root);
        root.getChildren().add(child1);
        policyTree.setRoot(root);
        basis.setPolicyTree(policyTree);

        return basis;
    }
View Full Code Here

Examples of eu.scape_project.planning.model.tree.PolicyTree

     * @return
     */
    public PolicyTree loadFreeMindPolicyTree(InputStream in) {
        MindMap map = loadFreeMindMap(in);
        if (map != null) {
            PolicyTree tree = new PolicyTree();
            tree.setRoot(map.getPolicyTreeRoot());
            return tree;
        }
        return null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.