001 //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/branches/2.2_testing/src/org/deegree/ogcwebservices/wfs/capabilities/WFSOperationsMetadata.java $
002 /*---------------- FILE HEADER ------------------------------------------
003
004 This file is part of deegree.
005 Copyright (C) 2001-2008 by:
006 EXSE, Department of Geography, University of Bonn
007 http://www.giub.uni-bonn.de/deegree/
008 lat/lon GmbH
009 http://www.lat-lon.de
010
011 This library is free software; you can redistribute it and/or
012 modify it under the terms of the GNU Lesser General Public
013 License as published by the Free Software Foundation; either
014 version 2.1 of the License, or (at your option) any later version.
015
016 This library is distributed in the hope that it will be useful,
017 but WITHOUT ANY WARRANTY; without even the implied warranty of
018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
019 Lesser General Public License for more details.
020
021 You should have received a copy of the GNU Lesser General Public
022 License along with this library; if not, write to the Free Software
023 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
024
025 Contact:
026
027 Andreas Poth
028 lat/lon GmbH
029 Aennchenstr. 19
030 53115 Bonn
031 Germany
032 E-Mail: poth@lat-lon.de
033
034 Prof. Dr. Klaus Greve
035 Department of Geography
036 University of Bonn
037 Meckenheimer Allee 166
038 53115 Bonn
039 Germany
040 E-Mail: greve@giub.uni-bonn.de
041
042
043 ---------------------------------------------------------------------------*/
044 package org.deegree.ogcwebservices.wfs.capabilities;
045
046 import java.util.ArrayList;
047 import java.util.List;
048
049 import org.deegree.ogcwebservices.getcapabilities.Operation;
050 import org.deegree.ogcwebservices.getcapabilities.OperationsMetadata;
051 import org.deegree.owscommon.OWSDomainType;
052
053 /**
054 * Represents the <code>OperationMetadata</code> part in the capabilities document of a WFS
055 * according to the <code>Web Feature Service Implementation Specification 1.1.0</code>.
056 * <p>
057 * In addition to the <code>GetCapabilities</code> operation that all <code>OWS 0.3</code>
058 * compliant services must implement, it may define some or all of the following operations: <table
059 * border="1">
060 * <tr>
061 * <th>Name</th>
062 * <th>Mandatory?</th>
063 * <th>Function</th>
064 * </tr>
065 * <tr>
066 * <td><code>DescribeFeatureType</code></td>
067 * <td align="center">X</td>
068 * <td>The function of the <code>DescribeFeatureType</code> operation is to generate a schema
069 * description of feature types serviced by a WFS implementation.</td>
070 * </tr>
071 * <tr>
072 * <td><code>GetFeature</code></td>
073 * <td align="center">X</td>
074 * <td>The <code>GetFeature</code> operation allows retrieval of features from a web feature
075 * service.</td>
076 * </tr>
077 * <tr>
078 * <td><code>GetFeatureWithLock</code></td>
079 * <td align="center">-</td>
080 * <td>The lock action of the <code>GetFeatureWithLock</code> request is to attempt to lock all
081 * identified feature instances. If all identified feature instances cannot be locked, then an
082 * exception report should be generated.</td>
083 * </tr>
084 * <tr>
085 * <td><code>GetGMLObject</code></td>
086 * <td align="center">-</td>
087 * <td>The <code>GetGMLObject</code> operation allows retrieval of features and elements by ID
088 * from a web feature service.</td>
089 * </tr>
090 * <tr>
091 * <td><code>LockFeature</code></td>
092 * <td align="center">-</td>
093 * <td>The purpose of the <code>LockFeature</code> operation is to expose a long term feature
094 * locking mechanism to ensure consistency. The lock is considered long term because network latency
095 * would make feature locks last relatively longer than native commercial database locks.</td>
096 * </tr>
097 * <tr>
098 * <td><code>Transaction</code></td>
099 * <td align="center">-</td>
100 * <td>The <code>Transaction</code> operation is used to describe data transformation operations
101 * that are to be applied to web accessible feature instances. When the transaction has been
102 * completed, a web feature service will generate an XML response document indicating the completion
103 * status of the transaction.</td>
104 * </tr>
105 * </table>
106 *
107 * @see org.deegree.ogcwebservices.getcapabilities.OperationsMetadata
108 * @author <a href="mailto:poth@lat-lon.de">Andreas Poth </a>
109 * @author last edited by: $Author: apoth $
110 *
111 * @version $Revision: 9345 $, $Date: 2007-12-27 17:22:25 +0100 (Do, 27 Dez 2007) $
112 */
113 public class WFSOperationsMetadata extends OperationsMetadata {
114
115 private static final long serialVersionUID = -3953425919713834071L;
116
117 /**
118 *
119 */
120 public static final String DESCRIBE_FEATURETYPE_NAME = "DescribeFeatureType";
121
122 /**
123 *
124 */
125 public static final String GET_FEATURE_NAME = "GetFeature";
126
127 /**
128 *
129 */
130 public static final String GET_FEATURE_WITH_LOCK_NAME = "GetFeatureWithLock";
131
132 /**
133 *
134 */
135 public static final String GET_GML_OBJECT_NAME = "GetGMLObject";
136
137 /**
138 *
139 */
140 public static final String LOCK_FEATURE_NAME = "LockFeature";
141
142 /**
143 *
144 */
145 public static final String TRANSACTION_NAME = "Transaction";
146
147 private Operation describeFeatureType;
148
149 private Operation getFeature;
150
151 private Operation getFeatureWithLock;
152
153 private Operation getGMLObject;
154
155 private Operation lockFeature;
156
157 private Operation transaction;
158
159 /**
160 * Constructs a new <code>WFSOperationsMetadata</code> instance from the given parameters.
161 *
162 * @param getCapabilities
163 * @param describeFeatureType
164 * @param getFeature
165 * @param getFeatureWithLock
166 * optional operation (may be null)
167 * @param getGMLObject
168 * optional operation (may be null)
169 * @param lockFeature
170 * optional operation (may be null)
171 * @param transaction
172 * optional operation (may be null)
173 * @param parameters
174 * @param constraints
175 */
176 public WFSOperationsMetadata( Operation getCapabilities, Operation describeFeatureType,
177 Operation getFeature, Operation getFeatureWithLock,
178 Operation getGMLObject, Operation lockFeature,
179 Operation transaction, OWSDomainType[] parameters,
180 OWSDomainType[] constraints ) {
181 super( getCapabilities, parameters, constraints );
182 this.describeFeatureType = describeFeatureType;
183 this.getFeature = getFeature;
184 this.getFeatureWithLock = getFeatureWithLock;
185 this.getGMLObject = getGMLObject;
186 this.lockFeature = lockFeature;
187 this.transaction = transaction;
188 }
189
190 /**
191 * Returns all <code>Operations</code> known to the WFS.
192 *
193 * @return all <code>Operations</code> known to the WFS.
194 */
195 @Override
196 public Operation[] getOperations() {
197 List<Operation> list = new ArrayList<Operation>( 10 );
198 list.add( getFeature );
199 list.add( describeFeatureType );
200 list.add( getCapabilitiesOperation );
201 if ( getFeatureWithLock != null ) {
202 list.add( getFeatureWithLock );
203 }
204 if ( getGMLObject != null ) {
205 list.add( getGMLObject );
206 }
207 if ( lockFeature != null ) {
208 list.add( lockFeature );
209 }
210 if ( transaction != null ) {
211 list.add( transaction );
212 }
213
214 Operation[] ops = new Operation[list.size()];
215 return list.toArray( ops );
216 }
217
218 /**
219 * @return Returns the describeFeatureType <code>Operation</code>.
220 */
221 public Operation getDescribeFeatureType() {
222 return describeFeatureType;
223 }
224
225 /**
226 * @param describeFeatureType
227 * The describeFeatureType <code>Operation</code> to set.
228 */
229 public void setDescribeFeatureType( Operation describeFeatureType ) {
230 this.describeFeatureType = describeFeatureType;
231 }
232
233 /**
234 * @return Returns the getFeature <code>Operation</code>.
235 */
236 public Operation getGetFeature() {
237 return getFeature;
238 }
239
240 /**
241 * @param getFeature
242 * The getFeature <code>Operation</code> to set.
243 */
244 public void setGetFeature( Operation getFeature ) {
245 this.getFeature = getFeature;
246 }
247
248 /**
249 * @return Returns the getFeatureWithLock <code>Operation</code>.
250 */
251 public Operation getGetFeatureWithLock() {
252 return getFeatureWithLock;
253 }
254
255 /**
256 * @param getFeatureWithLock
257 * The getFeatureWithLock <code>Operation</code> to set.
258 */
259 public void setGetFeatureWithLock( Operation getFeatureWithLock ) {
260 this.getFeatureWithLock = getFeatureWithLock;
261 }
262
263 /**
264 * @return Returns the getGMLObject <code>Operation</code>.
265 */
266 public Operation getGetGMLObject() {
267 return getGMLObject;
268 }
269
270 /**
271 * @param getGMLObject
272 * The getGMLObject <code>Operation</code> to set.
273 */
274 public void setGetGMLObject( Operation getGMLObject ) {
275 this.getGMLObject = getGMLObject;
276 }
277
278 /**
279 * @return Returns the lockFeature <code>Operation</code>.
280 */
281 public Operation getLockFeature() {
282 return lockFeature;
283 }
284
285 /**
286 * @param lockFeature
287 * The lockFeature <code>Operation</code> to set.
288 */
289 public void setLockFeature( Operation lockFeature ) {
290 this.lockFeature = lockFeature;
291 }
292
293 /**
294 * @return Returns the transaction <code>Operation</code>.
295 */
296 public Operation getTransaction() {
297 return transaction;
298 }
299
300 /**
301 * @param transaction
302 * The transaction <code>Operation</code> to set.
303 */
304 public void setTransaction( Operation transaction ) {
305 this.transaction = transaction;
306 }
307 }