Source Code Cross Referenced for XMLElementHandler.java in  » GIS » GeoTools-2.4.1 » org » geotools » 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 » GIS » GeoTools 2.4.1 » org.geotools.xml 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *    GeoTools - OpenSource mapping toolkit
003:         *    http://geotools.org
004:         *    (C) 2004-2006, GeoTools Project Managment Committee (PMC)
005:         *    
006:         *    This library is free software; you can redistribute it and/or
007:         *    modify it under the terms of the GNU Lesser General Public
008:         *    License as published by the Free Software Foundation;
009:         *    version 2.1 of the License.
010:         *
011:         *    This library is distributed in the hope that it will be useful,
012:         *    but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014:         *    Lesser General Public License for more details.
015:         */
016:        package org.geotools.xml;
017:
018:        import java.io.Serializable;
019:        import java.net.URI;
020:        import java.util.Map;
021:        import java.util.logging.Level;
022:        import java.util.logging.Logger;
023:
024:        import javax.naming.OperationNotSupportedException;
025:
026:        import org.geotools.xml.schema.Element;
027:        import org.xml.sax.Attributes;
028:        import org.xml.sax.SAXException;
029:        import org.xml.sax.SAXNotSupportedException;
030:
031:        /**
032:         * XSIElementHandler purpose.
033:         * 
034:         * <p>
035:         * This abstract class is intended to act as both a definition of a generic
036:         * handler.
037:         * </p>
038:         *
039:         * @author dzwiers, Refractions Research, Inc. http://www.refractions.net
040:         * @author $Author:$ (last modification)
041:         * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/xml/src/main/java/org/geotools/xml/XMLElementHandler.java $
042:         * @version $Id: XMLElementHandler.java 27862 2007-11-12 19:51:19Z desruisseaux $
043:         */
044:        public abstract class XMLElementHandler implements  Serializable {
045:            /**
046:             * the logger -- should be used for debugging (assuming there are bugs LOL)
047:             */
048:            protected final static Logger logger = org.geotools.util.logging.Logging
049:                    .getLogger("net.refractions.xml.element");
050:
051:            /**
052:             * Creates a new XSIElementHandler object. Intended to limit creation to
053:             * the sub-packages
054:             */
055:            protected XMLElementHandler() {
056:                // do nothing
057:            }
058:
059:            /**
060:             * This method throws a SAXNotSupportedException if it is called and not
061:             * overwritten. When overridding this method, you should be careful to
062:             * understand that it may be called more than once per element. Therefore
063:             * it would be advisable to log the text and handle the text's
064:             * interpretation at a later time (
065:             *
066:             * @param text
067:             *
068:             * @throws SAXException
069:             * @throws SAXNotSupportedException
070:             *
071:             * @see endElement(String,String)).
072:             */
073:            public void characters(String text) throws SAXException {
074:                throw new SAXNotSupportedException(
075:                        "Should overide this method.");
076:            }
077:
078:            /**
079:             * handles SAX end Element events. This matches the end of the element
080:             * declaration in the document ... and responds to the event generated by
081:             * the SAX parser. This is an opportunity to complete some
082:             * post-processing.
083:             *
084:             * @param namespaceURI
085:             * @param localName
086:             * @param hints DOCUMENT ME!
087:             *
088:             * @throws SAXException
089:             * @throws OperationNotSupportedException
090:             *
091:             * @see SchemaContentHandler#endElement
092:             */
093:            public abstract void endElement(URI namespaceURI, String localName,
094:                    Map hints) throws SAXException,
095:                    OperationNotSupportedException;
096:
097:            /**
098:             * handles SAX start Element events. This matches the start of the element
099:             * declaration in the document ... and responds to the event generated by
100:             * the SAX parser. This is an opportunity to complete some pre-processing.
101:             *
102:             * @param namespaceURI
103:             * @param localName
104:             * @param attr
105:             *
106:             * @throws SAXException
107:             *
108:             * @see SchemaContentHandler#startElement
109:             */
110:            public abstract void startElement(URI namespaceURI,
111:                    String localName, Attributes attr) throws SAXException;
112:
113:            /**
114:             * This will find an appropriate XMLElementHandler for the specified child
115:             * if appropriate. This method may return or throw an exception, depending
116:             * on the severity, if an error occurs. This method should be used to
117:             * complete a SAX parse of a document for which the Schema is known, and
118:             * parsed.
119:             *
120:             * @param namespaceURI
121:             * @param localName
122:             * @param hints DOCUMENT ME!
123:             *
124:             * @return XMLElementHandler, or null
125:             *
126:             * @throws SAXException
127:             */
128:            public abstract XMLElementHandler getHandler(URI namespaceURI,
129:                    String localName, Map hints) throws SAXException;
130:
131:            /**
132:             * This method will get the value of the element depending on it's type.
133:             *
134:             * @return Object (may be null)
135:             *
136:             * @throws SAXException
137:             *
138:             * @see Type#getValue
139:             */
140:            public abstract Object getValue() throws SAXException;
141:
142:            /**
143:             * This returns the name of the element being represented by this handler.
144:             * This name matches the name specified in the Schema.
145:             *
146:             * @return The Name (may not be null)
147:             */
148:            public abstract String getName();
149:
150:            /**
151:             * This returns the Element specified.
152:             *
153:             * @return Element (may not be null)
154:             */
155:            public abstract Element getElement();
156:
157:            /**
158:             * <p>
159:             * Sets the logger level for all XMLElementHandlers.
160:             * </p>
161:             *
162:             * @param l
163:             */
164:            public static void setLogLevel(Level l) {
165:                logger.setLevel(l);
166:            }
167:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.