Examples of TreeNode


Examples of org.encog.ml.tree.TreeNode

    if( done ) {
      return false;
    }
   
    for(int i=0;i<node.getChildNodes().size();i++) {
      TreeNode childNode = node.getChildNodes().get(i);
      if( childNode==replaceThisNode) {
        node.getChildNodes().set(i, this.replaceWith);
        done = true;
        return false;
      }
View Full Code Here

Examples of org.erlide.tracing.core.mvc.model.treenodes.TreeNode

    // functions creating nodes

    private ITreeNode processDropTrace(final OtpErlangTuple tuple) {
        final OtpErlangLong amount = (OtpErlangLong) tuple.elementAt(1);
        final ITreeNode node = new TreeNode("Dropped traces: " + amount.longValue(),
                Activator.getImage(Images.DROP_NODE));
        return node;
    }
View Full Code Here

Examples of org.exoplatform.navigation.webui.TreeNode

            WebuiRequestContext context = event.getRequestContext();
            UIRightClickPopupMenu popupMenu = event.getSource();
            UINavigationNodeSelector uiNodeSelector = popupMenu.getAncestorOfType(UINavigationNodeSelector.class);

            String nodeID = event.getRequestContext().getRequestParameter(UIComponent.OBJECTID);
            TreeNode node = uiNodeSelector.findNode(nodeID);
            try {
                node = rebaseNode(node, uiNodeSelector);
                if (node == null)
                    return;
            } catch (NavigationServiceException ex) {
                handleError(ex.getError(), uiNodeSelector);
                return;
            }

            UIApplication uiApp = context.getUIApplication();
            UserPortalConfigService service = uiApp.getApplicationComponent(UserPortalConfigService.class);
            String pageId = node.getPageRef();
            // Page page = (pageId != null) ? service.getPage(pageId) : null;
            PageContext page = (pageId != null) ? service.getPageService().loadPage(PageKey.parse(pageId)) : null;
            if (page != null) {
                UserACL userACL = uiApp.getApplicationComponent(UserACL.class);
                if (!userACL.hasPermission(page)) {
                    uiApp.addMessage(new ApplicationMessage("UIPageBrowser.msg.UserNotPermission", new String[] { pageId }, 1));
                    return;
                }
            }

            if (node.getI18nizedLabels() == null) {
                uiNodeSelector.invokeI18NizedLabels(node);
            }

            UIPopupWindow uiManagementPopup = uiNodeSelector.getAncestorOfType(UIPopupWindow.class);
            UIPageNodeForm uiNodeForm = uiApp.createUIComponent(UIPageNodeForm.class, null, null);
            uiManagementPopup.setUIComponent(uiNodeForm);

            UserNavigation edittedNav = uiNodeSelector.getEdittedNavigation();
            uiNodeForm.setContextPageNavigation(edittedNav);
            uiNodeForm.setValues(node);
            uiNodeForm.setSelectedParent(node.getParent());
            uiManagementPopup.setWindowSize(800, 500);
            event.getRequestContext().addUIComponentToUpdateByAjax(uiManagementPopup.getParent());
        }
View Full Code Here

Examples of org.exoplatform.portal.webui.navigation.TreeNode

    private JSONArray getChildrenAsJSON(String nodeID) throws Exception {
        WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
        List<TreeNode> childs = null;

        UIPortalNavigation uiPortalNavigation = getChild(UIPortalNavigation.class);
        TreeNode tnode = uiPortalNavigation.getTreeNodes().findNodes(nodeID);
        if (tnode != null) {
            UserNode userNode = uiPortalNavigation.updateNode(tnode.getNode());
            if (userNode != null) {
                tnode.setExpanded(true);
                tnode.setChildren(userNode.getChildren());
                childs = tnode.getChildren();
            }
        }

        JSONArray jsChilds = new JSONArray();
        if (childs == null) {
View Full Code Here

Examples of org.gatein.management.gadget.mop.exportimport.client.TreeNode

            }

            ReadResourceModel result = (ReadResourceModel) response.getResult();
            List<TreeNode> children = new ArrayList<TreeNode>(result.getChildren().size());
            for (String siteName : result.getChildren()) {
                TreeNode siteNode = new TreeNode(siteName);
                siteNode.setExportable(true);
                siteNode.setType(siteType);
                siteNode.setSiteName(siteName);
                children.add(siteNode);
            }

            return new TreeNode(siteType, children);
        } catch (Exception e) {
            log.error("Exception getting site type " + siteType + " node.", e);
            throw e;
        }
    }
View Full Code Here

Examples of org.glassfish.flashlight.datatree.TreeNode

            //Return the sub-resource list of root nodes

            //FIXME - No MonitoringRuntimeDataRegistry API available to get hold of
            //all the root nodes. We need this in case of clustering. We need to
            //get hold of root nodes for all the server instances.
            TreeNode serverNode = monitoringRegistry.get("server");
            if (serverNode != null) {
                //check to make sure we do not display empty server resource
                //    - http://host:port/monitoring/domain/server
                //When you turn monitoring levels HIGH and then turn them OFF,
                //you may see empty server resource. This is because server tree
                //node has children (disabled) even when all the monitoring
                //levels are turned OFF.
                //Issue: 9921
                if (!serverNode.getEnabledChildNodes().isEmpty()) {
                    list.add(serverNode);
                }
                return list;
            } else {
                //No root node available, so nothing to list
                //FIXME - Return appropriate message to the user
                ///return Response.status(404).entity("No monitoring data. Please check monitoring levels are configured").build();
                return list;
            }
        }

        //ignore the starting slash
        if (path.startsWith("/")) {
            path = path.substring(1);
        }

        //replace all . with \.
        path = path.replaceAll("\\.", "\\\\.");

        String dottedName = path.replace('/', '.');

        String root;
        int index =  dottedName.indexOf('.');
        if (index != -1) {
            root = dottedName.substring(0, dottedName.indexOf('.'));
            dottedName = dottedName.substring(dottedName.indexOf('.') + 1 );
        } else {
            root = dottedName;
            dottedName = "";
        }

        //TreeNode rootNode = monitoringRegistry.get("server");
        TreeNode rootNode = monitoringRegistry.get(root);
        if (rootNode == null) {
            //No monitoring data, so nothing to list
            //FIXME - Return appropriate message to the user
            ///return Response.status(404).entity("No monitoring data. Please check monitoring levels are configured").build();
            return list;
        }

        TreeNode  currentNode;
        if (dottedName.length() > 0) {
            currentNode = rootNode.getNode(dottedName);
        } else {
            currentNode = rootNode;
        }


        if (currentNode == null) {
            //No monitoring data, so nothing to list
            return list;
            ///return Response.status(404).entity("Monitoring object not found").build();
        }

        if (currentNode.hasChildNodes()) {
            //print(currentNode.getChildNodes());
            //TreeNode.getChildNodes() is returning disabled nodes too.
            //Switching to new api TreeNode.getEnabledChildNodes() which returns
            //only the enabled nodes. Reference Issue: 9921
            list.addAll(currentNode.getEnabledChildNodes());
        } else {
            Object result = currentNode.getValue();
            System.out.println("result: " + result);
            list.add(currentNode);
        }
        return list;
    }
View Full Code Here

Examples of org.infinispan.tools.schema.TreeNode

         InputStream file = fl.lookupFile("schema/infinispan-config-" + Version.getMajorVersion() + ".xsd");
         XSOMParser reader = new XSOMParser();
         reader.parse(file);
         XSSchemaSet xss = reader.getResult();
         XSOMSchemaTreeWalker w = new XSOMSchemaTreeWalker(xss.getSchema(1), "infinispan");
         TreeNode root = w.getRoot();

         associateBeansWithTreeNodes(configBeans, root);

         TreeNode node = tw.findNode(root, "namedCache", "infinispan");
         node.detach();

         PruneTreeWalker ptw = new PruneTreeWalker("property");
         ptw.postOrderTraverse(root);

         sb.append("<div class=\"" + "source" + "\"><pre>");
View Full Code Here

Examples of org.jboss.cache.TreeNode

   {
      return CachedType.hasAnnotation(clazz, advisor, type);
   }

   private void createNode(Fqn fqn, GlobalTransaction tx) {
      TreeNode n, child_node;
      Object child_name;
      Fqn tmp_fqn=Fqn.ROOT;

      if(fqn == null) return;
         int treeNodeSize=fqn.size();
         n=cache_.getRoot();
         for(int i=0; i < treeNodeSize; i++) {
            child_name=fqn.get(i);
            tmp_fqn=new Fqn(tmp_fqn, child_name);
            child_node=n.getChild(child_name);
            if(child_node == null) {
               child_node=n.createChild(child_name, tmp_fqn, n);
               if(tx != null) {
                  MethodCall undo_op=MethodCallFactory.create(MethodDeclarations.removeNodeMethodLocal,
                                                    new Object[]{tx, tmp_fqn, Boolean.FALSE});
                  cache_.addUndoOperation(tx, undo_op);
               }
View Full Code Here

Examples of org.jboss.console.manager.interfaces.TreeNode

      String profile,
      ManageableResource resource)
   {
      try
      {
         TreeNode result = script.getTreeForResource (resource, pluginCtx);
         // result = fixUrls (result); // no really necessary now!
         return result;
      }
      catch (UndeclaredThrowableException ute)
      {
View Full Code Here

Examples of org.jboss.dashboard.ui.config.TreeNode

     */
    public void actionConfig(CommandRequest request) throws Exception {
        setShowingConfig(true);
        Tree tree = (Tree) Factory.lookup("org.jboss.dashboard.ui.config.ConfigurationTree");
        TreeStatus treeStatus = (TreeStatus) Factory.lookup("org.jboss.dashboard.ui.config.ConfigurationTreeStatus");
        TreeNode node = treeStatus.getLastEditedNode(tree);
        if (node != null) node.onEdit();
    }
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.