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