Source Code Cross Referenced for WMSConfig.java in  » GIS » GeoServer » org » vfny » geoserver » config » 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.config 
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.config;
006:
007:        import org.vfny.geoserver.global.Config;
008:        import org.vfny.geoserver.global.ConfigurationException;
009:        import org.vfny.geoserver.global.WMS;
010:        import org.vfny.geoserver.global.dto.ServiceDTO;
011:        import org.vfny.geoserver.global.dto.WMSDTO;
012:        import java.util.HashMap;
013:        import java.util.Map;
014:
015:        /**
016:         * WMS purpose.
017:         *
018:         * <p>
019:         * Description of WMS  Used to store WMS data.
020:         * </p>
021:         *
022:         * <p></p>
023:         *
024:         * @author dzwiers, Refractions Research, Inc.
025:         * @version $Id: WMSConfig.java 7128 2007-06-29 15:17:56Z aaime $
026:         */
027:        public class WMSConfig extends ServiceConfig {
028:            private static final String WMS_VERSION = "1.1.1";
029:            public static final String CONFIG_KEY = "Config.WMS";
030:
031:            /**
032:             * SVG renderers.
033:             */
034:            public static final String SVG_SIMPLE = "Simple";
035:            public static final String SVG_BATIK = "Batik";
036:
037:            /**
038:             * Interpolation Types
039:             */
040:            public static final String INT_NEAREST = "Nearest";
041:            public static final String INT_BIlINEAR = "Bilinear";
042:            public static final String INT_BICUBIC = "Bicubic";
043:
044:            /** current svg renderer **/
045:            private String svgRenderer;
046:
047:            /** anti aliasing hint for svg renderer **/
048:            private boolean svgAntiAlias;
049:
050:            /** rendering interpolation **/
051:            private Map baseMapLayers;
052:            private Map baseMapStyles;
053:            private Map baseMapEnvelopes;
054:            private String allowInterpolation;
055:
056:            /**
057:             * WMS constructor.
058:             *
059:             * <p>
060:             * Creates a WMS to represent an instance with default data.
061:             * </p>
062:             *
063:             * @see defaultSettings()
064:             */
065:            public WMSConfig() {
066:                super ();
067:                svgRenderer = SVG_SIMPLE;
068:                svgAntiAlias = true;
069:                allowInterpolation = INT_NEAREST;
070:                baseMapLayers = new HashMap();
071:                baseMapStyles = new HashMap();
072:                baseMapEnvelopes = new HashMap();
073:            }
074:
075:            /**
076:             * WMS constructor.
077:             *
078:             * <p>
079:             * Creates a copy of the WMSDTO provided. All the data structures are
080:             * cloned.
081:             * </p>
082:             *
083:             * @param w The WMSDTO to copy.
084:             */
085:            public WMSConfig(WMSDTO w) {
086:                super (w.getService());
087:                svgRenderer = w.getSvgRenderer();
088:                svgAntiAlias = w.getSvgAntiAlias();
089:                allowInterpolation = w.getAllowInterpolation();
090:                baseMapLayers = w.getBaseMapLayers();
091:                baseMapStyles = w.getBaseMapStyles();
092:                baseMapEnvelopes = w.getBaseMapEnvelopes();
093:            }
094:
095:            /**
096:             * Creates the WMSConfig.
097:             *
098:             * @param wms The wms module.
099:             */
100:            public WMSConfig(WMS wms) {
101:                this ((WMSDTO) wms.toDTO());
102:            }
103:
104:            /**
105:             * Implement loadDTO.
106:             *
107:             * <p>
108:             * Takes a WMSDTO and loads it into this WMSConfig Object
109:             * </p>
110:             *
111:             * @param dto an instance of WMSDTO
112:             *
113:             * @throws NullPointerException DOCUMENT ME!
114:             *
115:             * @see org.vfny.geoserver.config.DataStructure#loadDTO(java.lang.Object)
116:             */
117:            public void update(WMSDTO dto) {
118:                if (dto == null) {
119:                    throw new NullPointerException(
120:                            "WMS Data Transfer Object required");
121:                }
122:
123:                super .update(dto.getService());
124:                svgRenderer = dto.getSvgRenderer();
125:                svgAntiAlias = dto.getSvgAntiAlias();
126:                allowInterpolation = dto.getAllowInterpolation();
127:                baseMapLayers = dto.getBaseMapLayers();
128:                baseMapStyles = dto.getBaseMapStyles();
129:                baseMapEnvelopes = dto.getBaseMapEnvelopes();
130:            }
131:
132:            /**
133:             * Implement toDTO.
134:             *
135:             * <p>
136:             * Returns a copy of the data in a ServiceDTO object
137:             * </p>
138:             *
139:             * @return a copy of the data in a ServiceDTO object
140:             *
141:             * @see org.vfny.geoserver.config.DataStructure#toDTO()
142:             */
143:            public WMSDTO toDTO() {
144:                WMSDTO wmsDto = new WMSDTO();
145:                wmsDto.setService((ServiceDTO) super .toServDTO());
146:                wmsDto.setSvgRenderer(svgRenderer);
147:                wmsDto.setSvgAntiAlias(svgAntiAlias);
148:                wmsDto.setAllowInterpolation(allowInterpolation);
149:                wmsDto.setBaseMapLayers(baseMapLayers);
150:                wmsDto.setBaseMapStyles(baseMapStyles);
151:                wmsDto.setBaseMapEnvelopes(baseMapEnvelopes);
152:
153:                return wmsDto;
154:            }
155:
156:            /**
157:             * @return The constant identifying the current svg renderer.
158:             * @see org.vfny.geoserver.config.WMSConfig#SVG_SIMPLE
159:             * @see org.vfny.geoserver.config.WMSConfig#SVG_BATIK
160:             */
161:            public String getSvgRenderer() {
162:                return svgRenderer;
163:            }
164:
165:            /**
166:             * @param The constant identifying the current svg renderer.
167:             * @see org.vfny.geoserver.config.WMSConfig#SVG_SIMPLE
168:             * @see org.vfny.geoserver.config.WMSConfig#SVG_BATIK
169:             */
170:            public void setSvgRenderer(String svgRenderer) {
171:                this .svgRenderer = svgRenderer;
172:            }
173:
174:            /**
175:             * @param svgAntiAlias anti alias hint.
176:             */
177:            public void setSvgAntiAlias(boolean svgAntiAlias) {
178:                this .svgAntiAlias = svgAntiAlias;
179:            }
180:
181:            /**
182:             * @return The value of the anti aliasing rendering hint.
183:             */
184:            public boolean getSvgAntiAlias() {
185:                return svgAntiAlias;
186:            }
187:
188:            /**
189:             * @param allowInterpolation rendering interpolation hint.
190:             */
191:            public void setAllowInterpolation(String allowInterpolation) {
192:                this .allowInterpolation = allowInterpolation;
193:            }
194:
195:            /**
196:             * @return The value of the rendering interpolation rendering hint.
197:             */
198:            public String getAllowInterpolation() {
199:                return allowInterpolation;
200:            }
201:
202:            /**
203:             * The comma separated list of feature types that make up the
204:             * base-map layer list.
205:             * @return
206:             */
207:            public Map getBaseMapLayers() {
208:                return baseMapLayers;
209:            }
210:
211:            public void setBaseMapLayers(Map layers) {
212:                baseMapLayers = layers;
213:            }
214:
215:            /**
216:             * The comma separated list of Styles that make up the
217:             * base-map style list.
218:             * @return
219:             */
220:            public Map getBaseMapStyles() {
221:                return baseMapStyles;
222:            }
223:
224:            public void setBaseMapStyles(Map styles) {
225:                baseMapStyles = styles;
226:            }
227:
228:            public Map getBaseMapEnvelopes() {
229:                return baseMapEnvelopes;
230:            }
231:
232:            public void setBaseMapEnvelopes(Map envelopes) {
233:                baseMapEnvelopes = envelopes;
234:            }
235:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.