Source Code Cross Referenced for WMSDTO.java in  » GIS » GeoServer » org » vfny » geoserver » global » dto » 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.global.dto 
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:
006:        /* Copyright (c) 2001 - 2007 TOPP - www.openplans.org.  All rights reserved.
007:         * This code is licensed under the GPL 2.0 license, availible at the root
008:         * application directory.
009:         */
010:        package org.vfny.geoserver.global.dto;
011:
012:        import java.util.Map;
013:
014:        /**
015:         * Data Transfer Object for communication GeoServer Web Map Server information.
016:         *
017:         * <p>
018:         * Information required for GeoServer to set up a Web Map Service.
019:         * </p>
020:         *
021:         * <p>
022:         * Data Transfer object are used to communicate between the GeoServer
023:         * application and its configuration and persistent layers. As such the class
024:         * is final - to allow for its future use as an on-the-wire message.
025:         * </p>
026:         *
027:         * @author dzwiers, Refractions Research, Inc.
028:         * @version $Id: WMSDTO.java 7128 2007-06-29 15:17:56Z aaime $
029:         */
030:        public final class WMSDTO implements  DataTransferObject {
031:            /** For the writer! */
032:            private boolean gmlPrefixing;
033:
034:            /** The service parameters for this instance. */
035:            private ServiceDTO service;
036:
037:            /** The current svg renderer **/
038:            private String svgRenderer;
039:
040:            /** The antialisaing hint for the svg renderer **/
041:            private boolean svgAntiAlias;
042:
043:            /** The interpolation rendering hint **/
044:            private Map baseMapLayers;
045:            private Map baseMapStyles;
046:            private Map baseMapEnvelopes;
047:
048:            /** The interpolation rendering hint */
049:            private String allowInterpolation;
050:
051:            /**
052:             * WMS constructor.  does nothing
053:             */
054:            public WMSDTO() {
055:            }
056:
057:            /**
058:             * WMS constructor.
059:             *
060:             * <p>
061:             * Creates a copy of the WMS provided. If the WMS provided  is null then
062:             * default values are used. All the data structures are cloned.
063:             * </p>
064:             *
065:             * @param other The WMS to copy.
066:             *
067:             * @throws NullPointerException DOCUMENT ME!
068:             */
069:            public WMSDTO(WMSDTO other) {
070:                if (other == null) {
071:                    throw new NullPointerException(
072:                            "Data Transfer Object required");
073:                }
074:
075:                service = (ServiceDTO) other.getService().clone();
076:                gmlPrefixing = other.isGmlPrefixing();
077:                svgRenderer = other.getSvgRenderer();
078:                svgAntiAlias = other.getSvgAntiAlias();
079:                allowInterpolation = other.getAllowInterpolation();
080:                baseMapLayers = other.getBaseMapLayers();
081:                baseMapStyles = other.getBaseMapStyles();
082:                baseMapEnvelopes = other.getBaseMapEnvelopes();
083:            }
084:
085:            /**
086:             * Implement clone as a DeepCopy.
087:             *
088:             * @return A Deep Copy of this WMSDTO
089:             *
090:             * @see java.lang.Object#clone()
091:             */
092:            public Object clone() {
093:                return new WMSDTO(this );
094:            }
095:
096:            /**
097:             * Implement equals.
098:             *
099:             * <p>
100:             * recursively tests to determine if the object passed in is a copy of this
101:             * object.
102:             * </p>
103:             *
104:             * @param other The WMS object to test.
105:             *
106:             * @return true when the object passed is the same as this object.
107:             *
108:             * @see java.lang.Object#equals(java.lang.Object)
109:             */
110:            public boolean equals(Object other) {
111:                if ((other == null) || !(other instanceof  WMSDTO)) {
112:                    return false;
113:                }
114:
115:                WMSDTO dto = (WMSDTO) other;
116:
117:                boolean equals = (gmlPrefixing == dto.gmlPrefixing)
118:                        && (svgAntiAlias == dto.svgAntiAlias)
119:                        && (allowInterpolation == dto.allowInterpolation);
120:
121:                if (equals) {
122:                    if (service == null) {
123:                        equals = dto.getService() == null;
124:                    } else {
125:                        equals = service.equals(dto.getService());
126:                    }
127:                }
128:
129:                if (equals) {
130:                    if (svgRenderer == null) {
131:                        equals = dto.getSvgRenderer() == null;
132:                    } else {
133:                        equals = svgRenderer.equals(dto.getSvgRenderer());
134:                    }
135:                }
136:
137:                if (equals) {
138:                    if (baseMapLayers == null) {
139:                        equals = dto.getBaseMapLayers() == null;
140:                    } else {
141:                        equals = baseMapLayers.equals(dto.getBaseMapLayers());
142:                    }
143:                }
144:
145:                if (equals) {
146:                    if (baseMapStyles == null) {
147:                        equals = dto.getBaseMapStyles() == null;
148:                    } else {
149:                        equals = baseMapStyles.equals(dto.getBaseMapStyles());
150:                    }
151:                }
152:
153:                if (equals) {
154:                    if (baseMapEnvelopes == null) {
155:                        equals = dto.getBaseMapEnvelopes() == null;
156:                    } else {
157:                        equals = baseMapEnvelopes.equals(dto
158:                                .getBaseMapEnvelopes());
159:                    }
160:                }
161:
162:                return equals;
163:            }
164:
165:            /**
166:             * Implement hashCode.
167:             *
168:             * @return Service hashcode or 0
169:             *
170:             * @see java.lang.Object#hashCode()
171:             */
172:            public int hashCode() {
173:                return (gmlPrefixing ? 1 : 0)
174:                        | (svgAntiAlias ? 1 : 0)
175:                        | ((allowInterpolation != null) ? 0
176:                                : allowInterpolation.hashCode())
177:                        | ((service == null) ? 0 : service.hashCode())
178:                        | ((svgRenderer == null) ? 0 : svgRenderer.hashCode())
179:                        | ((baseMapLayers == null) ? 0 : baseMapLayers
180:                                .hashCode())
181:                        | ((baseMapStyles == null) ? 0 : baseMapStyles
182:                                .hashCode())
183:                        | ((baseMapEnvelopes == null) ? 0 : baseMapEnvelopes
184:                                .hashCode());
185:            }
186:
187:            /**
188:             * getService purpose.
189:             *
190:             * <p>
191:             * Description ...
192:             * </p>
193:             *
194:             * @return
195:             */
196:            public ServiceDTO getService() {
197:                return service;
198:            }
199:
200:            /**
201:             * setService purpose.
202:             *
203:             * <p>
204:             * Description ...
205:             * </p>
206:             *
207:             * @param service
208:             *
209:             * @throws NullPointerException DOCUMENT ME!
210:             */
211:            public void setService(ServiceDTO service) {
212:                if (service == null) {
213:                    throw new NullPointerException("ServiceDTO required");
214:                }
215:
216:                this .service = service;
217:            }
218:
219:            /**
220:             * isGmlPrefixing purpose.
221:             *
222:             * <p>
223:             * Description ...
224:             * </p>
225:             *
226:             * @return
227:             */
228:            public boolean isGmlPrefixing() {
229:                return gmlPrefixing;
230:            }
231:
232:            /**
233:             * setGmlPrefixing purpose.
234:             *
235:             * <p>
236:             * Description ...
237:             * </p>
238:             *
239:             * @param b
240:             */
241:            public void setGmlPrefixing(boolean b) {
242:                gmlPrefixing = b;
243:            }
244:
245:            /**
246:             * @return The constant identifying the current svg renderer.
247:             * @see org.vfny.geoserver.config.WMSConfig#SVG_SIMPLE
248:             * @see org.vfny.geoserver.config.WMSConfig#SVG_BATIK
249:             */
250:            public String getSvgRenderer() {
251:                return svgRenderer;
252:            }
253:
254:            /**
255:             * @param The constant identifying the current svg renderer.
256:             * @see org.vfny.geoserver.config.WMSConfig#SVG_SIMPLE
257:             * @see org.vfny.geoserver.config.WMSConfig#SVG_BATIK
258:             */
259:            public void setSvgRenderer(String svgRenderer) {
260:                this .svgRenderer = svgRenderer;
261:            }
262:
263:            /**
264:             * @param svgAntiAlias anti alias hint.
265:             */
266:            public void setSvgAntiAlias(boolean svgAntiAlias) {
267:                this .svgAntiAlias = svgAntiAlias;
268:            }
269:
270:            /**
271:             * @return The value of the anti aliasing rendering hint.
272:             */
273:            public boolean getSvgAntiAlias() {
274:                return svgAntiAlias;
275:            }
276:
277:            public void setBaseMapLayers(Map layers) {
278:                baseMapLayers = layers;
279:            }
280:
281:            public Map getBaseMapLayers() {
282:                return baseMapLayers;
283:            }
284:
285:            public void setBaseMapStyles(Map styles) {
286:                baseMapStyles = styles;
287:            }
288:
289:            public Map getBaseMapStyles() {
290:                return baseMapStyles;
291:            }
292:
293:            public void setBaseMapEnvelopes(Map envelopes) {
294:                baseMapEnvelopes = envelopes;
295:            }
296:
297:            public Map getBaseMapEnvelopes() {
298:                return baseMapEnvelopes;
299:            }
300:
301:            /**
302:             * @param allowInterpolation interpolation hint.
303:             */
304:            public void setAllowInterpolation(String allowInterpolation) {
305:                this .allowInterpolation = allowInterpolation;
306:            }
307:
308:            /**
309:             * @return The value of the interpolation rendering hint.
310:             */
311:            public String getAllowInterpolation() {
312:                return allowInterpolation;
313:            }
314:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.