Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.remoteclient / src / main / java / org / gvsig / remoteclient / wfs / request / WFSTLockFeatureRequest.java @ 40596

History | View | Annotate | Download (3.38 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.remoteclient.wfs.request;
25

    
26
import org.gvsig.remoteclient.utils.CapabilitiesTags;
27
import org.gvsig.remoteclient.wfs.WFSProtocolHandler;
28
import org.gvsig.remoteclient.wfs.WFSStatus;
29

    
30
/**
31
 * Web connections are inherently stateless. As a consequence 
32
 * of this, the semantics of serializable transactions are not 
33
 * preserved. To understand the issue, consider an update operation.
34
 * The client fetches a feature instance. The feature is then 
35
 * modified on the client side, and submitted back to the database 
36
 * via a Transaction request for update. Serializability is lost 
37
 * since there is nothing to guarantee that while the feature was 
38
 * being modified on the client side, another client did not come 
39
 * along and update that same feature in the database.
40
 * One way to ensure serializability is to require that access to
41
 * data be done in a mutually exclusive manner; that is while one 
42
 * transaction accesses a data item, no other transaction can modify 
43
 * the same data item. This can be accomplished by using locks that 
44
 * control access to the data.
45
 * The purpose of the LockFeature operation is to expose a long 
46
 * term feature locking mechanism to ensure consistency. The lock
47
 * is considered long term because network latency would make 
48
 * feature locks last relatively longer than native commercial 
49
 * database locks.
50
 * The LockFeature operation is optional and does not need to be 
51
 * implemented for a WFS implementation to conform to this 
52
 * specification. If a WFS implements the LockFeature operation, 
53
 * this fact must be advertised in the capabilities document
54
 * @see http://www.opengeospatial.org/standards/wfs
55
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
56
 */
57
public abstract class WFSTLockFeatureRequest extends WFSRequest{
58

    
59
        public WFSTLockFeatureRequest(WFSStatus status,
60
                        WFSProtocolHandler protocolHandler) {
61
                super(status, protocolHandler);        
62
                setDeleted(true);
63
        }
64

    
65
        /*
66
         * (non-Javadoc)
67
         * @see org.gvsig.remoteClient.wfs.requests.WFSRequest#getTempFilePrefix()
68
         */
69
        protected String getTempFilePrefix() {
70
                return "wfs_lockFeature.xml";
71
        }
72

    
73
        /*
74
         * (non-Javadoc)
75
         * @see org.gvsig.remoteClient.wfs.requests.WFSRequest#getOperationCode()
76
         */
77
        protected String getOperationName() {
78
                return CapabilitiesTags.WFS_LOCKFEATURE;
79
        }
80

    
81
        /*
82
         * (non-Javadoc)
83
         * @see org.gvsig.remoteClient.wfs.requests.WFSRequest#getSchemaLocation()
84
         */
85
        protected String getSchemaLocation() {
86
                return "../wfs/1.0.0/WFS-transaction.xsd";
87
        }
88
}