Gets the child nodes of the given site node.

@param siteNode the site node that will be used, must not be {@code null}
@return a {@code List} with the child nodes, never {@code null}
968438
private List<SiteNode> getChildren(SiteNode siteNode) {
		int childCount = siteNode.getChildCount();
		if (childCount == 0) {
			return Collections.emptyList();
		}

		List<SiteNode> children = new ArrayList<>(childCount);
		for (int i = 0; i < childCount; i++) {
			children.add((SiteNode) siteNode.getChildAt(i));
		}
		return children;
	}
1269200
public void nodeSelected(SiteNode node) {
		if (node != null) {
			siteModel.setSelectedItem(ScanPanel.cleanSiteName(node, true));
		}
	}
922763
public List<String> getRootChildren() {

        List<String> children = new ArrayList<String>();
        try {
            children = zk.getChildren("/", false);
        } catch (KeeperException e) {
            LOGGER.error(e.toString());
        } catch (InterruptedException e) {
            LOGGER.error(e.toString());
        }

        return children;
    }
1000104
function loadChildNodes(parentNode){
    if (gNodesWithChildren[parentNode._id]){
        var children = [];
        for (var i = 0; i < gNodesWithChildren[parentNode._id].length; ++i){
            var currentNode = gNodesWithChildren[parentNode._id][i];
            children.push({
                _id : currentNode._id, //todo : id instead of name?
                node : currentNode,
                parent : parentNode._id, //todo id instead of name?
                childNodes : loadChildNodes(currentNode)
            });
        }
        return children;
    }
}
71667
public Node<T> addChild(Node<T> child) {
        if (children == null) {
            children = new ArrayList<Node<T>>();
        }
        child.parent = this;
        children.add(child);

        return child;
    }
80424
public NodeList getAt(QName name) {
        NodeList answer = new NodeList();
        for (Object child : children()) {
            if (child instanceof Node) {
                Node childNode = (Node) child;
                Object childNodeName = childNode.name();
                if (name.matches(childNodeName)) {
                    answer.add(childNode);
                }
            }
        }
        return answer;
    }
285575
protected static List<SpecNode> getAllSpecNodes(final Level level) {
        final List<SpecNode> specNodes = new ArrayList<SpecNode>();

        for (final Node childNode : level.getChildNodes()) {
            if (childNode instanceof SpecNode) {
                specNodes.add((SpecNode) childNode);
            }

            if (childNode instanceof Level) {
                specNodes.addAll(getAllSpecNodes((Level) childNode));
            }
        }

        return specNodes;
    }
1270568
public static ArrayList<Element> getChildElements(Node node) {
        ArrayList<Element> childElements = new ArrayList<>();
        NodeList childNodes = node.getChildNodes();
        for (int i = 0; i < childNodes.getLength(); i++) {
            if (childNodes.item(i) instanceof Element) {
                childElements.add((Element) childNodes.item(i));
            }
        }
        return childElements;
    }
397059
@Override
    public Node getChildNode(String childNodeId)
    {
        NodeLink link = new NodeLink(getNodeId(), childNodeId);

        if (this.children == null)
        {
            return null;
        }
        else
        {
            return this.children.get(link);
        }
    }
1167001
public JTree getTreeSite() {
		if (treeSite == null) {
			treeSite = new JTree(new DefaultTreeModel(new DefaultMutableTreeNode()));
			treeSite.setShowsRootHandles(true);
			treeSite.setName("treeSite");
			treeSite.setToggleClickCount(1);

			// Force macOS L&F to query the row height from SiteMapTreeCellRenderer to hide the filtered nodes.
			// Other L&Fs hide the filtered nodes by default.
			LookAndFeel laf = UIManager.getLookAndFeel();
			if (laf != null && Constant.isMacOsX()
					&& UIManager.getSystemLookAndFeelClassName().equals(laf.getClass().getName())) {
				treeSite.setRowHeight(0);
			}

			treeSite.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() { 

				@Override
				public void valueChanged(javax.swing.event.TreeSelectionEvent e) {    

				    SiteNode node = (SiteNode) treeSite.getLastSelectedPathComponent();
				    if (node == null) {
				        return;
				    }
				    if (!node.isRoot()) {
				    	HttpMessage msg = null;
                        try {
                            msg = node.getHistoryReference().getHttpMessage();
                        } catch (Exception e1) {
                        	// ZAP: Log exceptions
                        	log.warn(e1.getMessage(), e1);
                            return;
                            
                        }

                        getView().displayMessage(msg);

			        	// ZAP: Call SiteMapListenners
			            for (SiteMapListener listener : listeners) {
			            	listener.nodeSelected(node);
			            }
				    } else {
				    	// ZAP: clear the views when the root is selected
				        getView().displayMessage(null);
				    }
	
				}
			});
	        treeSite.setComponentPopupMenu(new SitesCustomPopupMenu());

			// ZAP: Add custom tree cell renderer.
	        DefaultTreeCellRenderer renderer = new SiteMapTreeCellRenderer(listeners);
			treeSite.setCellRenderer(renderer);

			String deleteSiteNode = "zap.delete.sitenode";
			treeSite.getInputMap().put(getView().getDefaultDeleteKeyStroke(), deleteSiteNode);
			treeSite.getActionMap().put(deleteSiteNode, new AbstractAction() {

				private static final long serialVersionUID = 1L;

				@Override
				public void actionPerformed(ActionEvent e) {
					ExtensionHistory extHistory = Control.getSingleton().getExtensionLoader().getExtension(
							ExtensionHistory.class);
					if (extHistory == null || treeSite.getSelectionCount() == 0) {
						return;
					}

					int result = View.getSingleton().showConfirmDialog(Constant.messages.getString("sites.purge.warning"));
					if (result != JOptionPane.YES_OPTION) {
						return;
					}

					SiteMap siteMap = Model.getSingleton().getSession().getSiteTree();
					for (TreePath path : treeSite.getSelectionPaths()) {
						extHistory.purge(siteMap, (SiteNode) path.getLastPathComponent());
					}
				}
			});
		}
		return treeSite;
	}
481174
public TreeElement[] getChildren()
    {
        if (_children == null)
            return EMPTY_TREE;
        TreeElement results[] = new TreeElement[_children.size()];
        return (TreeElement[]) _children.toArray(results);
    }
750026
protected List<NodeData> getChildNodesData(final NodeData nodeData, boolean forcePersistentRead)
      throws RepositoryException
   {

      List<NodeData> childNodes = null;
      if (!forcePersistentRead && cache.isEnabled())
      {
         childNodes = cache.getChildNodes(nodeData);
         if (childNodes != null)
         {
            return childNodes;
         }
      }
      final DataRequest request = new DataRequest(nodeData.getIdentifier(), DataRequest.GET_NODES);

      try
      {
         request.start();
         if (!forcePersistentRead && cache.isEnabled())
         {
            // Try first to get the value from the cache since a
            // request could have been launched just before
            childNodes = cache.getChildNodes(nodeData);
            if (childNodes != null)
            {
               return childNodes;
            }
         }
         return executeAction(new PrivilegedExceptionAction<List<NodeData>>()
         {
            public List<NodeData> run() throws RepositoryException
            {
               List<NodeData> childNodes = CacheableWorkspaceDataManager.super.getChildNodesData(nodeData);
               if (cache.isEnabled())
               {
                  cache.addChildNodes(nodeData, childNodes);
               }

               return childNodes;
            }
         });
      }
      finally
      {
         request.done();
      }
   }
1143809
public Node getRoot(Node node)
  {

    Node root = null;

    while (node != null)
    {
      root = node;
      node = getParentOfNode(node);
    }

    return root;
  }
900610
public static Element getFirstChildElement(Node node) {
    	
    	if(node instanceof NestableNode) {
    		return ((NestableNode) node).getFirstElementChild();
    	}
        
        return null;
    }
1332223
public Collection<CallTreeNode> getChildren() {
		return children == null ? Collections.<CallTreeNode>emptyList() : children.values();
	}
152105
public List<CmsSitemapTreeNodeData> getChildren(CmsSitemapTreeNodeData nodeData) {

        CmsClientSitemapEntry entry = nodeData.getClientEntry();

        List<CmsSitemapTreeNodeData> result = Lists.newArrayList();

        try {
            CmsVfsSitemapService svc = getSitemapService();
            CmsClientSitemapEntry ent = svc.getChildren(m_root.getRootPath(), entry.getId(), 1);
            for (CmsClientSitemapEntry subEnt : ent.getSubEntries()) {
                if (subEnt.isInNavigation()
                    && ((subEnt.getDefaultFileId() != null) || subEnt.isNavigationLevelType())) {
                    try {
                        CmsUUID idToRead = subEnt.getId();
                        if (subEnt.getDefaultFileId() != null) {
                            idToRead = subEnt.getDefaultFileId();
                        }
                        Locale l1 = OpenCms.getLocaleManager().getDefaultLocale(
                            svc.getCmsObject(),
                            svc.getCmsObject().readResource(idToRead));
                        Locale l2 = OpenCms.getLocaleManager().getDefaultLocale(
                            svc.getCmsObject(),
                            svc.getCmsObject().readResource(ent.getId(), CmsResourceFilter.IGNORE_EXPIRATION));
                        if (!l1.equals(l2)) {
                            continue;
                        }
                    } catch (Exception e) {
                        LOG.error(e.getLocalizedMessage(), e);
                    }

                    CmsSitemapTreeNodeData data = new CmsSitemapTreeNodeData(
                        m_localeContext.getRootLocale(),
                        m_localeContext.getComparisonLocale());
                    if (m_foldersWithNoChildFolders.contains(subEnt.getId())) {
                        data.setHasNoChildren(true);
                    }
                    data.setClientEntry(subEnt);
                    try {
                        data.initialize(m_cms);
                        result.add(data);
                    } catch (Exception e) {
                        LOG.error(e.getLocalizedMessage());
                    }
                }
            }
        } catch (CmsException e) {
            LOG.error(e.getLocalizedMessage(), e);
        } catch (CmsRpcException e) {
            LOG.error(e.getLocalizedMessage(), e);

        }
        return result;
    }
771612
public NodeConfig getChildNodeByName(String name) {
		if (name == null) {
			throw new NullPointerException("Node name is null");
		}
		if (childrenNodes != null && childrenNodes.size() > 0) {
			for (NodeConfig childNode : childrenNodes) {
				if (childNode.getName().equals(name)) {
					return childNode;
				}
			}
		}
		return null;
	}