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