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 java.lang.Object
implements DocumentVisitor

Class DocumentVisitorAdapter 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(org.w3c.dom.Node n)
          Method accepts all node types.
 void postVisit(org.w3c.dom.Attr attr)
          Method postVisit.
 void postVisit(org.w3c.dom.CDATASection cdata)
          Method postVisit.
 void postVisit(org.w3c.dom.Comment comment)
          Method postVisit.
 void postVisit(org.w3c.dom.Document document)
          Method postVisit.
 void postVisit(org.w3c.dom.DocumentFragment docFrag)
          Method postVisit.
 void postVisit(org.w3c.dom.DocumentType docType)
          Method postVisit.
 void postVisit(org.w3c.dom.Element element)
          Method postVisit.
 void postVisit(org.w3c.dom.Entity entity)
          Method postVisit.
 void postVisit(org.w3c.dom.EntityReference entityRef)
          Method postVisit.
 void postVisit(org.w3c.dom.Node node)
          Method post visits a node.
 void postVisit(org.w3c.dom.Notation notation)
          Method postVisit.
 void postVisit(org.w3c.dom.ProcessingInstruction processingInstruction)
          Method postVisit.
 void postVisit(org.w3c.dom.Text text)
          Method postVisit.
 void preVisit(org.w3c.dom.Attr attr)
          Method preVisit.
 void preVisit(org.w3c.dom.CDATASection cdata)
          Method preVisit.
 void preVisit(org.w3c.dom.Comment comment)
          Method preVisit.
 void preVisit(org.w3c.dom.Document document)
          Method preVisit.
 void preVisit(org.w3c.dom.DocumentFragment docFrag)
          Method preVisit.
 void preVisit(org.w3c.dom.DocumentType docType)
          Method preVisit.
 void preVisit(org.w3c.dom.Element element)
          Method preVisit.
 void preVisit(org.w3c.dom.Entity entity)
          Method preVisit.
 void preVisit(org.w3c.dom.EntityReference entityRef)
          Method preVisit.
 void preVisit(org.w3c.dom.Node node)
          Method pre visits a node.
 void preVisit(org.w3c.dom.Notation notation)
          Method preVisit.
 void preVisit(org.w3c.dom.ProcessingInstruction processingInstruction)
          Method preVisit.
 void preVisit(org.w3c.dom.Text text)
          Method preVisit.
 void visit(org.w3c.dom.Attr attr)
          Method visit.
 void visit(org.w3c.dom.CDATASection cdata)
          Method visit.
 void visit(org.w3c.dom.Comment comment)
          Method visit.
 void visit(org.w3c.dom.Document document)
          Method visit.
 void visit(org.w3c.dom.DocumentFragment docFrag)
          Method visit.
 void visit(org.w3c.dom.DocumentType docType)
          Method visit.
 void visit(org.w3c.dom.Element element)
          Method visit.
 void visit(org.w3c.dom.Entity entity)
          Method visit.
 void visit(org.w3c.dom.EntityReference entityRef)
          Method visit.
 void visit(org.w3c.dom.Node node)
          Method visits a node.
 void visit(org.w3c.dom.Notation notation)
          Method visit.
 void visit(org.w3c.dom.ProcessingInstruction processingInstruction)
          Method visit.
 void visit(org.w3c.dom.Text text)
          Method visit.
 
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(org.w3c.dom.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.
See Also:
DocumentVisitor.visit(Node)

preVisit

public void preVisit(org.w3c.dom.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.
See Also:
DocumentVisitor.preVisit(Node)

postVisit

public void postVisit(org.w3c.dom.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.
See Also:
DocumentVisitor.postVisit(Node)

acceptNode

public short acceptNode(org.w3c.dom.Node n)
Method accepts all node types.

Specified by:
acceptNode in interface org.w3c.dom.traversal.NodeFilter
Parameters:
n - the n.
Returns:
short.

postVisit

public void postVisit(org.w3c.dom.Element element)
Method postVisit.

Parameters:
element - the element.

postVisit

public void postVisit(org.w3c.dom.Attr attr)
Method postVisit.

Parameters:
attr - the attr.

postVisit

public void postVisit(org.w3c.dom.CDATASection cdata)
Method postVisit.

Parameters:
cdata - the cdata.

postVisit

public void postVisit(org.w3c.dom.Text text)
Method postVisit.

Parameters:
text - the text.

postVisit

public void postVisit(org.w3c.dom.Comment comment)
Method postVisit.

Parameters:
comment - the comment.

postVisit

public void postVisit(org.w3c.dom.DocumentType docType)
Method postVisit.

Parameters:
docType - the docType.

postVisit

public void postVisit(org.w3c.dom.Document document)
Method postVisit.

Parameters:
document - the document.

postVisit

public void postVisit(org.w3c.dom.DocumentFragment docFrag)
Method postVisit.

Parameters:
docFrag - the docFrag.

postVisit

public void postVisit(org.w3c.dom.Entity entity)
Method postVisit.

Parameters:
entity - the entity.

postVisit

public void postVisit(org.w3c.dom.EntityReference entityRef)
Method postVisit.

Parameters:
entityRef - the entityRef.

postVisit

public void postVisit(org.w3c.dom.ProcessingInstruction processingInstruction)
Method postVisit.

Parameters:
processingInstruction - the processingInstruction.

postVisit

public void postVisit(org.w3c.dom.Notation notation)
Method postVisit.

Parameters:
notation - the notation.

preVisit

public void preVisit(org.w3c.dom.Attr attr)
Method preVisit.

Parameters:
attr - the attr.

preVisit

public void preVisit(org.w3c.dom.CDATASection cdata)
Method preVisit.

Parameters:
cdata - the cdata.

preVisit

public void preVisit(org.w3c.dom.Text text)
Method preVisit.

Parameters:
text - the text.

preVisit

public void preVisit(org.w3c.dom.Comment comment)
Method preVisit.

Parameters:
comment - the comment.

preVisit

public void preVisit(org.w3c.dom.DocumentType docType)
Method preVisit.

Parameters:
docType - the docType.

preVisit

public void preVisit(org.w3c.dom.Document document)
Method preVisit.

Parameters:
document - the document.

preVisit

public void preVisit(org.w3c.dom.DocumentFragment docFrag)
Method preVisit.

Parameters:
docFrag - the docFrag.

preVisit

public void preVisit(org.w3c.dom.Element element)
Method preVisit.

Parameters:
element - the element.

preVisit

public void preVisit(org.w3c.dom.Entity entity)
Method preVisit.

Parameters:
entity - the entity.

preVisit

public void preVisit(org.w3c.dom.EntityReference entityRef)
Method preVisit.

Parameters:
entityRef - the entityRef.

preVisit

public void preVisit(org.w3c.dom.ProcessingInstruction processingInstruction)
Method preVisit.

Parameters:
processingInstruction - the processingInstruction.

preVisit

public void preVisit(org.w3c.dom.Notation notation)
Method preVisit.

Parameters:
notation - the notation.

visit

public void visit(org.w3c.dom.Attr attr)
Method visit.

Parameters:
attr - the attr.

visit

public void visit(org.w3c.dom.CDATASection cdata)
Method visit.

Parameters:
cdata - the cdata.

visit

public void visit(org.w3c.dom.Text text)
Method visit.

Parameters:
text - the text.

visit

public void visit(org.w3c.dom.Comment comment)
Method visit.

Parameters:
comment - the comment.

visit

public void visit(org.w3c.dom.DocumentType docType)
Method visit.

Parameters:
docType - the docType.

visit

public void visit(org.w3c.dom.Document document)
Method visit.

Parameters:
document - the document.

visit

public void visit(org.w3c.dom.DocumentFragment docFrag)
Method visit.

Parameters:
docFrag - the docFrag.

visit

public void visit(org.w3c.dom.Element element)
Method visit.

Parameters:
element - the element.

visit

public void visit(org.w3c.dom.Entity entity)
Method visit.

Parameters:
entity - the entity.

visit

public void visit(org.w3c.dom.EntityReference entityRef)
Method visit.

Parameters:
entityRef - the entityRef.

visit

public void visit(org.w3c.dom.ProcessingInstruction processingInstruction)
Method visit.

Parameters:
processingInstruction - the processingInstruction.

visit

public void visit(org.w3c.dom.Notation notation)
Method visit.

Parameters:
notation - the notation.


Copyright © 2004-2009 52north.org. All Rights Reserved.