org.apache.jetspeed.page.document.proxy
Class NodeSetImpl

java.lang.Object
  extended by org.apache.jetspeed.page.document.proxy.NodeSetImpl
All Implemented Interfaces:
NodeSet

public class NodeSetImpl
extends java.lang.Object
implements NodeSet

This class implements generic NodeSet ordered lists used with proxied instances of PSML Folders to create a logical view of site content.

Version:
$Id: NodeSetImpl.java 552972 2007-07-03 20:42:07Z taylor $
Author:
Randy Watler

Constructor Summary
NodeSetImpl(java.util.List nodes)
          NodeSetImpl - construct immutable proxy Node NodeSet list
 
Method Summary
 void add(Node node)
          add - adds specified proxyNode to the ordered NodeSet list
 boolean contains(Node node)
          contains - test named Node proxy for existance in NodeSet list
 NodeSet exclusiveSubset(java.lang.String regex)
          exclusiveSubset - construct new NodeSet containing Node proxies whose name or path does not match the specified regex pattern
 Node get(java.lang.String name)
          get - return proxy Node by name or path
 NodeSet inclusiveSubset(java.lang.String regex)
          inclusiveSubset - construct new NodeSet containing Node proxies whose name or path matches the specified regex pattern
 boolean isEmpty()
          isEmpty - returns flag indicationg whether NodeSet list is empty or not
 java.util.Iterator iterator()
          iterator - return iterator over ordered list
 int size()
          size - return size of NodeSet list
 NodeSet subset(java.lang.String type)
          subset - construct new NodeSet containing Node proxies of the specified type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeSetImpl

public NodeSetImpl(java.util.List nodes)
NodeSetImpl - construct immutable proxy Node NodeSet list

Parameters:
nodes - list of proxy Nodes
Method Detail

get

public Node get(java.lang.String name)
get - return proxy Node by name or path

Specified by:
get in interface NodeSet
Parameters:
name - node name
Returns:
Node proxy

iterator

public java.util.Iterator iterator()
iterator - return iterator over ordered list

Specified by:
iterator in interface NodeSet
Returns:
proxy NodeSet list iterator

subset

public NodeSet subset(java.lang.String type)
subset - construct new NodeSet containing Node proxies of the specified type

Specified by:
subset in interface NodeSet
Parameters:
type - node type
Returns:
proxy NodeSet list

inclusiveSubset

public NodeSet inclusiveSubset(java.lang.String regex)
inclusiveSubset - construct new NodeSet containing Node proxies whose name or path matches the specified regex pattern

Specified by:
inclusiveSubset in interface NodeSet
Parameters:
regex - proxy Node name/path match pattern
Returns:
proxy NodeSet list

exclusiveSubset

public NodeSet exclusiveSubset(java.lang.String regex)
exclusiveSubset - construct new NodeSet containing Node proxies whose name or path does not match the specified regex pattern

Specified by:
exclusiveSubset in interface NodeSet
Parameters:
regex - proxy Node name/path match pattern
Returns:
proxy NodeSet list

size

public int size()
size - return size of NodeSet list

Specified by:
size in interface NodeSet
Returns:
size of list

contains

public boolean contains(Node node)
contains - test named Node proxy for existance in NodeSet list

Specified by:
contains in interface NodeSet
Parameters:
node - proxy Node
Returns:
Node proxy

isEmpty

public boolean isEmpty()
isEmpty - returns flag indicationg whether NodeSet list is empty or not

Specified by:
isEmpty in interface NodeSet
Returns:
empty flag

add

public void add(Node node)
add - adds specified proxyNode to the ordered NodeSet list

Specified by:
add in interface NodeSet
Parameters:
node - proxy Node


Copyright © 1999-2009 Apache Software Foundation. All Rights Reserved.