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 @ 40559

History | View | Annotate | Download (4.61 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
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
31
 *
32
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
33
 *
34
 * This program is free software; you can redistribute it and/or
35
 * modify it under the terms of the GNU General Public License
36
 * as published by the Free Software Foundation; either version 2
37
 * of the License, or (at your option) any later version.
38
 *
39
 * This program is distributed in the hope that it will be useful,
40
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
41
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
42
 * GNU General Public License for more details.
43
 *
44
 * You should have received a copy of the GNU General Public License
45
 * along with this program; if not, write to the Free Software
46
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
47
 *
48
 * For more information, contact:
49
 *
50
 *  Generalitat Valenciana
51
 *   Conselleria d'Infraestructures i Transport
52
 *   Av. Blasco Ib??ez, 50
53
 *   46010 VALENCIA
54
 *   SPAIN
55
 *
56
 *      +34 963862235
57
 *   gvsig@gva.es
58
 *      www.gvsig.gva.es
59
 *
60
 *    or
61
 *
62
 *   IVER T.I. S.A
63
 *   Salamanca 50
64
 *   46005 Valencia
65
 *   Spain
66
 *
67
 *   +34 963163400
68
 *   dac@iver.es
69
 */
70
/* CVS MESSAGES:
71
 *
72
 * $Id$
73
 * $Log$
74
 *
75
 */
76
/**
77
 * Web connections are inherently stateless. As a consequence 
78
 * of this, the semantics of serializable transactions are not 
79
 * preserved. To understand the issue, consider an update operation.
80
 * The client fetches a feature instance. The feature is then 
81
 * modified on the client side, and submitted back to the database 
82
 * via a Transaction request for update. Serializability is lost 
83
 * since there is nothing to guarantee that while the feature was 
84
 * being modified on the client side, another client did not come 
85
 * along and update that same feature in the database.
86
 * One way to ensure serializability is to require that access to
87
 * data be done in a mutually exclusive manner; that is while one 
88
 * transaction accesses a data item, no other transaction can modify 
89
 * the same data item. This can be accomplished by using locks that 
90
 * control access to the data.
91
 * The purpose of the LockFeature operation is to expose a long 
92
 * term feature locking mechanism to ensure consistency. The lock
93
 * is considered long term because network latency would make 
94
 * feature locks last relatively longer than native commercial 
95
 * database locks.
96
 * The LockFeature operation is optional and does not need to be 
97
 * implemented for a WFS implementation to conform to this 
98
 * specification. If a WFS implements the LockFeature operation, 
99
 * this fact must be advertised in the capabilities document
100
 * @see http://www.opengeospatial.org/standards/wfs
101
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
102
 */
103
public abstract class WFSTLockFeatureRequest extends WFSRequest{
104

    
105
        public WFSTLockFeatureRequest(WFSStatus status,
106
                        WFSProtocolHandler protocolHandler) {
107
                super(status, protocolHandler);        
108
                setDeleted(true);
109
        }
110

    
111
        /*
112
         * (non-Javadoc)
113
         * @see org.gvsig.remoteClient.wfs.requests.WFSRequest#getTempFilePrefix()
114
         */
115
        protected String getTempFilePrefix() {
116
                return "wfs_lockFeature.xml";
117
        }
118

    
119
        /*
120
         * (non-Javadoc)
121
         * @see org.gvsig.remoteClient.wfs.requests.WFSRequest#getOperationCode()
122
         */
123
        protected String getOperationName() {
124
                return CapabilitiesTags.WFS_LOCKFEATURE;
125
        }
126

    
127
        /*
128
         * (non-Javadoc)
129
         * @see org.gvsig.remoteClient.wfs.requests.WFSRequest#getSchemaLocation()
130
         */
131
        protected String getSchemaLocation() {
132
                return "../wfs/1.0.0/WFS-transaction.xsd";
133
        }
134
}