public static PropertyIterator collectProperties(
Node node, String namePattern) throws RepositoryException {
Collection<Item> properties = new ArrayList<Item>();
node.accept(new ChildrenCollectorFilter(
namePattern, properties, false, true, 1));
return new PropertyIteratorAdapter(properties);
}