Source Code Cross Referenced for DispatcherHandler.java in  » GIS » GeoServer » org » vfny » geoserver » util » requests » 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 » GeoServer » org.vfny.geoserver.util.requests 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* Copyright (c) 2001 - 2007 TOPP - www.openplans.org.  All rights reserved.
002:         * This code is licensed under the GPL 2.0 license, availible at the root
003:         * application directory.
004:         */
005:        package org.vfny.geoserver.util.requests;
006:
007:        import org.vfny.geoserver.servlets.Dispatcher;
008:        import org.xml.sax.Attributes;
009:        import org.xml.sax.ContentHandler;
010:        import org.xml.sax.SAXException;
011:        import org.xml.sax.helpers.XMLFilterImpl;
012:        import java.util.logging.Logger;
013:
014:        /**
015:         * Uses SAX to extact a GetFeature query from and incoming GetFeature request
016:         * XML stream.
017:         *
018:         * <p>
019:         * Note that this Handler extension ignores Filters completely and must be
020:         * chained as a parent to the PredicateFilter method in order to recognize
021:         * them.  If it is not chained, it will still generate valid queries, but with
022:         * no filtering whatsoever.
023:         * </p>
024:         *
025:         * @author Chris Holmes, TOPP
026:         * @version $Id: DispatcherHandler.java 7746 2007-11-13 15:38:35Z aaime $
027:         */
028:        public class DispatcherHandler extends XMLFilterImpl implements 
029:                ContentHandler {
030:            /** Class logger */
031:            private static Logger LOGGER = org.geotools.util.logging.Logging
032:                    .getLogger("org.vfny.geoserver.requests");
033:
034:            /** Stores internal request type */
035:            private int requestType = Dispatcher.UNKNOWN;
036:
037:            /** Stores internal service type. */
038:            private int serviceType = Dispatcher.UNKNOWN;
039:
040:            /** Stores the internal request type as string */
041:            private String request = null;
042:
043:            /** Stores hte internal service type as string */
044:            private String service = null;
045:
046:            /** Flags whether or not type has been set */
047:            private boolean gotType = false;
048:
049:            /**
050:             * @return the service type.
051:             */
052:            public String getService() {
053:                return service;
054:            }
055:
056:            /**
057:             * @return The request type.
058:             */
059:            public String getRequest() {
060:                return request;
061:            }
062:
063:            //JD: kill these methods
064:            /**
065:             * Gets the request type.  See Dispatcher for the available types.
066:             *
067:             * @return an int of the request type.
068:             *
069:             */
070:
071:            //    public int getRequestType() {
072:            //        return requestType;
073:            //    }
074:            /**
075:             * Gets the service type, for now either WMS or WFS types of Dispatcher.
076:             *
077:             * @return an int of the service type.
078:             */
079:
080:            //    public int getServiceType() {
081:            //        return serviceType;
082:            //    }
083:            /**
084:             * Notes the start of the element and checks for request type.
085:             *
086:             * @param namespaceURI URI for namespace appended to element.
087:             * @param localName Local name of element.
088:             * @param rawName Raw name of element.
089:             * @param atts Element attributes.
090:             *
091:             * @throws SAXException DOCUMENT ME!
092:             */
093:            public void startElement(String namespaceURI, String localName,
094:                    String rawName, Attributes atts) throws SAXException {
095:                if (gotType) {
096:                    return;
097:                }
098:
099:                this .request = localName;
100:
101:                //JD: kill this
102:                //            if (localName.equals("GetCapabilities")) {
103:                //                this.requestType = Dispatcher.GET_CAPABILITIES_REQUEST;
104:                //            } else if (localName.equals("DescribeFeatureType")) {
105:                //                this.requestType = Dispatcher.DESCRIBE_FEATURE_TYPE_REQUEST;
106:                //            } else if (localName.equals("GetFeature")) {
107:                //                this.requestType = Dispatcher.GET_FEATURE_REQUEST;
108:                //            } else if (localName.equals("Transaction")) {
109:                //                this.requestType = Dispatcher.TRANSACTION_REQUEST;
110:                //            } else if (localName.equals("GetFeatureWithLock")) {
111:                //                this.requestType = Dispatcher.GET_FEATURE_LOCK_REQUEST;
112:                //            } else if (localName.equals("LockFeature")) {
113:                //                this.requestType = Dispatcher.LOCK_REQUEST;
114:                //            } else if (localName.equals("GetMap")) {
115:                //                this.requestType = Dispatcher.GET_MAP_REQUEST;
116:                //            } else if (localName.equals("GetFeatureInfo")) {
117:                //                this.requestType = Dispatcher.GET_FEATURE_INFO_REQUEST;
118:                //            } else {
119:                //                this.requestType = Dispatcher.UNKNOWN;
120:                //            }
121:                for (int i = 0, n = atts.getLength(); i < n; i++) {
122:                    if (atts.getLocalName(i).equals("service")) {
123:                        this .service = atts.getValue(i);
124:
125:                        //JD: kill this
126:                        //                if (service.equals("WFS")) {
127:                        //                    this.serviceType = Dispatcher.WFS_SERVICE;
128:                        //                } else if (service.equals("WMS")) {
129:                        //                    this.serviceType = Dispatcher.WMS_SERVICE;
130:                        //                }
131:                        //            } else {
132:                        //                this.serviceType = Dispatcher.UNKNOWN;
133:                    }
134:                }
135:
136:                gotType = true;
137:            }
138:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.