01: package com.rimfaxe.xml.xmlreader.xpath;
02:
03: /**
04: * Add functionality to ubclasses of NodeTest. This is a participant
05: * in the Visitor Pattern [Gamma et al, #331]. You pass a visitor to
06: * the XPath.accept method which then passes it to all the nodes on
07: * the parse tree, each one of which calls back one of the visitor's
08: * visit methods.
09:
10: <blockquote><small> Copyright (C) 2002 Hewlett-Packard Company.
11: This file is part of Sparta, an XML Parser, DOM, and XPath library.
12: This library is free software; you can redistribute it and/or
13: modify it under the terms of the <a href="doc-files/LGPL.txt">GNU
14: Lesser General Public License</a> as published by the Free Software
15: Foundation; either version 2.1 of the License, or (at your option)
16: any later version. This library is distributed in the hope that it
17: will be useful, but WITHOUT ANY WARRANTY; without even the implied
18: warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
19: PURPOSE. </small></blockquote>
20: @version $Date: 2002/12/05 04:34:38 $ $Revision: 1.4 $
21: @author Eamonn O'Brien-Strain
22: * @stereotype visitor
23: */
24: public interface NodeTestVisitor {
25:
26: void visit(AllElementTest a);
27:
28: void visit(ThisNodeTest a);
29:
30: void visit(ParentNodeTest a) throws XPathException;
31:
32: void visit(ElementTest a);
33:
34: void visit(AttrTest a);
35:
36: void visit(TextTest a);
37:
38: }
|