Source Code Cross Referenced for Rule.java in  » Sevlet-Container » apache-tomcat-6.0.14 » org » apache » tomcat » util » digester » 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 » Sevlet Container » apache tomcat 6.0.14 » org.apache.tomcat.util.digester 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* $Id: Rule.java 467222 2006-10-24 03:17:11Z markt $
002:         *
003:         * Licensed to the Apache Software Foundation (ASF) under one or more
004:         * contributor license agreements.  See the NOTICE file distributed with
005:         * this work for additional information regarding copyright ownership.
006:         * The ASF licenses this file to You under the Apache License, Version 2.0
007:         * (the "License"); you may not use this file except in compliance with
008:         * the License.  You may obtain a copy of the License at
009:         * 
010:         *      http://www.apache.org/licenses/LICENSE-2.0
011:         * 
012:         * Unless required by applicable law or agreed to in writing, software
013:         * distributed under the License is distributed on an "AS IS" BASIS,
014:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015:         * See the License for the specific language governing permissions and
016:         * limitations under the License.
017:         */
018:
019:        package org.apache.tomcat.util.digester;
020:
021:        import org.xml.sax.Attributes;
022:
023:        /**
024:         * Concrete implementations of this class implement actions to be taken when
025:         * a corresponding nested pattern of XML elements has been matched.
026:         */
027:
028:        public abstract class Rule {
029:
030:            // ----------------------------------------------------------- Constructors
031:
032:            /**
033:             * Constructor sets the associated Digester.
034:             *
035:             * @param digester The digester with which this rule is associated
036:             * @deprecated The digester instance is now set in the {@link Digester#addRule} method. Use {@link #Rule()} instead.
037:             */
038:            public Rule(Digester digester) {
039:
040:                super ();
041:                setDigester(digester);
042:
043:            }
044:
045:            /**
046:             * <p>Base constructor.
047:             * Now the digester will be set when the rule is added.</p>
048:             */
049:            public Rule() {
050:            }
051:
052:            // ----------------------------------------------------- Instance Variables
053:
054:            /**
055:             * The Digester with which this Rule is associated.
056:             */
057:            protected Digester digester = null;
058:
059:            /**
060:             * The namespace URI for which this Rule is relevant, if any.
061:             */
062:            protected String namespaceURI = null;
063:
064:            // ------------------------------------------------------------- Properties
065:
066:            /**
067:             * Return the Digester with which this Rule is associated.
068:             */
069:            public Digester getDigester() {
070:
071:                return (this .digester);
072:
073:            }
074:
075:            /**
076:             * Set the <code>Digester</code> with which this <code>Rule</code> is associated.
077:             */
078:            public void setDigester(Digester digester) {
079:
080:                this .digester = digester;
081:
082:            }
083:
084:            /**
085:             * Return the namespace URI for which this Rule is relevant, if any.
086:             */
087:            public String getNamespaceURI() {
088:
089:                return (this .namespaceURI);
090:
091:            }
092:
093:            /**
094:             * Set the namespace URI for which this Rule is relevant, if any.
095:             *
096:             * @param namespaceURI Namespace URI for which this Rule is relevant,
097:             *  or <code>null</code> to match independent of namespace.
098:             */
099:            public void setNamespaceURI(String namespaceURI) {
100:
101:                this .namespaceURI = namespaceURI;
102:
103:            }
104:
105:            // --------------------------------------------------------- Public Methods
106:
107:            /**
108:             * This method is called when the beginning of a matching XML element
109:             * is encountered.
110:             *
111:             * @param attributes The attribute list of this element
112:             * @deprecated Use the {@link #begin(String,String,Attributes) begin}
113:             *   method with <code>namespace</code> and <code>name</code>
114:             *   parameters instead.
115:             */
116:            public void begin(Attributes attributes) throws Exception {
117:
118:                ; // The default implementation does nothing
119:
120:            }
121:
122:            /**
123:             * This method is called when the beginning of a matching XML element
124:             * is encountered. The default implementation delegates to the deprecated
125:             * method {@link #begin(Attributes) begin} without the 
126:             * <code>namespace</code> and <code>name</code> parameters, to retain 
127:             * backwards compatibility.
128:             *
129:             * @param namespace the namespace URI of the matching element, or an 
130:             *   empty string if the parser is not namespace aware or the element has
131:             *   no namespace
132:             * @param name the local name if the parser is namespace aware, or just 
133:             *   the element name otherwise
134:             * @param attributes The attribute list of this element
135:             * @since Digester 1.4
136:             */
137:            public void begin(String namespace, String name,
138:                    Attributes attributes) throws Exception {
139:
140:                begin(attributes);
141:
142:            }
143:
144:            /**
145:             * This method is called when the body of a matching XML element
146:             * is encountered.  If the element has no body, this method is
147:             * not called at all.
148:             *
149:             * @param text The text of the body of this element
150:             * @deprecated Use the {@link #body(String,String,String) body} method
151:             *   with <code>namespace</code> and <code>name</code> parameters
152:             *   instead.
153:             */
154:            public void body(String text) throws Exception {
155:
156:                ; // The default implementation does nothing
157:
158:            }
159:
160:            /**
161:             * This method is called when the body of a matching XML element is 
162:             * encountered.  If the element has no body, this method is not called at 
163:             * all. The default implementation delegates to the deprecated method 
164:             * {@link #body(String) body} without the <code>namespace</code> and
165:             * <code>name</code> parameters, to retain backwards compatibility.
166:             *
167:             * @param namespace the namespace URI of the matching element, or an 
168:             *   empty string if the parser is not namespace aware or the element has
169:             *   no namespace
170:             * @param name the local name if the parser is namespace aware, or just 
171:             *   the element name otherwise
172:             * @param text The text of the body of this element
173:             * @since Digester 1.4
174:             */
175:            public void body(String namespace, String name, String text)
176:                    throws Exception {
177:
178:                body(text);
179:
180:            }
181:
182:            /**
183:             * This method is called when the end of a matching XML element
184:             * is encountered.
185:             * 
186:             * @deprecated Use the {@link #end(String,String) end} method with 
187:             *   <code>namespace</code> and <code>name</code> parameters instead.
188:             */
189:            public void end() throws Exception {
190:
191:                ; // The default implementation does nothing
192:
193:            }
194:
195:            /**
196:             * This method is called when the end of a matching XML element
197:             * is encountered. The default implementation delegates to the deprecated
198:             * method {@link #end end} without the 
199:             * <code>namespace</code> and <code>name</code> parameters, to retain 
200:             * backwards compatibility.
201:             *
202:             * @param namespace the namespace URI of the matching element, or an 
203:             *   empty string if the parser is not namespace aware or the element has
204:             *   no namespace
205:             * @param name the local name if the parser is namespace aware, or just 
206:             *   the element name otherwise
207:             * @since Digester 1.4
208:             */
209:            public void end(String namespace, String name) throws Exception {
210:
211:                end();
212:
213:            }
214:
215:            /**
216:             * This method is called after all parsing methods have been
217:             * called, to allow Rules to remove temporary data.
218:             */
219:            public void finish() throws Exception {
220:
221:                ; // The default implementation does nothing
222:
223:            }
224:
225:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.