Source Code Cross Referenced for XPathVisitor.java in  » XML » xalan » org » apache » xpath » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML » xalan » org.apache.xpath 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2002-2004 The Apache Software Foundation.
003:         *
004:         * Licensed under the Apache License, Version 2.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         *
008:         *     http://www.apache.org/licenses/LICENSE-2.0
009:         *
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:        /*
017:         * $Id: XPathVisitor.java,v 1.4 2004/02/17 04:30:02 minchau Exp $
018:         */
019:        package org.apache.xpath;
020:
021:        import org.apache.xpath.axes.LocPathIterator;
022:        import org.apache.xpath.axes.UnionPathIterator;
023:        import org.apache.xpath.functions.Function;
024:        import org.apache.xpath.objects.XNumber;
025:        import org.apache.xpath.objects.XString;
026:        import org.apache.xpath.operations.Operation;
027:        import org.apache.xpath.operations.UnaryOperation;
028:        import org.apache.xpath.operations.Variable;
029:        import org.apache.xpath.patterns.NodeTest;
030:        import org.apache.xpath.patterns.StepPattern;
031:        import org.apache.xpath.patterns.UnionPattern;
032:
033:        /**
034:         * A derivation from this class can be passed to a class that implements 
035:         * the XPathVisitable interface, to have the appropriate method called 
036:         * for each component of the XPath.  Aside from possible other uses, the 
037:         * main intention is to provide a reasonable means to perform expression 
038:         * rewriting.
039:         * 
040:         * <p>Each method has the form 
041:         * <code>boolean visitComponentType(ExpressionOwner owner, ComponentType compType)</code>. 
042:         * The ExpressionOwner argument is the owner of the component, and can 
043:         * be used to reset the expression for rewriting.  If a method returns 
044:         * false, the sub hierarchy will not be traversed.</p>
045:         * 
046:         * <p>This class is meant to be a base class that will be derived by concrete classes, 
047:         * and doesn't much except return true for each method.</p>
048:         */
049:        public class XPathVisitor {
050:            /**
051:             * Visit a LocationPath.
052:             * @param owner The owner of the expression, to which the expression can 
053:             *              be reset if rewriting takes place.
054:             * @param path The LocationPath object.
055:             * @return true if the sub expressions should be traversed.
056:             */
057:            public boolean visitLocationPath(ExpressionOwner owner,
058:                    LocPathIterator path) {
059:                return true;
060:            }
061:
062:            /**
063:             * Visit a UnionPath.
064:             * @param owner The owner of the expression, to which the expression can 
065:             *              be reset if rewriting takes place.
066:             * @param path The UnionPath object.
067:             * @return true if the sub expressions should be traversed.
068:             */
069:            public boolean visitUnionPath(ExpressionOwner owner,
070:                    UnionPathIterator path) {
071:                return true;
072:            }
073:
074:            /**
075:             * Visit a step within a location path.
076:             * @param owner The owner of the expression, to which the expression can 
077:             *              be reset if rewriting takes place.
078:             * @param step The Step object.
079:             * @return true if the sub expressions should be traversed.
080:             */
081:            public boolean visitStep(ExpressionOwner owner, NodeTest step) {
082:                return true;
083:            }
084:
085:            /**
086:             * Visit a predicate within a location path.  Note that there isn't a 
087:             * proper unique component for predicates, and that the expression will 
088:             * be called also for whatever type Expression is.
089:             * 
090:             * @param owner The owner of the expression, to which the expression can 
091:             *              be reset if rewriting takes place.
092:             * @param pred The predicate object.
093:             * @return true if the sub expressions should be traversed.
094:             */
095:            public boolean visitPredicate(ExpressionOwner owner, Expression pred) {
096:                return true;
097:            }
098:
099:            /**
100:             * Visit a binary operation.
101:             * @param owner The owner of the expression, to which the expression can 
102:             *              be reset if rewriting takes place.
103:             * @param op The operation object.
104:             * @return true if the sub expressions should be traversed.
105:             */
106:            public boolean visitBinaryOperation(ExpressionOwner owner,
107:                    Operation op) {
108:                return true;
109:            }
110:
111:            /**
112:             * Visit a unary operation.
113:             * @param owner The owner of the expression, to which the expression can 
114:             *              be reset if rewriting takes place.
115:             * @param op The operation object.
116:             * @return true if the sub expressions should be traversed.
117:             */
118:            public boolean visitUnaryOperation(ExpressionOwner owner,
119:                    UnaryOperation op) {
120:                return true;
121:            }
122:
123:            /**
124:             * Visit a variable reference.
125:             * @param owner The owner of the expression, to which the expression can 
126:             *              be reset if rewriting takes place.
127:             * @param var The variable reference object.
128:             * @return true if the sub expressions should be traversed.
129:             */
130:            public boolean visitVariableRef(ExpressionOwner owner, Variable var) {
131:                return true;
132:            }
133:
134:            /**
135:             * Visit a function.
136:             * @param owner The owner of the expression, to which the expression can 
137:             *              be reset if rewriting takes place.
138:             * @param func The function reference object.
139:             * @return true if the sub expressions should be traversed.
140:             */
141:            public boolean visitFunction(ExpressionOwner owner, Function func) {
142:                return true;
143:            }
144:
145:            /**
146:             * Visit a match pattern.
147:             * @param owner The owner of the expression, to which the expression can 
148:             *              be reset if rewriting takes place.
149:             * @param pattern The match pattern object.
150:             * @return true if the sub expressions should be traversed.
151:             */
152:            public boolean visitMatchPattern(ExpressionOwner owner,
153:                    StepPattern pattern) {
154:                return true;
155:            }
156:
157:            /**
158:             * Visit a union pattern.
159:             * @param owner The owner of the expression, to which the expression can 
160:             *              be reset if rewriting takes place.
161:             * @param pattern The union pattern object.
162:             * @return true if the sub expressions should be traversed.
163:             */
164:            public boolean visitUnionPattern(ExpressionOwner owner,
165:                    UnionPattern pattern) {
166:                return true;
167:            }
168:
169:            /**
170:             * Visit a string literal.
171:             * @param owner The owner of the expression, to which the expression can 
172:             *              be reset if rewriting takes place.
173:             * @param str The string literal object.
174:             * @return true if the sub expressions should be traversed.
175:             */
176:            public boolean visitStringLiteral(ExpressionOwner owner, XString str) {
177:                return true;
178:            }
179:
180:            /**
181:             * Visit a number literal.
182:             * @param owner The owner of the expression, to which the expression can 
183:             *              be reset if rewriting takes place.
184:             * @param num The number literal object.
185:             * @return true if the sub expressions should be traversed.
186:             */
187:            public boolean visitNumberLiteral(ExpressionOwner owner, XNumber num) {
188:                return true;
189:            }
190:
191:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.