Source Code Cross Referenced for KMLUtils.java in  » GIS » GeoServer » org » vfny » geoserver » wms » responses » map » kml » 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.wms.responses.map.kml 
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.wms.responses.map.kml;
006:
007:        import com.vividsolutions.jts.geom.Envelope;
008:        import org.geoserver.wms.util.WMSRequests;
009:        import org.geotools.map.MapLayer;
010:        import org.vfny.geoserver.wms.WMSMapContext;
011:        import org.xml.sax.Attributes;
012:        import org.xml.sax.helpers.AttributesImpl;
013:
014:        /**
015:         * Some convenience methods used by the kml transformers.
016:         *
017:         * @author Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org
018:         * @deprecated use {@link WMSRequests}.
019:         */
020:        public class KMLUtils {
021:            /**
022:             * Encodes the url of a GetMap request from a map context + map layer.
023:             * <p>
024:             * If the <tt>mapLayer</tt> argument is <code>null</code>, the request is
025:             * made including all layers in the <tt>mapContexT</tt>.
026:             * </p>
027:             * <p>
028:             * If the <tt>bbox</tt> argument is <code>null</code>. {@link WMSMapContext#getAreaOfInterest()}
029:             * is used for the bbox parameter.
030:             * </p>
031:             *
032:             * @param mapContext The map context.
033:             * @param mapLayer The Map layer, may be <code>null</code>.
034:             * @param bbox The bounding box of the request, may be <code>null</code>.
035:             * @param kvp Additional or overidding kvp parameters, may be <code>null</code>
036:             * @param tile Flag controlling wether the request should be made against tile cache
037:             *
038:             * @return The full url for a getMap request.
039:             * @deprecated use {@link WMSRequests#getGetMapUrl(WMSMapContext, MapLayer, Envelope, String[])}
040:             */
041:            public static String getMapUrl(WMSMapContext mapContext,
042:                    MapLayer mapLayer, Envelope bbox, String[] kvp, boolean tile) {
043:
044:                if (tile) {
045:                    return WMSRequests.getTiledGetMapUrl(mapContext
046:                            .getRequest(), mapLayer, bbox, kvp);
047:
048:                }
049:
050:                return WMSRequests.getGetMapUrl(mapContext.getRequest(),
051:                        mapLayer, bbox, kvp);
052:            }
053:
054:            /**
055:             * Encodes the url of a GetMap request from a map context + map layer.
056:             * <p>
057:             * If the <tt>mapLayer</tt> argument is <code>null</code>, the request is
058:             * made including all layers in the <tt>mapContexT</tt>.
059:             * </p>
060:             * @param mapContext The map context.
061:             * @param mapLayer The Map layer, may be <code>null</code>
062:             * @param kvp Additional or overidding kvp parameters, may be <code>null</code>
063:             * @param tile Flag controlling wether the request should be made against tile cache
064:             *
065:             * @return The full url for a getMap request.
066:             * @deprecated use {@link WMSRequests#getGetMapUrl(WMSMapContext, MapLayer, Envelope, String[])}
067:             */
068:            public static String getMapUrl(WMSMapContext mapContext,
069:                    MapLayer mapLayer, boolean tile) {
070:                return getMapUrl(mapContext, mapLayer, mapContext
071:                        .getAreaOfInterest(), null, tile);
072:            }
073:
074:            /**
075:             * Encodes the url for a GetLegendGraphic request from a map context + map layer.
076:             *
077:             * @param mapContext The map context.
078:             * @param mapLayer The map layer.
079:             * @param kvp Additional or overidding kvp parameters, may be <code>null</code>
080:             *
081:             * @return A map containing all the key value pairs for a GetLegendGraphic request.
082:             * @deprecated use {@link WMSRequests#getGetLegendGraphicUrl(WMSMapContext, MapLayer, String[])
083:             */
084:            public static String getLegendGraphicUrl(WMSMapContext mapContext,
085:                    MapLayer mapLayer, String[] kvp) {
086:                return WMSRequests.getGetLegendGraphicUrl(mapContext
087:                        .getRequest(), mapLayer, kvp);
088:            }
089:
090:            /**
091:             * Creates sax attributes from an array of key value pairs.
092:             *
093:             * @param nameValuePairs Alternating key value pair array.
094:             *
095:             */
096:            public static Attributes attributes(String[] nameValuePairs) {
097:                AttributesImpl attributes = new AttributesImpl();
098:
099:                for (int i = 0; i < nameValuePairs.length; i += 2) {
100:                    String name = nameValuePairs[i];
101:                    String value = nameValuePairs[i + 1];
102:
103:                    attributes.addAttribute("", name, name, "", value);
104:                }
105:
106:                return attributes;
107:            }
108:        }
w_w__w__._j___a__v__a__2_s_.__c__om__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.