Source Code Cross Referenced for DefaultWebFeatureService.java in  » GIS » GeoServer » org » geoserver » wfs » 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.geoserver.wfs 
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.geoserver.wfs;
006:
007:        import net.opengis.wfs.DescribeFeatureTypeType;
008:        import net.opengis.wfs.FeatureCollectionType;
009:        import net.opengis.wfs.GetCapabilitiesType;
010:        import net.opengis.wfs.GetFeatureType;
011:        import net.opengis.wfs.GetFeatureWithLockType;
012:        import net.opengis.wfs.LockFeatureResponseType;
013:        import net.opengis.wfs.LockFeatureType;
014:        import net.opengis.wfs.TransactionResponseType;
015:        import net.opengis.wfs.TransactionType;
016:        import org.geotools.xml.transform.TransformerBase;
017:        import org.opengis.filter.FilterFactory;
018:        import org.springframework.beans.BeansException;
019:        import org.springframework.context.ApplicationContext;
020:        import org.springframework.context.ApplicationContextAware;
021:        import org.vfny.geoserver.global.Data;
022:        import org.vfny.geoserver.global.FeatureTypeInfo;
023:
024:        /**
025:         * Web Feature Service implementation.
026:         *
027:         * @author Justin Deoliveira, The Open Planning Project
028:         *
029:         */
030:        public class DefaultWebFeatureService implements  WebFeatureService,
031:                ApplicationContextAware {
032:            /**
033:             * WFS service configuration.
034:             */
035:            protected WFS wfs;
036:
037:            /**
038:             * The catalog
039:             */
040:            protected Data catalog;
041:
042:            /**
043:             * Filter factory
044:             */
045:            protected FilterFactory filterFactory;
046:
047:            /**
048:             * The spring application context, used to look up transaction listeners, plugins and
049:             * element handlers
050:             */
051:            protected ApplicationContext context;
052:
053:            public DefaultWebFeatureService(WFS wfs, Data catalog) {
054:                this .wfs = wfs;
055:                this .catalog = catalog;
056:            }
057:
058:            /**
059:             * Sets the fitler factory.
060:             */
061:            public void setFilterFactory(FilterFactory filterFactory) {
062:                this .filterFactory = filterFactory;
063:            }
064:
065:            /**
066:             * WFS GetCapabilities operation.
067:             *
068:             * @param request The get capabilities request.
069:             *
070:             * @return A transformer instance capable of serializing a wfs capabilities
071:             * document.
072:             *
073:             * @throws WFSException Any service exceptions.
074:             */
075:            public TransformerBase getCapabilities(GetCapabilitiesType request)
076:                    throws WFSException {
077:                return new GetCapabilities(wfs, catalog).run(request);
078:            }
079:
080:            /**
081:             * WFS DescribeFeatureType operation.
082:             *
083:             * @param request The describe feature type request.
084:             *
085:             * @return A set of feature type metadata objects.
086:             *
087:             * @throws WFSException Any service exceptions.
088:             */
089:            public FeatureTypeInfo[] describeFeatureType(
090:                    DescribeFeatureTypeType request) throws WFSException {
091:                return new DescribeFeatureType(wfs, catalog).run(request);
092:            }
093:
094:            /**
095:             * WFS GetFeature operation.
096:             *
097:             * @param request The get feature request.
098:             *
099:             * @return A feature collection type instance.
100:             *
101:             * @throws WFSException Any service exceptions.
102:             */
103:            public FeatureCollectionType getFeature(GetFeatureType request)
104:                    throws WFSException {
105:                GetFeature getFeature = new GetFeature(wfs, catalog);
106:                getFeature.setFilterFactory(filterFactory);
107:
108:                return getFeature.run(request);
109:            }
110:
111:            /**
112:             * WFS GetFeatureWithLock operation.
113:             *
114:             * @param request The get feature with lock request.
115:             *
116:             * @return A feature collection type instance.
117:             *
118:             * @throws WFSException Any service exceptions.
119:             */
120:            public FeatureCollectionType getFeatureWithLock(
121:                    GetFeatureWithLockType request) throws WFSException {
122:                return getFeature(request);
123:            }
124:
125:            /**
126:             * WFS LockFeatureType operation.
127:             *
128:             * @param request The lock feature request.
129:             *
130:             * @return A lock feture response type.
131:             *
132:             * @throws WFSException An service exceptions.
133:             */
134:            public LockFeatureResponseType lockFeature(LockFeatureType request)
135:                    throws WFSException {
136:                LockFeature lockFeature = new LockFeature(wfs, catalog);
137:                lockFeature.setFilterFactory(filterFactory);
138:
139:                return lockFeature.lockFeature(request);
140:            }
141:
142:            /**
143:             * WFS transaction operation.
144:             *
145:             * @param request The transaction request.
146:             *
147:             * @return A transaction response instance.
148:             *
149:             * @throws WFSException Any service exceptions.
150:             */
151:            public TransactionResponseType transaction(TransactionType request)
152:                    throws WFSException {
153:                Transaction transaction = new Transaction(wfs, catalog, context);
154:                transaction.setFilterFactory(filterFactory);
155:
156:                return transaction.transaction(request);
157:            }
158:
159:            //the following operations are not part of the spec
160:            public void releaseLock(String lockId) throws WFSException {
161:                new LockFeature(wfs, catalog).release(lockId);
162:            }
163:
164:            public void releaseAllLocks() throws WFSException {
165:                new LockFeature(wfs, catalog).releaseAll();
166:            }
167:
168:            public void setApplicationContext(ApplicationContext context)
169:                    throws BeansException {
170:                this.context = context;
171:            }
172:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.