Source Code Cross Referenced for WMS1_1_0.java in  » GIS » GeoTools-2.4.1 » org » geotools » data » wms » 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.data.wms 
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; either
009:         *    version 2.1 of the License, or (at your option) any later version.
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.data.wms;
017:
018:        import java.io.IOException;
019:        import java.io.InputStream;
020:        import java.net.URL;
021:        import java.util.Properties;
022:
023:        import org.geotools.data.ows.GetCapabilitiesRequest;
024:        import org.geotools.data.ows.Layer;
025:        import org.geotools.data.ows.Response;
026:        import org.geotools.data.wms.request.AbstractDescribeLayerRequest;
027:        import org.geotools.data.wms.request.AbstractGetLegendGraphicRequest;
028:        import org.geotools.data.wms.request.AbstractGetStylesRequest;
029:        import org.geotools.data.wms.request.AbstractPutStylesRequest;
030:        import org.geotools.data.wms.request.DescribeLayerRequest;
031:        import org.geotools.data.wms.request.GetLegendGraphicRequest;
032:        import org.geotools.data.wms.request.GetStylesRequest;
033:        import org.geotools.data.wms.request.PutStylesRequest;
034:        import org.geotools.data.wms.response.DescribeLayerResponse;
035:        import org.geotools.data.wms.response.GetLegendGraphicResponse;
036:        import org.geotools.data.wms.response.GetStylesResponse;
037:        import org.geotools.data.wms.response.PutStylesResponse;
038:        import org.geotools.ows.ServiceException;
039:
040:        /**
041:         * @author Richard Gould
042:         *
043:         * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/plugin/wms/src/main/java/org/geotools/data/wms/WMS1_1_0.java $
044:         */
045:        public class WMS1_1_0 extends WMS1_0_0 {
046:
047:            public WMS1_1_0() {
048:
049:            }
050:
051:            public org.geotools.data.wms.request.GetMapRequest createGetMapRequest(
052:                    URL get) {
053:                return new GetMapRequest(get);
054:            }
055:
056:            /* (non-Javadoc)
057:             * @see org.geotools.data.wms.Specification#getVersion()
058:             */
059:            public String getVersion() {
060:                return "1.1.0";
061:            }
062:
063:            /**
064:             * @see org.geotools.data.wms.Specification#createGetCapabilitiesRequest(java.net.URL)
065:             */
066:            public GetCapabilitiesRequest createGetCapabilitiesRequest(
067:                    URL server) {
068:                return new GetCapsRequest(server);
069:            }
070:
071:            /**
072:             * @see org.geotools.data.wms.WMS1_0_0#createGetFeatureInfoRequest(java.net.URL, org.geotools.data.wms.request.GetMapRequest, java.util.Set, java.lang.String[])
073:             */
074:            public org.geotools.data.wms.request.GetFeatureInfoRequest createGetFeatureInfoRequest(
075:                    URL onlineResource,
076:                    org.geotools.data.wms.request.GetMapRequest getMapRequest) {
077:                return new GetFeatureInfoRequest(onlineResource, getMapRequest);
078:            }
079:
080:            /**
081:             * @see org.geotools.data.wms.WMS1_0_0#createDescribeLayerRequest(java.net.URL)
082:             */
083:            public DescribeLayerRequest createDescribeLayerRequest(
084:                    URL onlineResource) throws UnsupportedOperationException {
085:                return new InternalDescribeLayerRequest(onlineResource, null);
086:            }
087:
088:            public GetLegendGraphicRequest createGetLegendGraphicRequest(
089:                    URL onlineResource) {
090:                return new InternalGetLegendGraphicRequest(onlineResource);
091:            }
092:
093:            public GetStylesRequest createGetStylesRequest(URL onlineResource,
094:                    Layer[] layers) throws UnsupportedOperationException {
095:                return new InternalGetStylesRequest(onlineResource, layers);
096:            }
097:
098:            /**
099:             * @see org.geotools.data.wms.WMS1_0_0#createPutStylesRequest(java.net.URL)
100:             */
101:            public PutStylesRequest createPutStylesRequest(URL onlineResource)
102:                    throws UnsupportedOperationException {
103:                return new InternalPutStylesRequest(onlineResource);
104:            }
105:
106:            public static class GetCapsRequest extends WMS1_0_0.GetCapsRequest {
107:
108:                public GetCapsRequest(URL urlGetCapabilities) {
109:                    super (urlGetCapabilities);
110:                    // TODO Auto-generated constructor stub
111:                }
112:
113:                /* (non-Javadoc)
114:                 * @see org.geotools.data.wms.request.AbstractGetCapabilitiesRequest#initRequest()
115:                 */
116:                protected void initRequest() {
117:                    setProperty("REQUEST", "GetCapabilities");
118:                }
119:
120:                /* (non-Javadoc)
121:                 * @see org.geotools.data.wms.request.AbstractGetCapabilitiesRequest#initService()
122:                 */
123:                protected void initService() {
124:                    setProperty("SERVICE", "WMS");
125:                }
126:
127:                /* (non-Javadoc)
128:                 * @see org.geotools.data.wms.request.AbstractGetCapabilitiesRequest#initVersion()
129:                 */
130:                protected void initVersion() {
131:                    setProperty("VERSION", "1.1.0");
132:                }
133:
134:                protected String processKey(String key) {
135:                    return key.trim().toUpperCase();
136:                }
137:            }
138:
139:            public static class GetMapRequest extends WMS1_0_0.GetMapRequest {
140:
141:                public GetMapRequest(URL onlineResource) {
142:                    super (onlineResource);
143:                }
144:
145:                protected void initRequest() {
146:                    setProperty(REQUEST, "GetMap");
147:                }
148:
149:                protected void initVersion() {
150:                    setProperty(VERSION, "1.1.0");
151:                }
152:
153:                protected String getRequestFormat(String format) {
154:                    return format;
155:                }
156:
157:                protected String getRequestException(String exception) {
158:                    return exception;
159:                }
160:
161:                protected String processKey(String key) {
162:                    return key.trim().toUpperCase();
163:                }
164:            }
165:
166:            public static class GetFeatureInfoRequest extends
167:                    WMS1_0_0.GetFeatureInfoRequest {
168:
169:                /**
170:                 * @param onlineResource
171:                 * @param request
172:                 * 
173:                 */
174:                public GetFeatureInfoRequest(URL onlineResource,
175:                        org.geotools.data.wms.request.GetMapRequest request) {
176:                    super (onlineResource, request);
177:                }
178:
179:                protected void initRequest() {
180:                    setProperty("REQUEST", "GetFeatureInfo");
181:                }
182:
183:                protected void initVersion() {
184:                    setProperty("VERSION", "1.1.0");
185:                }
186:
187:                protected String processKey(String key) {
188:                    return key.trim().toUpperCase();
189:                }
190:            }
191:
192:            public static class InternalDescribeLayerRequest extends
193:                    AbstractDescribeLayerRequest {
194:
195:                /**
196:                 * @param onlineResource
197:                 * @param properties
198:                 */
199:                public InternalDescribeLayerRequest(URL onlineResource,
200:                        Properties properties) {
201:                    super (onlineResource, properties);
202:                }
203:
204:                protected void initVersion() {
205:                    setProperty(VERSION, "1.1.0");
206:                }
207:
208:                public Response createResponse(String contentType,
209:                        InputStream inputStream) throws ServiceException,
210:                        IOException {
211:                    return new DescribeLayerResponse(contentType, inputStream);
212:                }
213:            }
214:
215:            public static class InternalGetLegendGraphicRequest extends
216:                    AbstractGetLegendGraphicRequest {
217:
218:                public InternalGetLegendGraphicRequest(URL onlineResource) {
219:                    super (onlineResource);
220:                }
221:
222:                protected void initVersion() {
223:                    setProperty(VERSION, "1.0.0");
224:                }
225:
226:                public Response createResponse(String contentType,
227:                        InputStream inputStream) throws ServiceException,
228:                        IOException {
229:                    return new GetLegendGraphicResponse(contentType,
230:                            inputStream);
231:                }
232:            }
233:
234:            public static class InternalGetStylesRequest extends
235:                    AbstractGetStylesRequest {
236:
237:                /**
238:                 * @param onlineResource
239:                 * @param layers
240:                 */
241:                public InternalGetStylesRequest(URL onlineResource,
242:                        Layer[] layers) {
243:                    super (onlineResource, layers);
244:                }
245:
246:                /* (non-Javadoc)
247:                 * @see org.geotools.data.wms.request.AbstractGetStylesRequest#initVersion()
248:                 */
249:                protected void initVersion() {
250:                    setProperty(VERSION, "1.1.0");
251:                }
252:
253:                public Response createResponse(String contentType,
254:                        InputStream inputStream) throws ServiceException,
255:                        IOException {
256:                    return new GetStylesResponse(contentType, inputStream);
257:                }
258:            }
259:
260:            public static class InternalPutStylesRequest extends
261:                    AbstractPutStylesRequest {
262:
263:                public InternalPutStylesRequest(URL onlineResource) {
264:                    super (onlineResource, null);
265:                }
266:
267:                protected void initVersion() {
268:                    setProperty(VERSION, "1.1.0");
269:                }
270:
271:                public Response createResponse(String contentType,
272:                        InputStream inputStream) throws ServiceException,
273:                        IOException {
274:                    return new PutStylesResponse(contentType, inputStream);
275:                }
276:            }
277:
278:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.