⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 capabilitiestransformer.java

📁 电子地图服务器,搭建自己的地图服务
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
                end("ows:ServiceIdentification");
            }

            /**
                 * Encodes the ows:ServiceProvider element.
                 * <p>
                 * <pre>
                 * &lt;complexType&gt;
                 *        &lt;sequence&gt;
                 *           &lt;element name="ProviderName" type="string"&gt;
                 *           &lt;annotation&gt;
                 *        &lt;documentation&gt;A unique identifier for the service provider organization. &lt;/documentation&gt;
                 *     &lt;/annotation&gt;
                     *     &lt;/element&gt;
                     *           &lt;element name="ProviderSite" type="ows:OnlineResourceType" minOccurs="0"&gt;
                     *     &lt;annotation&gt;
                     *        &lt;documentation&gt;Reference to the most relevant web site of the service provider. &lt;/documentation&gt;
                     *     &lt;/annotation&gt;
                     *     &lt;/element&gt;
                     *     &lt;element name="ServiceContact" type="ows:ResponsiblePartySubsetType"&gt;
                     *     &lt;annotation&gt;
                     *        &lt;documentation&gt;Information for contacting the service provider. The
                     *        OnlineResource element within this ServiceContact element should not be used
                     *        to reference a web site of the service provider. &lt;/documentation&gt;
                     *     &lt;/annotation&gt;
                     *     &lt;/element&gt;
                     *  &lt;/sequence&gt;
                     *&lt;/complexType&gt;
                 * </pre>
                 * </p>
                 *
                 */
            void serviceProvider() {
                start("ows:ServiceProvider");

                element("ows:ProviderName", null);
                element("ows:ProviderSite", null);
                element("ows:ServiceContact", null);

                end("ows:ServiceProvider");
            }

            /**
                 * Encodes the ows:OperationsMetadata element.
                 * <p>
                 * <pre>
                 * &lt;complexType&gt;
                 *        &lt;sequence&gt;
                 *                &lt;element ref="ows:Operation" minOccurs="2" maxOccurs="unbounded"&gt;
                 *                &lt;annotation&gt;
                 *                &lt;documentation&gt;Metadata for unordered list of all the (requests for) operations
                 *                that this server interface implements. The list of required and optional
                 *                operations implemented shall be specified in the Implementation Specification
                 *                for this service. &lt;/documentation&gt;
                 *                &lt;/annotation&gt;
                 *                &lt;/element&gt;
                 *                &lt;element name="Parameter" type="ows:DomainType" minOccurs="0" maxOccurs="unbounded"&gt;
                 *                &lt;annotation&gt;
                 *                        &lt;documentation&gt;Optional unordered list of parameter valid domains that each
                 *                        apply to one or more operations which this server interface implements. The
                 *                        list of required and optional parameter domain limitations shall be specified
                 *                        in the Implementation Specification for this service. &lt;/documentation&gt;
                 *                &lt;/annotation&gt;
                 *                &lt;/element&gt;
                 *                &lt;element name="Constraint" type="ows:DomainType" minOccurs="0" maxOccurs="unbounded"&gt;
                 *                &lt;annotation&gt;
                 *                        &lt;documentation&gt;Optional unordered list of valid domain constraints on
                 *                        non-parameter quantities that each apply to this server. The list of
                 *                        required and optional constraints shall be specified in the Implementation
                 *                        Specification for this service. &lt;/documentation&gt;
                 *                &lt;/annotation&gt;
                 *                &lt;/element&gt;
                 *                &lt;element ref="ows:ExtendedCapabilities" minOccurs="0"/&gt;
                 *        &lt;/sequence&gt;
                 *&lt;/complexType&gt;
                 * </pre>
                 * </p>
                 *
                 */
            void operationsMetadata() {
                start("ows:OperationsMetadata");

                getCapabilities();
                describeFeatureType();
                getFeature();

                if (wfs.getServiceLevel() == WFS.COMPLETE) {
                    lockFeature();
                    getFeatureWithLock();
                }

                if (wfs.getServiceLevel() >= WFS.TRANSACTIONAL) {
                    transaction();
                }

                end("ows:OperationsMetadata");
            }

            /**
                 * Encodes the GetCapabilities ows:Operation element.
                 *
                 */
            void getCapabilities() {
                Map.Entry[] parameters = new Map.Entry[] {
                        parameter("AcceptVersions", new String[] { "1.0.0", "1.1.0" }),
                        parameter("AcceptFormats", new String[] { "text/xml" })
                    //    				parameter( 
                    //    					"Sections", 
                    //    					new String[]{ 
                    //    						"ServiceIdentification", "ServiceProvider", "OperationsMetadata",
                    //    						"FeatureTypeList", "ServesGMLObjectTypeList", "SupportsGMLObjectTypeList", 
                    //    						"Filter_Capabilities"
                    //    					} 
                    //    				) 
                    };
                operation("GetCapabilities", parameters, true, true);
            }

            /**
                 * Encodes the DescribeFeatureType ows:Operation element.
                 */
            void describeFeatureType() {
                //TODO: process extension point
                Map.Entry[] parameters = new Map.Entry[] {
                        parameter("outputFormat", new String[] { "text/gml; subtype=gml/3.1.1" })
                    };

                operation("DescribeFeatureType", parameters, true, true);
            }

            /**
                 * Encodes the GetFeature ows:Operation element.
                 */
            void getFeature() {
                Map.Entry[] parameters = new Map.Entry[] {
                        parameter("resultType", new String[] { "results", "hits" }),
                        parameter("outputFormat", new String[] { "text/gml; subtype=gml/3.1.1" })
                    };

                operation("GetFeature", parameters, true, true);
            }

            /**
                 * Encodes the GetFeatureWithLock ows:Operation element.
                 */
            void getFeatureWithLock() {
                Map.Entry[] parameters = new Map.Entry[] {
                        parameter("resultType", new String[] { "results", "hits" }),
                        parameter("outputFormat", new String[] { "text/gml; subtype=gml/3.1.1" })
                    };

                operation("GetFeatureWithLock", parameters, true, true);
            }

            /**
                 * Encodes the LockFeature ows:Operation element.
                 */
            void lockFeature() {
                Map.Entry[] parameters = new Map.Entry[] {
                        parameter("releaseAction", new String[] { "ALL", "SOME" })
                    };

                operation("LockFeature", parameters, true, true);
            }

            /**
                 * Encodes the Transaction ows:Operation element.
                 */
            void transaction() {
                Map.Entry[] parameters = new Map.Entry[] {
                        parameter("inputFormat", new String[] { "text/gml; subtype=gml/3.1.1" }),
                        parameter("idgen",
                            new String[] { "GenerateNew", "UseExisting", "ReplaceDuplicate" }),
                        parameter("releaseAction", new String[] { "ALL", "SOME" })
                    };

                operation("Transaction", parameters, true, true);
            }

            /**
                 * Encdoes the wfs:FeatureTypeList element.
                 *<p>
                 *<pre>
                 * &lt;xsd:complexType name="FeatureTypeListType"&gt;
                 *      &lt;xsd:annotation&gt;
                 *         &lt;xsd:documentation&gt;
                 *            A list of feature types available from  this server.
                 *         &lt;/xsd:documentation&gt;
                 *      &lt;/xsd:annotation&gt;
                 *      &lt;xsd:sequence&gt;
                 *         &lt;xsd:element name="Operations"
                 *                      type="wfs:OperationsType"
                 *                      minOccurs="0"/&gt;
                 *         &lt;xsd:element name="FeatureType"
                 *                      type="wfs:FeatureTypeType"
                 *                      maxOccurs="unbounded"/&gt;
                 *      &lt;/xsd:sequence&gt;
                 *   &lt;/xsd:complexType&gt;
                 *</pre>
                 *</p>
                 */
            void featureTypeList() {
                start("FeatureTypeList");

                start("Operations");

                if ((wfs.getServiceLevel() | WFS.SERVICE_BASIC) != 0) {
                    element("Operation", "Query");
                }

                if ((wfs.getServiceLevel() | WFS.SERVICE_INSERT) != 0) {
                    element("Operation", "Insert");
                }

                if ((wfs.getServiceLevel() | WFS.SERVICE_UPDATE) != 0) {
                    element("Operation", "Update");
                }

                if ((wfs.getServiceLevel() | WFS.SERVICE_DELETE) != 0) {
                    element("Operation", "Delete");
                }

                if ((wfs.getServiceLevel() | WFS.SERVICE_LOCKING) != 0) {
                    element("Operation", "Lock");
                }

                end("Operations");

                List featureTypes = new ArrayList(catalog.getFeatureTypeInfos().values());
                Collections.sort(featureTypes, new FeatureTypeInfoTitleComparator());
                for (Iterator i = featureTypes.iterator(); i.hasNext();) {
                    FeatureTypeInfo featureType = (FeatureTypeInfo) i.next();
                    featureType(featureType);
                }

                end("FeatureTypeList");
            }

            /**
                 * Encodes the wfs:FeatureType element.
                 * <p>
                 *         <pre>
                 * &lt;xsd:complexType name="FeatureTypeType"&gt;
                 *      &lt;xsd:annotation&gt;
                 *         &lt;xsd:documentation&gt;
                 *            An element of this type that describes a feature in an application
                 *            namespace shall have an xml xmlns specifier, e.g.
                 *            xmlns:bo="http://www.BlueOx.org/BlueOx"
                 *         &lt;/xsd:documentation&gt;
                 *      &lt;/xsd:annotation&gt;
                 *      &lt;xsd:sequence&gt;
                 *         &lt;xsd:element name="Name" type="xsd:QName"&gt;
                 *            &lt;xsd:annotation&gt;
                 *               &lt;xsd:documentation&gt;
                 *                  Name of this feature type, including any namespace prefix
                 *               &lt;/xsd:documentation&gt;
                 *            &lt;/xsd:annotation&gt;
                 *         &lt;/xsd:element&gt;
                 *         &lt;xsd:element name="Title" type="xsd:string"&gt;
                 *            &lt;xsd:annotation&gt;
                 *               &lt;xsd:documentation&gt;
                 *                  Title of this feature type, normally used for display
                 *                  to a human.
                 *               &lt;/xsd:documentation&gt;
                 *            &lt;/xsd:annotation&gt;
                 *         &lt;/xsd:element&gt;
                 *         &lt;xsd:element name="Abstract" type="xsd:string" minOccurs="0"&gt;*            &lt;xsd:annotation&gt;
                 *               &lt;xsd:documentation&gt;
                 *                  Brief narrative description of this feature type, normally*                  used for display to a human.
                 *               &lt;/xsd:documentation&gt;
                 *            &lt;/xsd:annotation&gt;
                 *         &lt;/xsd:element&gt;
                 *         &lt;xsd:element ref="ows:Keywords" minOccurs="0" maxOccurs="unbounded"/&gt;
                 *         &lt;xsd:choice&gt;
                 *            &lt;xsd:sequence&gt;
                 *               &lt;xsd:element name="DefaultSRS"
                 *                            type="xsd:anyURI"&gt;
                 *                  &lt;xsd:annotation&gt;
                 *                     &lt;xsd:documentation&gt;
                 *                        The DefaultSRS element indicated which spatial
                 *                        reference system shall be used by a WFS to
                 *                        express the state of a spatial feature if not
                 *                        otherwise explicitly identified within a query
                 *                        or transaction request.  The SRS may be indicated
                 *                        using either the EPSG form (EPSG:posc code) or

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -