Package org.apache.jetspeed.page.document

Examples of org.apache.jetspeed.page.document.Node


        List subsetNodes = null;
        Pattern pattern = Pattern.compile(regex);
        Iterator nodesIter = nodes.iterator();
        while (nodesIter.hasNext())
        {
            Node node = (Node) nodesIter.next();
            if (pattern.matcher(node.getName()).matches() || pattern.matcher(node.getPath()).matches())
            {
                if (subsetNodes == null)
                {
                    subsetNodes = new ArrayList(nodes.size());
                }
View Full Code Here


        List subsetNodes = null;
        Pattern pattern = Pattern.compile(regex);
        Iterator nodesIter = nodes.iterator();
        while (nodesIter.hasNext())
        {
            Node node = (Node) nodesIter.next();
            if (!pattern.matcher(node.getName()).matches() && !pattern.matcher(node.getPath()).matches())
            {
                if (subsetNodes == null)
                {
                    subsetNodes = new ArrayList(nodes.size());
                }
View Full Code Here

                        // to new filteredNodes node set with same comparator
                        filteredNodes = new NodeSetImpl(null, ((NodeSetImpl) nodes).getComparator());
                        Iterator copyIter = nodes.iterator();
                        while (copyIter.hasNext())
                        {
                            Node copyNode = (Node)copyIter.next();
                            if (copyNode != node)
                            {
                                filteredNodes.add(copyNode);
                            }
                            else
View Full Code Here

            subsets.put(type, subset);

            Iterator nodeItr = nodes.values().iterator();
            while (nodeItr.hasNext())
            {
                Node node = (Node) nodeItr.next();
                if (node.getType().equals(type))
                {
                    subset.add(node);
                }
            }
        }
View Full Code Here

        NodeSetImpl subset = new NodeSetImpl(resolveToPath, comparator);
        final Pattern pattern = getPattern(regex);
        while (allNodes.hasNext())
        {
            Map.Entry entry = (Map.Entry) allNodes.next();
            Node node = (Node) entry.getValue();
            String key = (String) entry.getKey();
            if (!matches(pattern, key) && !matches(pattern, node.getName()))
            {
                subset.add(node);
            }
        }
       
View Full Code Here

        final Pattern pattern = getPattern(regex);
        while (allNodes.hasNext())
        {
            Map.Entry entry = (Map.Entry) allNodes.next();
            String key = (String) entry.getKey();
            Node node = (Node) entry.getValue();
            if (matches(pattern, key) || matches(pattern, node.getName()))
            {
                subset.add(node);
            }
        }
       
View Full Code Here

            // update folder documents
            NodeSet nodes = folderImpl.getAllNodes();
            Iterator nodesIter = nodes.iterator();
            while (nodesIter.hasNext())
            {
                Node node = (Node) nodesIter.next();
                if (node instanceof Page)
                {
                    updatePage((Page)node);
                }
                else if (node instanceof Link)
                {
                    updateLink((Link)node);
                }
                else if (node instanceof PageSecurity)
                {
                    updatePageSecurity((PageSecurity)node);
                }
            }

            // update folders last: breadth first recursion
            nodesIter = nodes.iterator();
            while (nodesIter.hasNext())
            {
                Node node = (Node) nodesIter.next();
                if (node instanceof Folder)
                {
                    updateFolder((Folder)node, true);
                }
            }
View Full Code Here

     */
    public void refresh( FileCacheEntry entry ) throws Exception
    {
        // file cache managed component refreshed:
        // notify page manager listeners
        Node refreshedNode = null;
        if (entry.getDocument() instanceof Node)
        {
            refreshedNode = (Node)entry.getDocument();
        }
        if (entry.getFile().exists())
View Full Code Here

    {
        this.nodes = new TreeMap(comparator);       
        Object[] nodeToCopy = nodes.toArray();
        for (int ix = 0; ix < nodeToCopy.length; ix++)
        {
            Node node = (Node)nodeToCopy[ix];
            if (!this.nodes.containsKey( node.getName()))
            {
                this.nodes.put(node.getName(), node);
            }
        }        
        this.comparator = comparator;
    }
View Full Code Here

    {
        NodeSetImpl subset = new NodeSetImpl(comparator);
        Iterator nodeItr = iterator();
        while (nodeItr.hasNext())
        {
            Node node = (Node) nodeItr.next();
            if (node.getType().equals(type))
            {
                subset.add(node);
            }
        }
        return subset;
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.page.document.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.