Source Code Cross Referenced for GetMapProducerFactorySpi.java in  » GIS » GeoServer » org » vfny » geoserver » 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 » GeoServer » org.vfny.geoserver.wms 
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;
006:
007:        import org.geotools.factory.Factory;
008:        import org.vfny.geoserver.config.WMSConfig;
009:        import org.vfny.geoserver.global.WMS;
010:        import java.util.Set;
011:
012:        /**
013:         * Constructs a live GetMapProducer.
014:         *
015:         * <p>
016:         * An instance of this interface should exist for all map producers which want
017:         * to take advantage of the dynamic plugin system. In addition to implementing
018:         * this interface GetMap producers should have a services file:
019:         * </p>
020:         *
021:         * <p>
022:         * <code>org.vfny.geoserver.responses.wms.GetMapProducerFactorySpi</code>
023:         * </p>
024:         *
025:         * <p>
026:         * The file should contain a single line which gives the full name of the
027:         * implementing class.
028:         * </p>
029:         *
030:         * <p>
031:         * example:<br/><code>e.g.
032:         * org.vfny.geoserver.wms.GIFLegendGraphicProducerSpi</code>
033:         * </p>
034:         *
035:         * <p>
036:         * The factories are never called directly by client code, instead the
037:         * GeoTools' FactoryFinder class is used.
038:         * </p>
039:         *
040:         * <p>
041:         * The following example shows how a user might obtain GetMapProducer capable
042:         * of generating a map image in GIF format and send the generated legend to a
043:         * file:
044:         * </p>
045:         *
046:         * <p>
047:         * <pre><code>
048:         *         WMSConfig config = getServletContext().getAttribute(WMSConfig.CONFIG_KEY);
049:         *
050:         *  GetMapProducerSpi gmpf = null;
051:         *  Iterator it = FactoryFinder.factories(GeMapProducerFactorySpi.class);
052:         *  while (it.hasNext()) {
053:         *          GeMapProducerFactorySpi tmpGmpf = (GeMapProducerFactorySpi) it.next();
054:         *          if (tmpGmpf.canProduce("image/gif")) {
055:         *                  gmpf = tmpGmpf;
056:         *                  break;
057:         *          }
058:         *  }
059:         *  ...
060:         *  GetMapProducer producer = gmpf.createMapProducer("image/gif");
061:         *         WMSMapContext ctx = ...
062:         *  producer.produceMap(ctx);
063:         *  OutputStream out = new FileOutputStream("/map.gif");
064:         *  producer.writeTo(out);
065:         * </code></pre>
066:         * </p>
067:         *
068:         * @author Gabriel Roldan, Axios Engineering
069:         * @version $Id: GetMapProducerFactorySpi.java 6326 2007-03-15 18:36:40Z jdeolive $
070:         */
071:        public interface GetMapProducerFactorySpi extends Factory {
072:            /**
073:             * Returns a descriptive name for the factory instance.
074:             *
075:             * @return a descriptive name for the factory instance
076:             */
077:            String getName();
078:
079:            /**
080:             * Returns a <code>java.util.Set&lt;String&gt;</code> of the MIME types the
081:             * map producers this factory can create are able to handle.
082:             *
083:             * @return the Set of supported output image mime types.
084:             */
085:            Set getSupportedFormats();
086:
087:            /**
088:             * Checks if the GetMapProducer instances this factory serves will be able
089:             * of working properly (e.g., external dependencies are in place). This
090:             * method should be used to avoid asking for producer instances if they
091:             * are likely to fail.
092:             *
093:             * @return wether this factory is able to produce producer instances.
094:             */
095:            boolean isAvailable();
096:
097:            /**
098:             * Returns wether the legend producers created by this factory can create
099:             * map images in the specified output format.
100:             *
101:             * @param mapFormat a MIME type string to check if this producer is able to
102:             *        handle.
103:             *
104:             * @return <code>true</code> if <code>mimeType</code> is an image format
105:             *         supported by the producers this factory serves.
106:             */
107:            boolean canProduce(String mapFormat);
108:
109:            /**
110:             * Creates and instance of a GetMapProducer suitable to create map images
111:             * in the specified image format.
112:             *
113:             * @param mapFormat the MIME type of the desired image
114:             * @param wms the WMS module
115:             *
116:             * @return a GetMapProducer capable of creating maps in <code>format</code>
117:             *         image format.
118:             *
119:             * @throws IllegalArgumentException if <code>format</code> is not one of
120:             *         the MIME types this producer can create images in.
121:             */
122:            GetMapProducer createMapProducer(String mapFormat, WMS wms)
123:                    throws IllegalArgumentException;
124:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.