Source Code Cross Referenced for TransactionTypeBinding.java in  » GIS » GeoServer » org » geoserver » wfs » xml » v1_1_0 » 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.xml.v1_1_0 
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.xml.v1_1_0;
006:
007:        import net.opengis.wfs.AllSomeType;
008:        import net.opengis.wfs.DeleteElementType;
009:        import net.opengis.wfs.InsertElementType;
010:        import net.opengis.wfs.NativeType;
011:        import net.opengis.wfs.TransactionType;
012:        import net.opengis.wfs.UpdateElementType;
013:        import net.opengis.wfs.WfsFactory;
014:        import org.geotools.xml.AbstractComplexEMFBinding;
015:        import org.geotools.xml.ElementInstance;
016:        import org.geotools.xml.Node;
017:        import java.util.Iterator;
018:        import javax.xml.namespace.QName;
019:
020:        /**
021:         * Binding object for the type http://www.opengis.net/wfs:TransactionType.
022:         *
023:         * <p>
024:         *        <pre>
025:         *         <code>
026:         *  &lt;xsd:complexType name="TransactionType"&gt;
027:         *      &lt;xsd:annotation&gt;
028:         *          &lt;xsd:documentation&gt;
029:         *              The TransactionType defines the Transaction operation.  A
030:         *              Transaction element contains one or more Insert, Update
031:         *              Delete and Native elements that allow a client application
032:         *              to create, modify or remove feature instances from the
033:         *              feature repository that a Web Feature Service controls.
034:         *           &lt;/xsd:documentation&gt;
035:         *      &lt;/xsd:annotation&gt;
036:         *      &lt;xsd:complexContent&gt;
037:         *          &lt;xsd:extension base="ows:GetCapabilitiesType"&gt;
038:         *              &lt;xsd:sequence&gt;
039:         *                  &lt;xsd:element minOccurs="0" ref="wfs:LockId"&gt;
040:         *                      &lt;xsd:annotation&gt;
041:         *                          &lt;xsd:documentation&gt;
042:         *                          In order for a client application to operate upon
043:         *                          locked feature instances, the Transaction request
044:         *                          must include the LockId element.  The content of
045:         *                          this element must be the lock identifier the client
046:         *                          application obtained from a previous
047:         *                          GetFeatureWithLock or LockFeature operation.
048:         *
049:         *                          If the correct lock identifier is specified the Web
050:         *                          Feature Service knows that the client application may
051:         *                          operate upon the locked feature instances.
052:         *
053:         *                          No LockId element needs to be specified to operate upon
054:         *                          unlocked features.
055:         *                       &lt;/xsd:documentation&gt;
056:         *                      &lt;/xsd:annotation&gt;
057:         *                  &lt;/xsd:element&gt;
058:         *                  &lt;xsd:choice maxOccurs="unbounded" minOccurs="0"&gt;
059:         *                      &lt;xsd:element ref="wfs:Insert"/&gt;
060:         *                      &lt;xsd:element ref="wfs:Update"/&gt;
061:         *                      &lt;xsd:element ref="wfs:Delete"/&gt;
062:         *                      &lt;xsd:element ref="wfs:Native"/&gt;
063:         *                  &lt;/xsd:choice&gt;
064:         *              &lt;/xsd:sequence&gt;
065:         *              &lt;xsd:attribute name="releaseAction" type="wfs:AllSomeType" use="optional"&gt;
066:         *                  &lt;xsd:annotation&gt;
067:         *                      &lt;xsd:documentation&gt;
068:         *                       The releaseAction attribute is used to control how a Web
069:         *                       Feature service releases locks on feature instances after
070:         *                       a Transaction request has been processed.
071:         *
072:         *                       Valid values are ALL or SOME.
073:         *
074:         *                       A value of ALL means that the Web Feature Service should
075:         *                       release the locks of all feature instances locked with the
076:         *                       specified lockId regardless or whether or not the features
077:         *                       were actually modified.
078:         *
079:         *                       A value of SOME means that the Web Feature Service will
080:         *                       only release the locks held on feature instances that
081:         *                       were actually operated upon by the transaction.  The
082:         *                       lockId that the client application obtained shall remain
083:         *                       valid and the other, unmodified, feature instances shall
084:         *                       remain locked.
085:         *
086:         *                       If the expiry attribute was specified in the original
087:         *                       operation that locked the feature instances, then the
088:         *                       expiry counter will be reset to give the client
089:         *                       application that same amount of time to post subsequent
090:         *                       transactions against the locked features.
091:         *                    &lt;/xsd:documentation&gt;
092:         *                  &lt;/xsd:annotation&gt;
093:         *              &lt;/xsd:attribute&gt;
094:         *          &lt;/xsd:extension&gt;
095:         *      &lt;/xsd:complexContent&gt;
096:         *  &lt;/xsd:complexType&gt;
097:         *
098:         *          </code>
099:         *         </pre>
100:         * </p>
101:         *
102:         * @generated
103:         */
104:        public class TransactionTypeBinding extends AbstractComplexEMFBinding {
105:            WfsFactory wfsfactory;
106:
107:            public TransactionTypeBinding(WfsFactory wfsfactory) {
108:                this .wfsfactory = wfsfactory;
109:            }
110:
111:            /**
112:             * @generated
113:             */
114:            public QName getTarget() {
115:                return WFS.TRANSACTIONTYPE;
116:            }
117:
118:            /**
119:             * Sets execution mode to be before
120:             */
121:            public int getExecutionMode() {
122:                return BEFORE;
123:            }
124:
125:            /**
126:             * <!-- begin-user-doc -->
127:             * <!-- end-user-doc -->
128:             *
129:             * @generated modifiable
130:             */
131:            public Class getType() {
132:                return TransactionType.class;
133:            }
134:
135:            /**
136:             * <!-- begin-user-doc -->
137:             * <!-- end-user-doc -->
138:             *
139:             * @generated modifiable
140:             */
141:            public Object parse(ElementInstance instance, Node node,
142:                    Object value) throws Exception {
143:                TransactionType transaction = wfsfactory
144:                        .createTransactionType();
145:
146:                //&lt;xsd:element minOccurs="0" ref="wfs:LockId"&gt;
147:                if (node.hasChild("LockId")) {
148:                    transaction
149:                            .setLockId((String) node.getChildValue("LockId"));
150:                }
151:
152:                //&lt;xsd:choice maxOccurs="unbounded" minOccurs="0"&gt;
153:                //  &lt;xsd:element ref="wfs:Insert"/&gt;
154:                //  &lt;xsd:element ref="wfs:Update"/&gt;
155:                //  &lt;xsd:element ref="wfs:Delete"/&gt;
156:                //  &lt;xsd:element ref="wfs:Native"/&gt;
157:                //&lt;/xsd:choice&gt;
158:                for (Iterator itr = node.getChildren().iterator(); itr
159:                        .hasNext();) {
160:                    Node child = (Node) itr.next();
161:                    Object cv = child.getValue();
162:
163:                    if (cv instanceof  InsertElementType) {
164:                        transaction.getInsert().add(cv);
165:                    } else if (cv instanceof  UpdateElementType) {
166:                        transaction.getUpdate().add(cv);
167:                    } else if (cv instanceof  DeleteElementType) {
168:                        transaction.getDelete().add(cv);
169:                    } else if (cv instanceof  NativeType) {
170:                        transaction.getNative().add(cv);
171:                    }
172:                }
173:
174:                //&lt;xsd:attribute name="releaseAction" type="wfs:AllSomeType" use="optional"&gt;
175:                if (node.hasAttribute(AllSomeType.class)) {
176:                    transaction.setReleaseAction((AllSomeType) node
177:                            .getAttributeValue(AllSomeType.class));
178:                }
179:
180:                return transaction;
181:            }
182:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.