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

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

public class NodeSetImpl
extends Object
implements org.apache.jetspeed.page.document.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

Field Summary
private  List nodes
          nodes - list of proxy nodes
 
Constructor Summary
NodeSetImpl(List nodes)
          NodeSetImpl - construct immutable proxy Node NodeSet list
 
Method Summary
 void add(org.apache.jetspeed.page.document.Node node)
          add - adds specified proxyNode to the ordered NodeSet list
 boolean contains(org.apache.jetspeed.page.document.Node node)
          contains - test named Node proxy for existance in NodeSet list
 org.apache.jetspeed.page.document.NodeSet exclusiveSubset(String regex)
          exclusiveSubset - construct new NodeSet containing Node proxies whose name or path does not match the specified regex pattern
 org.apache.jetspeed.page.document.Node get(String name)
          get - return proxy Node by name or path
 org.apache.jetspeed.page.document.NodeSet inclusiveSubset(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
 Iterator iterator()
          iterator - return iterator over ordered list
 int size()
          size - return size of NodeSet list
 org.apache.jetspeed.page.document.NodeSet subset(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
 

Field Detail

nodes

private List nodes
nodes - list of proxy nodes

Constructor Detail

NodeSetImpl

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

Parameters:
nodes - list of proxy Nodes
Method Detail

get

public org.apache.jetspeed.page.document.Node get(String name)
get - return proxy Node by name or path

Specified by:
get in interface org.apache.jetspeed.page.document.NodeSet
Parameters:
name - node name
Returns:
Node proxy

iterator

public Iterator iterator()
iterator - return iterator over ordered list

Specified by:
iterator in interface org.apache.jetspeed.page.document.NodeSet
Returns:
proxy NodeSet list iterator

subset

public org.apache.jetspeed.page.document.NodeSet subset(String type)
subset - construct new NodeSet containing Node proxies of the specified type

Specified by:
subset in interface org.apache.jetspeed.page.document.NodeSet
Parameters:
type - node type
Returns:
proxy NodeSet list

inclusiveSubset

public org.apache.jetspeed.page.document.NodeSet inclusiveSubset(String regex)
inclusiveSubset - construct new NodeSet containing Node proxies whose name or path matches the specified regex pattern

Specified by:
inclusiveSubset in interface org.apache.jetspeed.page.document.NodeSet
Parameters:
regex - proxy Node name/path match pattern
Returns:
proxy NodeSet list

exclusiveSubset

public org.apache.jetspeed.page.document.NodeSet exclusiveSubset(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 org.apache.jetspeed.page.document.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 org.apache.jetspeed.page.document.NodeSet
Returns:
size of list

contains

public boolean contains(org.apache.jetspeed.page.document.Node node)
contains - test named Node proxy for existance in NodeSet list

Specified by:
contains in interface org.apache.jetspeed.page.document.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 org.apache.jetspeed.page.document.NodeSet
Returns:
empty flag

add

public void add(org.apache.jetspeed.page.document.Node node)
add - adds specified proxyNode to the ordered NodeSet list

Specified by:
add in interface org.apache.jetspeed.page.document.NodeSet
Parameters:
node - proxy Node


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