Source Code Cross Referenced for HandlerBase.java in  » Swing-Library » jEdit » com » microstar » xml » 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 » Swing Library » jEdit » com.microstar.xml 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // HandlerBase.java: Simple base class for AElfred processors.
002:        // NO WARRANTY! See README, and copyright below.
003:        // $Id: HandlerBase.java 3792 2001-09-02 05:37:43Z spestov $
004:
005:        package com.microstar.xml;
006:
007:        import com.microstar.xml.XmlHandler;
008:        import com.microstar.xml.XmlException;
009:        import java.io.Reader;
010:
011:        /**
012:         * Convenience base class for AElfred handlers.
013:         * <p>This base class implements the XmlHandler interface with
014:         * (mostly empty) default handlers.  You are not required to use this,
015:         * but if you need to handle only a few events, you might find
016:         * it convenient to extend this class rather than implementing
017:         * the entire interface.  This example overrides only the
018:         * <code>charData</code> method, using the defaults for the others:
019:         * <pre>
020:         * import com.microstar.xml.HandlerBase;
021:         *
022:         * public class MyHandler extends HandlerBase {
023:         *   public void charData (char ch[], int start, int length)
024:         *   {
025:         *     System.out.println("Data: " + new String (ch, start, length));
026:         *   }
027:         * }
028:         * </pre>
029:         * <p>This class is optional, but if you use it, you must also
030:         * include the <code>XmlException</code> class.
031:         * <p>Do not extend this if you are using SAX; extend
032:         * <code>org.xml.sax.HandlerBase</code> instead.
033:         * @author Copyright (c) 1998 by Microstar Software Ltd.
034:         * @author written by David Megginson &lt;dmeggins@microstar.com&gt;
035:         * @version 1.1
036:         * @see XmlHandler
037:         * @see XmlException
038:         * @see org.xml.sax.HandlerBase
039:         */
040:        public class HandlerBase implements  XmlHandler {
041:
042:            /**
043:             * Handle the start of the document.
044:             * <p>The default implementation does nothing.
045:             * @see com.microstar.xml.XmlHandler#startDocument
046:             * @exception java.lang.Exception Derived methods may throw exceptions.
047:             */
048:            public void startDocument() throws java.lang.Exception {
049:            }
050:
051:            /**
052:             * Handle the end of the document.
053:             * <p>The default implementation does nothing.
054:             * @see com.microstar.xml.XmlHandler#endDocument
055:             * @exception java.lang.Exception Derived methods may throw exceptions.
056:             */
057:            public void endDocument() throws java.lang.Exception {
058:            }
059:
060:            /**
061:             * Resolve an external entity.
062:             * <p>The default implementation simply returns the supplied
063:             * system identifier.
064:             * @see com.microstar.xml.XmlHandler#resolveEntity
065:             * @exception java.lang.Exception Derived methods may throw exceptions.
066:             */
067:            public Object resolveEntity(String publicId, String systemId)
068:                    throws java.lang.Exception {
069:                return null;
070:            }
071:
072:            /**
073:             * Handle the start of an external entity.
074:             * <p>The default implementation does nothing.
075:             * @see com.microstar.xml.XmlHandler#startExternalEntity
076:             * @exception java.lang.Exception Derived methods may throw exceptions.
077:             */
078:            public void startExternalEntity(String systemId)
079:                    throws java.lang.Exception {
080:            }
081:
082:            /**
083:             * Handle the end of an external entity.
084:             * <p>The default implementation does nothing.
085:             * @see com.microstar.xml.XmlHandler#endExternalEntity
086:             * @exception java.lang.Exception Derived methods may throw exceptions.
087:             */
088:            public void endExternalEntity(String systemId)
089:                    throws java.lang.Exception {
090:            }
091:
092:            /**
093:             * Handle a document type declaration.
094:             * <p>The default implementation does nothing.
095:             * @see com.microstar.xml.XmlHandler#doctypeDecl
096:             * @exception java.lang.Exception Derived methods may throw exceptions.
097:             */
098:            public void doctypeDecl(String name, String publicId,
099:                    String systemId) throws java.lang.Exception {
100:            }
101:
102:            /**
103:             * Handle an attribute assignment.
104:             * <p>The default implementation does nothing.
105:             * @see com.microstar.xml.XmlHandler#attribute
106:             * @exception java.lang.Exception Derived methods may throw exceptions.
107:             */
108:            public void attribute(String aname, String value,
109:                    boolean isSpecified) throws java.lang.Exception {
110:            }
111:
112:            /**
113:             * Handle the start of an element.
114:             * <p>The default implementation does nothing.
115:             * @see com.microstar.xml.XmlHandler#startElement
116:             * @exception java.lang.Exception Derived methods may throw exceptions.
117:             */
118:            public void startElement(String elname) throws java.lang.Exception {
119:            }
120:
121:            /**
122:             * Handle the end of an element.
123:             * <p>The default implementation does nothing.
124:             * @see com.microstar.xml.XmlHandler#endElement
125:             * @exception java.lang.Exception Derived methods may throw exceptions.
126:             */
127:            public void endElement(String elname) throws java.lang.Exception {
128:            }
129:
130:            /**
131:             * Handle character data.
132:             * <p>The default implementation does nothing.
133:             * @see com.microstar.xml.XmlHandler#charData
134:             * @exception java.lang.Exception Derived methods may throw exceptions.
135:             */
136:            public void charData(char ch[], int start, int length)
137:                    throws java.lang.Exception {
138:            }
139:
140:            /**
141:             * Handle ignorable whitespace.
142:             * <p>The default implementation does nothing.
143:             * @see com.microstar.xml.XmlHandler#ignorableWhitespace
144:             * @exception java.lang.Exception Derived methods may throw exceptions.
145:             */
146:            public void ignorableWhitespace(char ch[], int start, int length)
147:                    throws java.lang.Exception {
148:            }
149:
150:            /**
151:             * Handle a processing instruction.
152:             * <p>The default implementation does nothing.
153:             * @see com.microstar.xml.XmlHandler#processingInstruction
154:             * @exception java.lang.Exception Derived methods may throw exceptions.
155:             */
156:            public void processingInstruction(String target, String data)
157:                    throws java.lang.Exception {
158:            }
159:
160:            /**
161:             * Throw an exception for a fatal error.
162:             * <p>The default implementation throws <code>XmlException</code>.
163:             * @see com.microstar.xml.XmlHandler#error
164:             * @exception com.microstar.xml.XmlException A specific parsing error.
165:             * @exception java.lang.Exception Derived methods may throw exceptions.
166:             */
167:            public void error(String message, String systemId, int line,
168:                    int column) throws XmlException, java.lang.Exception {
169:                throw new XmlException(message, systemId, line, column);
170:            }
171:
172:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.