Source Code Cross Referenced for GetFeatureTypeBinding.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.GetFeatureType;
008:        import net.opengis.wfs.QueryType;
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.math.BigInteger;
014:        import javax.xml.namespace.QName;
015:
016:        /**
017:         * Binding object for the type http://www.opengis.net/wfs:GetFeatureType.
018:         *
019:         * <p>
020:         *        <pre>
021:         *         <code>
022:         *  &lt;xsd:complexType name="GetFeatureType"&gt;       &lt;xsd:annotation&gt;
023:         *              &lt;xsd:documentation&gt;             A GetFeature element
024:         *              contains one or more Query elements             that
025:         *              describe a query operation on one feature type.  In
026:         *              response to a GetFeature request, a Web Feature Service
027:         *              must be able to generate a GML2 response that validates
028:         *              using a schema generated by the DescribeFeatureType request.
029:         *              A Web Feature Service may support other possibly non-XML
030:         *              (and even binary) output formats as long as those formats
031:         *              are advertised in the capabilities document.
032:         *          &lt;/xsd:documentation&gt;       &lt;/xsd:annotation&gt;
033:         *          &lt;xsd:sequence&gt;          &lt;xsd:element maxOccurs="unbounded"
034:         *          ref="wfs:Query"/&gt;       &lt;/xsd:sequence&gt;       &lt;xsd:attribute
035:         *          fixed="1.0.0" name="version" type="xsd:string" use="required"/&gt;
036:         *          &lt;xsd:attribute fixed="WFS" name="service" type="xsd:string"
037:         *      use="required"/&gt;       &lt;xsd:attribute name="handle"
038:         *          type="xsd:string" use="optional"/&gt;       &lt;xsd:attribute
039:         *          default="GML2" name="outputFormat" type="xsd:string"
040:         *          use="optional"&gt;          &lt;xsd:annotation&gt;
041:         *                  &lt;xsd:documentation&gt;                The outputFormat
042:         *                  attribute is used to specify the output
043:         *                  format that the Web Feature Service should generate in
044:         *                  response to a GetFeature or GetFeatureWithLock element.
045:         *                  The default value of GML2 indicates that the output is
046:         *                  an                XML document that conforms to the
047:         *                  Geography Markup Language                (GML)
048:         *                  Implementation Specification V2.0.                 Other
049:         *                  values may be used to specify other formats as long
050:         *                  as those values are advertised in the capabilities
051:         *                  document.                For example, the value WKB may
052:         *                  be used to indicate that a                 Well Known
053:         *                  Binary format be used to encode the output.
054:         *              &lt;/xsd:documentation&gt;          &lt;/xsd:annotation&gt;
055:         *      &lt;/xsd:attribute&gt;       &lt;xsd:attribute name="maxFeatures"
056:         *          type="xsd:positiveInteger" use="optional"&gt;
057:         *              &lt;xsd:annotation&gt;             &lt;xsd:documentation&gt;
058:         *                  The maxFeatures attribute is used to specify the maximum
059:         *                  number of features that a GetFeature operation should
060:         *                  generate (regardless of the actual number of query
061:         *                  hits).             &lt;/xsd:documentation&gt;
062:         *          &lt;/xsd:annotation&gt;       &lt;/xsd:attribute&gt;    &lt;/xsd:complexType&gt;
063:         *
064:         *          </code>
065:         *         </pre>
066:         * </p>
067:         *
068:         * @generated
069:         */
070:        public class GetFeatureTypeBinding extends AbstractComplexBinding {
071:            WfsFactory wfsfactory;
072:
073:            public GetFeatureTypeBinding(WfsFactory wfsfactory) {
074:                this .wfsfactory = wfsfactory;
075:            }
076:
077:            /**
078:             * @generated
079:             */
080:            public QName getTarget() {
081:                return WFS.GETFEATURETYPE;
082:            }
083:
084:            /**
085:             * <!-- begin-user-doc -->
086:             * <!-- end-user-doc -->
087:             *
088:             * @generated modifiable
089:             */
090:            public Class getType() {
091:                return GetFeatureType.class;
092:            }
093:
094:            /**
095:             * <!-- begin-user-doc -->
096:             * <!-- end-user-doc -->
097:             *
098:             * @generated modifiable
099:             */
100:            public Object parse(ElementInstance instance, Node node,
101:                    Object value) throws Exception {
102:                GetFeatureType getFeature = wfsfactory.createGetFeatureType();
103:
104:                WFSBindingUtils.service(getFeature, node);
105:                WFSBindingUtils.version(getFeature, node);
106:                WFSBindingUtils.outputFormat(getFeature, node, "GML2");
107:
108:                if (node.getAttributeValue("handle") != null) {
109:                    getFeature.setHandle((String) node
110:                            .getAttributeValue("handle"));
111:                }
112:
113:                //get the max features
114:                BigInteger maxFeatures = null;
115:                Number number = (Number) node.getAttributeValue("maxFeatures");
116:
117:                if (number != null) {
118:                    if (number instanceof  BigInteger) {
119:                        maxFeatures = (BigInteger) number;
120:                    } else {
121:                        maxFeatures = BigInteger.valueOf(number.longValue());
122:                    }
123:
124:                    getFeature.setMaxFeatures(maxFeatures);
125:                }
126:
127:                //queries
128:                getFeature.getQuery().addAll(
129:                        node.getChildValues(QueryType.class));
130:
131:                return getFeature;
132:            }
133:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.