org.n52.security.common.xml
Interface DocumentVisitor

All Superinterfaces:
org.w3c.dom.traversal.NodeFilter
All Known Implementing Classes:
DocumentVisitorAdapter

public interface DocumentVisitor
extends org.w3c.dom.traversal.NodeFilter

Encapsulates pieces of code processed while visiting a DOM tree.

This visitors typical used by clients in conjunction with the DocumentTraverser.

See Visitor Pattern for details about the common usage of visitors.

If you can express document changes in visitors, instead of xpath expressions use visitors, because they are much faster, because they traverse a document only once.

The pre/post methods are only called by the DocumentTraverser in the depth first traversal.

Version:
$Revision: $
Author:
Marko Reiprecht Created on 30.05.2008

Field Summary
 
Fields inherited from interface org.w3c.dom.traversal.NodeFilter
FILTER_ACCEPT, FILTER_REJECT, FILTER_SKIP, SHOW_ALL, SHOW_ATTRIBUTE, SHOW_CDATA_SECTION, SHOW_COMMENT, SHOW_DOCUMENT, SHOW_DOCUMENT_FRAGMENT, SHOW_DOCUMENT_TYPE, SHOW_ELEMENT, SHOW_ENTITY, SHOW_ENTITY_REFERENCE, SHOW_NOTATION, SHOW_PROCESSING_INSTRUCTION, SHOW_TEXT
 
Method Summary
 void postVisit(Node node)
          Method post visits a node.
 void preVisit(Node node)
          Method pre visits a node.
 void visit(Node node)
          Method visits a node.
 
Methods inherited from interface org.w3c.dom.traversal.NodeFilter
acceptNode
 

Method Detail

visit

void visit(Node node)
Method visits a node. It is called directly after the preVisit method in depth first traversals and the only method called in breadth first traversals.

Parameters:
node - the node.

preVisit

void preVisit(Node node)
Method pre visits a node. It is called if the DocumentTraverser first time visits the node. Only invoked in depth first traversals.

Parameters:
node - the node.

postVisit

void postVisit(Node node)
Method post visits a node. It is called if the DocumentTraverser has all childs af the node visited. Only invoked in depth first traversals.

Parameters:
node - the node.


Copyright © 2004–2014 52north.org. All rights reserved.