public NodeIterator getNodes(String namePattern) throws RepositoryException {
checkStatus();
ArrayList nodes = new ArrayList();
// traverse children using a special filtering item visitor
accept(new ChildrenCollectorFilter(namePattern, nodes, true, false, 1));
return new NodeIteratorAdapter(nodes);
}