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

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


           
            selectFragmentLibrary("Public Fragments");

           
            // outject name and description
            tempNode= new Node();
            tempNode.setName(selectedFragment.getName());
            tempNode.setDescription(selectedFragment.getDescription());
        }
        return null;
    }
View Full Code Here


     *
     * @see #selectFragmentForSaving(Object)
     */
    public String saveFragmentHere(Object object) {
        log.info("Saving " + selectedFragment + " to " + object);
        Node target = (Node) object;
        TreeNode clone = selectedFragment.clone();
       
        clone.setName(tempNode.getName());
        clone.setDescription(tempNode.getDescription());
       
        target.addChild(clone);
        clone.touchAll(user.getUsername()); // the newly added TreeNode should be touched.
        //FacesMessages.instance().add(FacesMessage.SEVERITY_INFO, "Successfully stored node \"" + selectedFragment.getName() + "\" into fragment library as a child node of \"" + ((Node) object).getName() + "\"");
       
        em.persist(em.merge(target));
        fragmentOperationCompleted();
View Full Code Here

        Leaf l = (Leaf) leaf;
        l.getParent().convertToNode(l);
    }

    public void convertToLeaf(Object node) {
        Node n = (Node) node;
        n.getParent().convertToLeaf(n);
    }
View Full Code Here

        // because the user wouldn't be able to leave this step: Going to 'Define
        // Basis' is not possible as the project hasn't been saved so far.
        //
        // We 'activate' the changed flag so that the user is asked to either
        // save the project or discard changes.
        TreeNode root = new Node();
        root.setName("Root");
        selectedPlan.getTree().setRoot(root);
       
        // ok - the selected project is free - unlock the old project
        unlockProject();
       
View Full Code Here

            //log.debug("hibernate initialising Transformer: " + leaf.getTransformer());
            for (Values value : leaf.getValueMap().values()) {
                Hibernate.initialize(value);
            }
        } else if (node instanceof Node) {
            Node recnode = (Node) node;
            Hibernate.initialize(node.getChildren());
            for (TreeNode newNode : recnode.getChildren()) {
                initializeNodeRec(newNode);
            }
        }
    }
View Full Code Here

        //
        // We 'activate' the changed flag so that the user is asked to either
        // save the project or discard changes.
        changed = "T";

        TreeNode root = new Node();
        root.setName("Root");
        selectedPlan.getTree().setRoot(root);

//        PolicyNode policyRoot = new PolicyNode();
//        policyRoot.setName("Policy");
//        selectedPlan.getProjectBasis().getPolicyTree().setRoot(policyRoot);
View Full Code Here

    /**
     * Attaches a new Leaf to the given object (which is, hopefully, a Node)
     */
    public void addLeaf(Object object) {
        if (object instanceof Node) {
            Node node = (Node) object;
            node.addChild(new Leaf());
            log.debug("Leaf added: to NODE");
            // this node has been changed()
            node.touch();
            expandNode(node);
        }
    }
View Full Code Here

    /**
     * Attaches a new Node to the given object (which is, hopefully, a Node)
     */
    public void addNode(Object object) {
        if (object instanceof Node) {
            Node node = (Node) object;
            node.addChild(new Node());
            // this node has been changed()
            node.touch();
            expandNode(node);
        }
    }
View Full Code Here

        Leaf l = (Leaf) leaf;
        l.getParent().convertToNode(l);
    }

    public void convertToLeaf(Object node) {
        Node n = (Node) node;
        n.getParent().convertToLeaf(n);
    }
View Full Code Here

TOP

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

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.