org.n52.security.common.xml
Class DocumentVisitorAdapter

java.lang.Object
  extended by org.n52.security.common.xml.DocumentVisitorAdapter
All Implemented Interfaces:
DocumentVisitor, org.w3c.dom.traversal.NodeFilter

public class DocumentVisitorAdapter
extends Object
implements DocumentVisitor

Implements a DocumentVisitor and delegates the untyped visit(Node) methods to typed methods, like visit(Element).

Thats a support class, which makes it very easy to implement visitors reacting on special node types.

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
 
Constructor Summary
DocumentVisitorAdapter()
           
 
Method Summary
 short acceptNode(Node n)
          Accepts all node types.
 void postVisit(Attr attr)
           
 void postVisit(CDATASection cdata)
           
 void postVisit(Comment comment)
           
 void postVisit(Document document)
           
 void postVisit(DocumentFragment docFrag)
           
 void postVisit(DocumentType docType)
           
 void postVisit(Element element)
           
 void postVisit(Entity entity)
           
 void postVisit(EntityReference entityRef)
           
 void postVisit(Node node)
          Method post visits a node.
 void postVisit(Notation notation)
           
 void postVisit(ProcessingInstruction processingInstruction)
           
 void postVisit(Text text)
           
 void preVisit(Attr attr)
           
 void preVisit(CDATASection cdata)
           
 void preVisit(Comment comment)
           
 void preVisit(Document document)
           
 void preVisit(DocumentFragment docFrag)
           
 void preVisit(DocumentType docType)
           
 void preVisit(Element element)
           
 void preVisit(Entity entity)
           
 void preVisit(EntityReference entityRef)
           
 void preVisit(Node node)
          Method pre visits a node.
 void preVisit(Notation notation)
           
 void preVisit(ProcessingInstruction processingInstruction)
           
 void preVisit(Text text)
           
 void visit(Attr attr)
           
 void visit(CDATASection cdata)
           
 void visit(Comment comment)
           
 void visit(Document document)
           
 void visit(DocumentFragment docFrag)
           
 void visit(DocumentType docType)
           
 void visit(Element element)
           
 void visit(Entity entity)
           
 void visit(EntityReference entityRef)
           
 void visit(Node node)
          Method visits a node.
 void visit(Notation notation)
           
 void visit(ProcessingInstruction processingInstruction)
           
 void visit(Text text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentVisitorAdapter

public DocumentVisitorAdapter()
Method Detail

visit

public void visit(Node node)
Description copied from interface: DocumentVisitor
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.

Specified by:
visit in interface DocumentVisitor
Parameters:
node - the node.

preVisit

public void preVisit(Node node)
Description copied from interface: DocumentVisitor
Method pre visits a node. It is called if the DocumentTraverser first time visits the node. Only invoked in depth first traversals.

Specified by:
preVisit in interface DocumentVisitor
Parameters:
node - the node.

postVisit

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

Specified by:
postVisit in interface DocumentVisitor
Parameters:
node - the node.

acceptNode

public short acceptNode(Node n)
Accepts all node types.

Specified by:
acceptNode in interface org.w3c.dom.traversal.NodeFilter

postVisit

public void postVisit(Element element)

postVisit

public void postVisit(Attr attr)

postVisit

public void postVisit(CDATASection cdata)

postVisit

public void postVisit(Text text)

postVisit

public void postVisit(Comment comment)

postVisit

public void postVisit(DocumentType docType)

postVisit

public void postVisit(Document document)

postVisit

public void postVisit(DocumentFragment docFrag)

postVisit

public void postVisit(Entity entity)

postVisit

public void postVisit(EntityReference entityRef)

postVisit

public void postVisit(ProcessingInstruction processingInstruction)

postVisit

public void postVisit(Notation notation)

preVisit

public void preVisit(Attr attr)

preVisit

public void preVisit(CDATASection cdata)

preVisit

public void preVisit(Text text)

preVisit

public void preVisit(Comment comment)

preVisit

public void preVisit(DocumentType docType)

preVisit

public void preVisit(Document document)

preVisit

public void preVisit(DocumentFragment docFrag)

preVisit

public void preVisit(Element element)

preVisit

public void preVisit(Entity entity)

preVisit

public void preVisit(EntityReference entityRef)

preVisit

public void preVisit(ProcessingInstruction processingInstruction)

preVisit

public void preVisit(Notation notation)

visit

public void visit(Attr attr)

visit

public void visit(CDATASection cdata)

visit

public void visit(Text text)

visit

public void visit(Comment comment)

visit

public void visit(DocumentType docType)

visit

public void visit(Document document)

visit

public void visit(DocumentFragment docFrag)

visit

public void visit(Element element)

visit

public void visit(Entity entity)

visit

public void visit(EntityReference entityRef)

visit

public void visit(ProcessingInstruction processingInstruction)

visit

public void visit(Notation notation)


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