/** * Create an iterator of the properties of all nodes of the sub-tree rooted * at <code>root</code>. Exceptions occurring on traversal are ignored. * * @param root root node of the sub-tree to traverse * @return iterator of {@link Property} */ public static Iterator<Property> propertyIterator(Node root) { return propertyIterator(root, ErrorHandler.IGNORE, InclusionPolicy.ALL); }
/** * Create an iterator of the properties of all nodes of the sub-tree rooted * at <code>root</code>. Exceptions occurring on traversal are ignored. * * @param root root node of the sub-tree to traverse * @return iterator of {@link Property} */ public static Iterator<Property> propertyIterator(Node root) { return propertyIterator(root, ErrorHandler.IGNORE, InclusionPolicy.ALL); }
/** * Create an iterator of the properties of all nodes of the sub-tree rooted * at <code>root</code>. Exceptions occurring on traversal are ignored. * * @param root root node of the sub-tree to traverse * @return iterator of {@link Property} */ public static Iterator<Property> propertyIterator(Node root) { return propertyIterator(root, ErrorHandler.IGNORE, InclusionPolicy.ALL); }
/** * Create an iterator of the properties for a given iterator of nodes. The * order of the returned properties is only specified so far that if node * <code>n1</code> occurs before node <code>n2</code> in the iterator of * nodes, then any property of <code>n1</code> will occur before any * property of <code>n2</code>. Exceptions occurring on traversal are * ignored. * * @param nodes nodes whose properties to chain * @return iterator of {@link Property} */ public static Iterator<Property> propertyIterator(Iterator<Node> nodes) { return propertyIterator(nodes, ErrorHandler.IGNORE, InclusionPolicy.ALL); }
/** * Create an iterator of the properties for a given iterator of nodes. The * order of the returned properties is only specified so far that if node * <code>n1</code> occurs before node <code>n2</code> in the iterator of * nodes, then any property of <code>n1</code> will occur before any * property of <code>n2</code>. Exceptions occurring on traversal are * ignored. * * @param nodes nodes whose properties to chain * @return iterator of {@link Property} */ public static Iterator<Property> propertyIterator(Iterator<Node> nodes) { return propertyIterator(nodes, ErrorHandler.IGNORE, InclusionPolicy.ALL); }
/** * Create an iterator of the properties for a given iterator of nodes. The * order of the returned properties is only specified so far that if node * <code>n1</code> occurs before node <code>n2</code> in the iterator of * nodes, then any property of <code>n1</code> will occur before any * property of <code>n2</code>. Exceptions occurring on traversal are * ignored. * * @param nodes nodes whose properties to chain * @return iterator of {@link Property} */ public static Iterator<Property> propertyIterator(Iterator<Node> nodes) { return propertyIterator(nodes, ErrorHandler.IGNORE, InclusionPolicy.ALL); }
/** * Create an iterator of the properties of all nodes of the sub-tree rooted * at <code>root</code>. * * @param root root node of the sub-tree to traverse * @param errorHandler handler for exceptions occurring on traversal * @param inclusionPolicy inclusion policy to determine which items to * include * @return iterator of {@link Property} */ public static Iterator<Property> propertyIterator(Node root, ErrorHandler errorHandler, InclusionPolicy<Item> inclusionPolicy) { return propertyIterator(nodeIterator(root, errorHandler, inclusionPolicy), errorHandler, inclusionPolicy); }
/** * Create an iterator of the properties of all nodes of the sub-tree rooted * at <code>root</code>. * * @param root root node of the sub-tree to traverse * @param errorHandler handler for exceptions occurring on traversal * @param inclusionPolicy inclusion policy to determine which items to * include * @return iterator of {@link Property} */ public static Iterator<Property> propertyIterator(Node root, ErrorHandler errorHandler, InclusionPolicy<Item> inclusionPolicy) { return propertyIterator(nodeIterator(root, errorHandler, inclusionPolicy), errorHandler, inclusionPolicy); }
/** * Create an iterator of the properties of all nodes of the sub-tree rooted * at <code>root</code>. * * @param root root node of the sub-tree to traverse * @param errorHandler handler for exceptions occurring on traversal * @param inclusionPolicy inclusion policy to determine which items to * include * @return iterator of {@link Property} */ public static Iterator<Property> propertyIterator(Node root, ErrorHandler errorHandler, InclusionPolicy<Item> inclusionPolicy) { return propertyIterator(nodeIterator(root, errorHandler, inclusionPolicy), errorHandler, inclusionPolicy); }
public Iterator<Property> iterator() { return TreeTraverser.propertyIterator(getNodeSequence().iterator(), errorHandler, inclusionPolicy); }
public Iterator<Property> iterator() { return TreeTraverser.propertyIterator(getNodeSequence().iterator(), errorHandler, inclusionPolicy); }
public Iterator<Property> iterator() { return TreeTraverser.propertyIterator(getNodeSequence().iterator(), errorHandler, inclusionPolicy); }
public void testTraverseProperties() throws RepositoryException { addNodes(testNode, nodes); addProperties(testNode, properties); Iterator<Node> nodeIt = TreeTraverser.nodeIterator(testNode); Iterator<Property> propertyIt = TreeTraverser.propertyIterator(nodeIt); checkProperties(propertyIt, properties.iterator(), testNode.getPath()); }
public void testTraversePropertiesEmpty() throws RepositoryException { Iterator<Node> nodeIt = TreeTraverser.nodeIterator(testNode); Iterator<Property> propertyIt = TreeTraverser.propertyIterator(nodeIt); checkProperties(propertyIt, Iterators.<String>empty(), testNode.getPath()); addNodes(testNode, nodes); checkProperties(propertyIt, Iterators.<String>empty(), testNode.getPath()); }