Package javax.jcr
Interface ItemVisitor
- All Known Implementing Classes:
ChildrenCollector,ChildrenCollectorFilter,FilteringItemVisitor,TraversingItemVisitor,TraversingItemVisitor.Default
public interface ItemVisitor
This interface defines two signatures of the
visit method; one
taking a Node, the other a Property. When an object
implementing this interface is passed to Item.accept(ItemVisitor visitor) the appropriate visit method is automatically
called, depending on whether the Item in question is a
Node or a Property. Different implementations of
this interface can be written for different purposes. It is, for example,
possible for the visit(Node node) method to call
accept on the children of the passed node and thus recurse
through the tree performing some operation on each Item.-
Method Summary
-
Method Details
-
visit
This method is called when theItemVisitoris passed to theacceptmethod of aProperty. If this method throws an exception the visiting process is aborted.- Parameters:
property- ThePropertythat is accepting this visitor.- Throws:
RepositoryException- if an error occurs
-
visit
This method is called when theItemVisitoris passed to theacceptmethod of aNode. If this method throws an exception the visiting process is aborted.- Parameters:
node- TheNodeinvalid input: '<'/code that is accepting this visitor.- Throws:
RepositoryException- if an error occurs
-