ol-wfst 4.1.0 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +123 -0
- package/README.md +798 -791
- package/dist/Geoserver.d.ts +9 -2
- package/dist/Geoserver.d.ts.map +1 -1
- package/dist/ol-wfst.js +848 -19
- package/dist/ol-wfst.js.map +1 -1
- package/dist/ol-wfst.min.js +6 -1
- package/dist/ol-wfst.min.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/lib/Geoserver.d.ts +9 -2
- package/lib/Geoserver.d.ts.map +1 -1
- package/lib/ol-wfst.js +52 -15
- package/lib/ol-wfst.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/package.json +4 -2
package/dist/ol-wfst.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* ol-wfst - v4.1.1
|
|
3
|
+
* https://github.com/GastonZalba/ol-wfst#readme
|
|
4
|
+
* Built: Tue Aug 29 2023 11:10:04 GMT-0300 (hora estándar de Argentina)
|
|
5
|
+
*/
|
|
1
6
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('ol/style/Circle.js'), require('ol/style/Fill.js'), require('ol/style/Stroke.js'), require('ol/style/Style.js'), require('ol/control/Control.js'), require('ol/interaction/Draw.js'), require('ol/interaction/Modify.js'), require('ol/interaction/Select.js'), require('ol/interaction/Snap.js'), require('ol/Collection.js'), require('ol/events/Event.js'), require('ol/events/condition.js'), require('ol/Observable.js'), require('ol/layer/Vector.js'), require('ol/layer/Base.js'), require('ol/format/GeoJSON.js'), require('ol/source/Vector.js'), require('ol/proj.js'), require('ol/loadingstrategy.js'), require('ol/layer/Tile.js'), require('ol/source/TileWMS.js'), require('ol/geom.js'), require('ol/format/KML.js'), require('ol/format/WFS.js'), require('ol/style.js'), require('ol/Object.js'), require('ol/geom/Circle.js'), require('ol/geom/GeometryCollection.js'), require('ol/Feature.js'), require('ol/geom/Polygon.js'), require('ol/extent.js'), require('ol/Overlay.js')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['ol/style/Circle.js', 'ol/style/Fill.js', 'ol/style/Stroke.js', 'ol/style/Style.js', 'ol/control/Control.js', 'ol/interaction/Draw.js', 'ol/interaction/Modify.js', 'ol/interaction/Select.js', 'ol/interaction/Snap.js', 'ol/Collection.js', 'ol/events/Event.js', 'ol/events/condition.js', 'ol/Observable.js', 'ol/layer/Vector.js', 'ol/layer/Base.js', 'ol/format/GeoJSON.js', 'ol/source/Vector.js', 'ol/proj.js', 'ol/loadingstrategy.js', 'ol/layer/Tile.js', 'ol/source/TileWMS.js', 'ol/geom.js', 'ol/format/KML.js', 'ol/format/WFS.js', 'ol/style.js', 'ol/Object.js', 'ol/geom/Circle.js', 'ol/geom/GeometryCollection.js', 'ol/Feature.js', 'ol/geom/Polygon.js', 'ol/extent.js', 'ol/Overlay.js'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Wfst = factory(global.ol.style.Circle, global.ol.style.Fill, global.ol.style.Stroke, global.ol.style.Style, global.ol.control.Control, global.ol.interaction.Draw, global.ol.interaction.Modify, global.ol.interaction.Select, global.ol.interaction.Snap, global.ol.Collection, global.ol.events.Event, global.ol.events.condition, global.ol.Observable, global.ol.layer.Vector, global.ol.layer.Base, global.ol.format.GeoJSON, global.ol.source.Vector, global.ol.proj, global.ol.loadingstrategy, global.ol.layer.Tile, global.ol.source.TileWMS, global.ol.geom, global.ol.format.KML, global.ol.format.WFS, global.ol.style, global.ol.Object, global.ol.geom.Circle, global.ol.geom.GeometryCollection, global.ol.Feature, global.ol.geom.Polygon, global.ol.extent, global.ol.Overlay));
|
|
5
|
-
})(this, (function (CircleStyle, Fill, Stroke, Style, Control, Draw, Modify, Select, Snap, Collection, BaseEvent, condition_js, Observable, VectorLayer, Layer, GeoJSON, VectorSource, proj_js, loadingstrategy_js, TileLayer, TileWMS, geom_js, KML, WFS, style_js, BaseObject, Circle, GeometryCollection, Feature, Polygon_js, extent_js, Overlay) { 'use strict';
|
|
7
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('ol/style/Circle.js'), require('ol/style/Fill.js'), require('ol/style/Stroke.js'), require('ol/style/Style.js'), require('ol/control/Control.js'), require('ol/interaction/Draw.js'), require('ol/interaction/Modify.js'), require('ol/interaction/Select.js'), require('ol/interaction/Snap.js'), require('ol/Collection.js'), require('ol/events/Event.js'), require('ol/events/condition.js'), require('ol/Observable.js'), require('ol/layer/Vector.js'), require('ol/layer/Base.js'), require('ol/format/GeoJSON.js'), require('ol/source/Vector.js'), require('ol/proj.js'), require('ol/loadingstrategy.js'), require('ol/layer/Tile.js'), require('ol/source/TileWMS.js'), require('ol/geom.js'), require('ol/format/KML.js'), require('ol/format/WFS.js'), require('ol/style.js'), require('ol/Object.js'), require('ol/geom/Circle.js'), require('ol/geom/GeometryCollection.js'), require('ol/Feature.js'), require('ol/geom/Polygon.js'), require('ol/format/XML.js'), require('ol/xml.js'), require('ol/format/xlink.js'), require('ol/format/xsd.js'), require('ol/extent.js'), require('ol/Overlay.js')) :
|
|
8
|
+
typeof define === 'function' && define.amd ? define(['ol/style/Circle.js', 'ol/style/Fill.js', 'ol/style/Stroke.js', 'ol/style/Style.js', 'ol/control/Control.js', 'ol/interaction/Draw.js', 'ol/interaction/Modify.js', 'ol/interaction/Select.js', 'ol/interaction/Snap.js', 'ol/Collection.js', 'ol/events/Event.js', 'ol/events/condition.js', 'ol/Observable.js', 'ol/layer/Vector.js', 'ol/layer/Base.js', 'ol/format/GeoJSON.js', 'ol/source/Vector.js', 'ol/proj.js', 'ol/loadingstrategy.js', 'ol/layer/Tile.js', 'ol/source/TileWMS.js', 'ol/geom.js', 'ol/format/KML.js', 'ol/format/WFS.js', 'ol/style.js', 'ol/Object.js', 'ol/geom/Circle.js', 'ol/geom/GeometryCollection.js', 'ol/Feature.js', 'ol/geom/Polygon.js', 'ol/format/XML.js', 'ol/xml.js', 'ol/format/xlink.js', 'ol/format/xsd.js', 'ol/extent.js', 'ol/Overlay.js'], factory) :
|
|
9
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Wfst = factory(global.ol.style.Circle, global.ol.style.Fill, global.ol.style.Stroke, global.ol.style.Style, global.ol.control.Control, global.ol.interaction.Draw, global.ol.interaction.Modify, global.ol.interaction.Select, global.ol.interaction.Snap, global.ol.Collection, global.ol.events.Event, global.ol.events.condition, global.ol.Observable, global.ol.layer.Vector, global.ol.layer.Base, global.ol.format.GeoJSON, global.ol.source.Vector, global.ol.proj, global.ol.loadingstrategy, global.ol.layer.Tile, global.ol.source.TileWMS, global.ol.geom, global.ol.format.KML, global.ol.format.WFS, global.ol.style, global.ol.Object, global.ol.geom.Circle, global.ol.geom.GeometryCollection, global.ol.Feature, global.ol.geom.Polygon, global.ol.format.XML, global.ol.xml, global.ol.format.xlink, global.ol.format.xsd, global.ol.extent, global.ol.Overlay));
|
|
10
|
+
})(this, (function (CircleStyle, Fill, Stroke, Style, Control, Draw, Modify, Select, Snap, Collection, BaseEvent, condition_js, Observable, VectorLayer, Layer, GeoJSON, VectorSource, proj_js, loadingstrategy_js, TileLayer, TileWMS, geom_js, KML, WFS, style_js, BaseObject, Circle, GeometryCollection, Feature, Polygon_js, XML, xml_js, xlink_js, xsd_js, extent_js, Overlay) { 'use strict';
|
|
6
11
|
|
|
7
12
|
var domain;
|
|
8
13
|
|
|
@@ -2688,10 +2693,804 @@
|
|
|
2688
2693
|
}
|
|
2689
2694
|
}
|
|
2690
2695
|
|
|
2696
|
+
/**
|
|
2697
|
+
* @module ol/format/WFSCapabilities
|
|
2698
|
+
*/
|
|
2699
|
+
|
|
2700
|
+
/**
|
|
2701
|
+
* @const
|
|
2702
|
+
* @type {Array<null|string>}
|
|
2703
|
+
*/
|
|
2704
|
+
const NAMESPACE_URIS = [
|
|
2705
|
+
null,
|
|
2706
|
+
'http://www.opengis.net/fes/2.0',
|
|
2707
|
+
'http://www.opengis.net/ows/1.1',
|
|
2708
|
+
'http://www.opengis.net/wfs/2.0',
|
|
2709
|
+
];
|
|
2710
|
+
|
|
2711
|
+
/**
|
|
2712
|
+
* @const
|
|
2713
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2714
|
+
*/
|
|
2715
|
+
// @ts-ignore
|
|
2716
|
+
const PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2717
|
+
'ServiceIdentification': xml_js.makeObjectPropertySetter(readServiceIdentification),
|
|
2718
|
+
'ServiceProvider': xml_js.makeObjectPropertySetter(readServiceProvider),
|
|
2719
|
+
'OperationsMetadata': xml_js.makeObjectPropertySetter(readOperationsMetadata),
|
|
2720
|
+
'FeatureTypeList': xml_js.makeObjectPropertySetter(readFeatureTypeList),
|
|
2721
|
+
'Filter_Capabilities': xml_js.makeObjectPropertySetter(readFilter_Capabilities),
|
|
2722
|
+
});
|
|
2723
|
+
|
|
2724
|
+
/**
|
|
2725
|
+
* @classdesc
|
|
2726
|
+
* Format for reading WFS capabilities data
|
|
2727
|
+
*
|
|
2728
|
+
* @api
|
|
2729
|
+
*/
|
|
2730
|
+
class WFSCapabilities extends XML {
|
|
2731
|
+
constructor() {
|
|
2732
|
+
super();
|
|
2733
|
+
|
|
2734
|
+
/**
|
|
2735
|
+
* @type {string|undefined}
|
|
2736
|
+
*/
|
|
2737
|
+
this.version = undefined;
|
|
2738
|
+
}
|
|
2739
|
+
|
|
2740
|
+
/**
|
|
2741
|
+
* @param {Element} node Node.
|
|
2742
|
+
* @return {Object} Object
|
|
2743
|
+
*/
|
|
2744
|
+
readFromNode(node) {
|
|
2745
|
+
this.version = node.getAttribute('version').trim();
|
|
2746
|
+
const wfsCapabilityObject = xml_js.pushParseAndPop(
|
|
2747
|
+
{
|
|
2748
|
+
'version': this.version,
|
|
2749
|
+
},
|
|
2750
|
+
PARSERS,
|
|
2751
|
+
node,
|
|
2752
|
+
[]
|
|
2753
|
+
);
|
|
2754
|
+
return wfsCapabilityObject ? wfsCapabilityObject : null;
|
|
2755
|
+
}
|
|
2756
|
+
}
|
|
2757
|
+
|
|
2758
|
+
/**
|
|
2759
|
+
* @const
|
|
2760
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2761
|
+
*/
|
|
2762
|
+
// @ts-ignore
|
|
2763
|
+
const SERVICE_IDENTIFICATION_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2764
|
+
'Title': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2765
|
+
'Abstract': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2766
|
+
'Keywords': xml_js.makeObjectPropertySetter(readKeywordList),
|
|
2767
|
+
'ServiceType': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2768
|
+
'ServiceTypeVersion': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2769
|
+
'Fees': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2770
|
+
'AccessConstraints': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2771
|
+
});
|
|
2772
|
+
|
|
2773
|
+
/**
|
|
2774
|
+
* @const
|
|
2775
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2776
|
+
*/
|
|
2777
|
+
// @ts-ignore
|
|
2778
|
+
const SERVICE_PROVIDER_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2779
|
+
'ProviderName': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2780
|
+
'ServiceContact': xml_js.makeObjectPropertySetter(readServiceContact),
|
|
2781
|
+
});
|
|
2782
|
+
|
|
2783
|
+
/**
|
|
2784
|
+
* @const
|
|
2785
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2786
|
+
*/
|
|
2787
|
+
// @ts-ignore
|
|
2788
|
+
const OPERATIONS_METADATA_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2789
|
+
'Operation': xml_js.makeObjectPropertyPusher(readNamedOperation),
|
|
2790
|
+
'Constraint': xml_js.makeObjectPropertyPusher(readNamedConstraint),
|
|
2791
|
+
});
|
|
2792
|
+
|
|
2793
|
+
/**
|
|
2794
|
+
* @const
|
|
2795
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2796
|
+
*/
|
|
2797
|
+
// @ts-ignore
|
|
2798
|
+
const SERVICE_CONTACT_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2799
|
+
'IndividualName': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2800
|
+
'PositionName': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2801
|
+
'ContactInfo': xml_js.makeObjectPropertySetter(readContactInfo),
|
|
2802
|
+
});
|
|
2803
|
+
|
|
2804
|
+
/**
|
|
2805
|
+
* @const
|
|
2806
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2807
|
+
*/
|
|
2808
|
+
// @ts-ignore
|
|
2809
|
+
const CONTACT_INFO_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2810
|
+
'Phone': xml_js.makeObjectPropertySetter(readPhone),
|
|
2811
|
+
'Address': xml_js.makeObjectPropertySetter(readAddress),
|
|
2812
|
+
});
|
|
2813
|
+
|
|
2814
|
+
/**
|
|
2815
|
+
* @const
|
|
2816
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2817
|
+
*/
|
|
2818
|
+
// @ts-ignore
|
|
2819
|
+
const PHONE_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2820
|
+
'Voice': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2821
|
+
'Facsimile': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2822
|
+
});
|
|
2823
|
+
|
|
2824
|
+
/**
|
|
2825
|
+
* @const
|
|
2826
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2827
|
+
*/
|
|
2828
|
+
// @ts-ignore
|
|
2829
|
+
const ADDRESS_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2830
|
+
'DeliveryPoint': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2831
|
+
'City': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2832
|
+
'AdministrativeArea': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2833
|
+
'PostalCode': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2834
|
+
'Country': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2835
|
+
'ElectronicMailAddress': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2836
|
+
});
|
|
2837
|
+
|
|
2838
|
+
/**
|
|
2839
|
+
* @const
|
|
2840
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2841
|
+
*/
|
|
2842
|
+
// @ts-ignore
|
|
2843
|
+
const FEATURE_TYPE_LIST_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2844
|
+
'FeatureType': xml_js.makeArrayPusher(readFeatureType),
|
|
2845
|
+
});
|
|
2846
|
+
|
|
2847
|
+
/**
|
|
2848
|
+
* @const
|
|
2849
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2850
|
+
*/
|
|
2851
|
+
// @ts-ignore
|
|
2852
|
+
const FEATURE_TYPE_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2853
|
+
'Name': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2854
|
+
'Title': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2855
|
+
'Abstract': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2856
|
+
'Keywords': xml_js.makeObjectPropertySetter(readKeywordList),
|
|
2857
|
+
'DefaultCRS': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2858
|
+
'WGS84BoundingBox': xml_js.makeObjectPropertySetter(readWGS84BoundingBox),
|
|
2859
|
+
'MetadataURL': xml_js.makeObjectPropertySetter(xlink_js.readHref),
|
|
2860
|
+
});
|
|
2861
|
+
|
|
2862
|
+
/**
|
|
2863
|
+
* @const
|
|
2864
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2865
|
+
*/
|
|
2866
|
+
// @ts-ignore
|
|
2867
|
+
const OPERATION_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2868
|
+
'DCP': xml_js.makeObjectPropertySetter(readDCP),
|
|
2869
|
+
'Parameter': xml_js.makeObjectPropertyPusher(readNamedParameter),
|
|
2870
|
+
});
|
|
2871
|
+
|
|
2872
|
+
/**
|
|
2873
|
+
* @const
|
|
2874
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2875
|
+
*/
|
|
2876
|
+
// @ts-ignore
|
|
2877
|
+
const PARAMETER_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2878
|
+
'AllowedValues': xml_js.makeObjectPropertySetter(readValueList),
|
|
2879
|
+
});
|
|
2880
|
+
|
|
2881
|
+
/**
|
|
2882
|
+
* @const
|
|
2883
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2884
|
+
*/
|
|
2885
|
+
// @ts-ignore
|
|
2886
|
+
const CONSTRAINT_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2887
|
+
'NoValues': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2888
|
+
'DefaultValue': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
2889
|
+
'AllowedValues': xml_js.makeObjectPropertySetter(readValueList),
|
|
2890
|
+
});
|
|
2891
|
+
|
|
2892
|
+
/**
|
|
2893
|
+
* @const
|
|
2894
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2895
|
+
*/
|
|
2896
|
+
// @ts-ignore
|
|
2897
|
+
const HTTP_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2898
|
+
'Get': xml_js.makeObjectPropertySetter(xlink_js.readHref),
|
|
2899
|
+
'Post': xml_js.makeObjectPropertySetter(xlink_js.readHref),
|
|
2900
|
+
});
|
|
2901
|
+
|
|
2902
|
+
/**
|
|
2903
|
+
* @const
|
|
2904
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2905
|
+
*/
|
|
2906
|
+
// @ts-ignore
|
|
2907
|
+
const WGS84_BOUNDINGBOX_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2908
|
+
'LowerCorner': xml_js.makeObjectPropertySetter(readStringCoords),
|
|
2909
|
+
'UpperCorner': xml_js.makeObjectPropertySetter(readStringCoords),
|
|
2910
|
+
});
|
|
2911
|
+
|
|
2912
|
+
/**
|
|
2913
|
+
* @const
|
|
2914
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2915
|
+
*/
|
|
2916
|
+
// @ts-ignore
|
|
2917
|
+
const DCP_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2918
|
+
'HTTP': xml_js.makeObjectPropertySetter(readHTTP),
|
|
2919
|
+
});
|
|
2920
|
+
|
|
2921
|
+
/**
|
|
2922
|
+
* @const
|
|
2923
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2924
|
+
*/
|
|
2925
|
+
// @ts-ignore
|
|
2926
|
+
const KEYWORDLIST_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2927
|
+
'Keyword': xml_js.makeArrayPusher(xsd_js.readString),
|
|
2928
|
+
});
|
|
2929
|
+
|
|
2930
|
+
/**
|
|
2931
|
+
* @const
|
|
2932
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2933
|
+
*/
|
|
2934
|
+
// @ts-ignore
|
|
2935
|
+
const VALUELIST_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2936
|
+
'Value': xml_js.makeArrayPusher(xsd_js.readString),
|
|
2937
|
+
});
|
|
2938
|
+
|
|
2939
|
+
/**
|
|
2940
|
+
* @const
|
|
2941
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2942
|
+
*/
|
|
2943
|
+
// @ts-ignore
|
|
2944
|
+
const FILTER_CAPABILITIES_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2945
|
+
'Conformance': xml_js.makeObjectPropertySetter(readConformance),
|
|
2946
|
+
'Id_Capabilities': xml_js.makeObjectPropertySetter(readId_Capabilities),
|
|
2947
|
+
'Scalar_Capabilities': xml_js.makeObjectPropertySetter(readScalarCapabilities),
|
|
2948
|
+
'Spatial_Capabilities': xml_js.makeObjectPropertySetter(readSpatialCapabilities),
|
|
2949
|
+
'Temporal_Capabilities': xml_js.makeObjectPropertySetter(readTemporalCapabilities),
|
|
2950
|
+
'Functions': xml_js.makeObjectPropertySetter(readFunctions),
|
|
2951
|
+
});
|
|
2952
|
+
|
|
2953
|
+
/**
|
|
2954
|
+
* @const
|
|
2955
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2956
|
+
*/
|
|
2957
|
+
// @ts-ignore
|
|
2958
|
+
const CONFORMANCE_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2959
|
+
'Constraint': xml_js.makeObjectPropertyPusher(readNamedConstraint),
|
|
2960
|
+
});
|
|
2961
|
+
|
|
2962
|
+
/**
|
|
2963
|
+
* @const
|
|
2964
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2965
|
+
*/
|
|
2966
|
+
// @ts-ignore
|
|
2967
|
+
const ID_CAPABILITIES_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2968
|
+
'ResourceIdentifier': xml_js.makeObjectPropertySetter(readNamedResourceIdentifier),
|
|
2969
|
+
});
|
|
2970
|
+
|
|
2971
|
+
/**
|
|
2972
|
+
* @const
|
|
2973
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2974
|
+
*/
|
|
2975
|
+
// @ts-ignore
|
|
2976
|
+
const SCALAR_CAPABILITIES_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2977
|
+
'LogicalOperators': xml_js.makeObjectPropertySetter(readLogicalOperators),
|
|
2978
|
+
'ComparisonOperators': xml_js.makeObjectPropertySetter(readComparisonOperators),
|
|
2979
|
+
});
|
|
2980
|
+
|
|
2981
|
+
/**
|
|
2982
|
+
* @const
|
|
2983
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2984
|
+
*/
|
|
2985
|
+
// @ts-ignore
|
|
2986
|
+
const SPATIAL_CAPABILITIES_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2987
|
+
'GeometryOperands': xml_js.makeObjectPropertySetter(readGeometryOperands),
|
|
2988
|
+
'SpatialOperators': xml_js.makeObjectPropertySetter(readSpatialOperators),
|
|
2989
|
+
});
|
|
2990
|
+
|
|
2991
|
+
/**
|
|
2992
|
+
* @const
|
|
2993
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
2994
|
+
*/
|
|
2995
|
+
// @ts-ignore
|
|
2996
|
+
const TEMPORAL_CAPABILITIES_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
2997
|
+
'TemporalOperands': xml_js.makeObjectPropertySetter(readTemporalOperands),
|
|
2998
|
+
'TemporalOperators': xml_js.makeObjectPropertySetter(readTemporalOperators),
|
|
2999
|
+
});
|
|
3000
|
+
|
|
3001
|
+
/**
|
|
3002
|
+
* @const
|
|
3003
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
3004
|
+
*/
|
|
3005
|
+
// @ts-ignore
|
|
3006
|
+
const FUNCTIONS_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
3007
|
+
'Function': xml_js.makeArrayPusher(readNamedFunction),
|
|
3008
|
+
});
|
|
3009
|
+
|
|
3010
|
+
/**
|
|
3011
|
+
* @const
|
|
3012
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
3013
|
+
*/
|
|
3014
|
+
// @ts-ignore
|
|
3015
|
+
const FUNCTION_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
3016
|
+
'Returns': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
3017
|
+
'Arguments': xml_js.makeObjectPropertySetter(readArguments),
|
|
3018
|
+
});
|
|
3019
|
+
|
|
3020
|
+
/**
|
|
3021
|
+
* @const
|
|
3022
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
3023
|
+
*/
|
|
3024
|
+
// @ts-ignore
|
|
3025
|
+
const ARGUMENTS_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
3026
|
+
'Argument': xml_js.makeArrayPusher(readNamedArgument),
|
|
3027
|
+
});
|
|
3028
|
+
|
|
3029
|
+
/**
|
|
3030
|
+
* @const
|
|
3031
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
3032
|
+
*/
|
|
3033
|
+
// @ts-ignore
|
|
3034
|
+
const ARGUMENT_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
3035
|
+
'Type': xml_js.makeObjectPropertySetter(xsd_js.readString),
|
|
3036
|
+
});
|
|
3037
|
+
|
|
3038
|
+
/**
|
|
3039
|
+
* @const
|
|
3040
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
3041
|
+
*/
|
|
3042
|
+
// @ts-ignore
|
|
3043
|
+
const LOGICAL_OPERATORS_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
3044
|
+
'LogicalOperator': xml_js.makeArrayPusher(readNamedOnly),
|
|
3045
|
+
});
|
|
3046
|
+
|
|
3047
|
+
/**
|
|
3048
|
+
* @const
|
|
3049
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
3050
|
+
*/
|
|
3051
|
+
// @ts-ignore
|
|
3052
|
+
const COMPARISON_OPERATORS_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
3053
|
+
'ComparisonOperator': xml_js.makeArrayPusher(readNamedOnly),
|
|
3054
|
+
});
|
|
3055
|
+
|
|
3056
|
+
/**
|
|
3057
|
+
* @const
|
|
3058
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
3059
|
+
*/
|
|
3060
|
+
// @ts-ignore
|
|
3061
|
+
const GEOMETRY_OPERANDS_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
3062
|
+
'GeometryOperand': xml_js.makeArrayPusher(readNamedOnly),
|
|
3063
|
+
});
|
|
3064
|
+
|
|
3065
|
+
/**
|
|
3066
|
+
* @const
|
|
3067
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
3068
|
+
*/
|
|
3069
|
+
// @ts-ignore
|
|
3070
|
+
const SPATIAL_OPERATORS_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
3071
|
+
'SpatialOperator': xml_js.makeArrayPusher(readNamedOnly),
|
|
3072
|
+
});
|
|
3073
|
+
|
|
3074
|
+
/**
|
|
3075
|
+
* @const
|
|
3076
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
3077
|
+
*/
|
|
3078
|
+
// @ts-ignore
|
|
3079
|
+
const TEMPORAL_OPERANDS_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
3080
|
+
'TemporalOperand': xml_js.makeArrayPusher(readNamedOnly),
|
|
3081
|
+
});
|
|
3082
|
+
|
|
3083
|
+
/**
|
|
3084
|
+
* @const
|
|
3085
|
+
* @type {Object<string, Object<string, import("ol/xml.js").Parser>>}
|
|
3086
|
+
*/
|
|
3087
|
+
// @ts-ignore
|
|
3088
|
+
const TEMPORAL_OPERATORS_PARSERS = xml_js.makeStructureNS(NAMESPACE_URIS, {
|
|
3089
|
+
'TemporalOperator': xml_js.makeArrayPusher(readNamedOnly),
|
|
3090
|
+
});
|
|
3091
|
+
|
|
3092
|
+
/**
|
|
3093
|
+
* @param {Element} node Node.
|
|
3094
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3095
|
+
* @return {Object|undefined} Service Identification object.
|
|
3096
|
+
*/
|
|
3097
|
+
function readServiceIdentification(node, objectStack) {
|
|
3098
|
+
return xml_js.pushParseAndPop({}, SERVICE_IDENTIFICATION_PARSERS, node, objectStack);
|
|
3099
|
+
}
|
|
3100
|
+
|
|
3101
|
+
/**
|
|
3102
|
+
* @param {Element} node Node.
|
|
3103
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3104
|
+
* @return {Object|undefined} Service Provider object.
|
|
3105
|
+
*/
|
|
3106
|
+
function readServiceProvider(node, objectStack) {
|
|
3107
|
+
return xml_js.pushParseAndPop({}, SERVICE_PROVIDER_PARSERS, node, objectStack);
|
|
3108
|
+
}
|
|
3109
|
+
|
|
3110
|
+
/**
|
|
3111
|
+
* @param {Element} node Node.
|
|
3112
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3113
|
+
* @return {Object|undefined} Operations Metadata object.
|
|
3114
|
+
*/
|
|
3115
|
+
function readOperationsMetadata(node, objectStack) {
|
|
3116
|
+
return xml_js.pushParseAndPop({}, OPERATIONS_METADATA_PARSERS, node, objectStack);
|
|
3117
|
+
}
|
|
3118
|
+
|
|
3119
|
+
/**
|
|
3120
|
+
* @param {Element} node Node.
|
|
3121
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3122
|
+
* @return {Object|undefined} FeatureType list.
|
|
3123
|
+
*/
|
|
3124
|
+
function readFeatureTypeList(node, objectStack) {
|
|
3125
|
+
return xml_js.pushParseAndPop([], FEATURE_TYPE_LIST_PARSERS, node, objectStack);
|
|
3126
|
+
}
|
|
3127
|
+
|
|
3128
|
+
/**
|
|
3129
|
+
* @param {Element} node Node.
|
|
3130
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3131
|
+
* @return {Object|undefined} Serrvice contact object.
|
|
3132
|
+
*/
|
|
3133
|
+
function readServiceContact(node, objectStack) {
|
|
3134
|
+
return xml_js.pushParseAndPop({}, SERVICE_CONTACT_PARSERS, node, objectStack);
|
|
3135
|
+
}
|
|
3136
|
+
|
|
3137
|
+
/**
|
|
3138
|
+
* @param {Element} node Node.
|
|
3139
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3140
|
+
* @return {Object|undefined} Contact info object.
|
|
3141
|
+
*/
|
|
3142
|
+
function readContactInfo(node, objectStack) {
|
|
3143
|
+
return xml_js.pushParseAndPop({}, CONTACT_INFO_PARSERS, node, objectStack);
|
|
3144
|
+
}
|
|
3145
|
+
|
|
3146
|
+
/**
|
|
3147
|
+
* @param {Element} node Node.
|
|
3148
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3149
|
+
* @return {Object|undefined} Contact Phone object.
|
|
3150
|
+
*/
|
|
3151
|
+
function readPhone(node, objectStack) {
|
|
3152
|
+
return xml_js.pushParseAndPop({}, PHONE_PARSERS, node, objectStack);
|
|
3153
|
+
}
|
|
3154
|
+
|
|
3155
|
+
/**
|
|
3156
|
+
* @param {Element} node Node.
|
|
3157
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3158
|
+
* @return {Object|undefined} Contact address object.
|
|
3159
|
+
*/
|
|
3160
|
+
function readAddress(node, objectStack) {
|
|
3161
|
+
return xml_js.pushParseAndPop({}, ADDRESS_PARSERS, node, objectStack);
|
|
3162
|
+
}
|
|
3163
|
+
|
|
3164
|
+
/**
|
|
3165
|
+
* @param {Element} node Node.
|
|
3166
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3167
|
+
* @return {Object|undefined} DCP object.
|
|
3168
|
+
*/
|
|
3169
|
+
function readDCP(node, objectStack) {
|
|
3170
|
+
return xml_js.pushParseAndPop({}, DCP_PARSERS, node, objectStack);
|
|
3171
|
+
}
|
|
3172
|
+
|
|
3173
|
+
/**
|
|
3174
|
+
* @param {Element} node Node.
|
|
3175
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3176
|
+
* @return {Object|undefined} Operation object.
|
|
3177
|
+
*/
|
|
3178
|
+
function readOperation(node, objectStack) {
|
|
3179
|
+
return xml_js.pushParseAndPop({}, OPERATION_PARSERS, node, objectStack);
|
|
3180
|
+
}
|
|
3181
|
+
|
|
3182
|
+
/**
|
|
3183
|
+
* @param {Element} node Node.
|
|
3184
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3185
|
+
* @return {Object|undefined} Parameter object.
|
|
3186
|
+
*/
|
|
3187
|
+
function readParameter(node, objectStack) {
|
|
3188
|
+
return xml_js.pushParseAndPop({}, PARAMETER_PARSERS, node, objectStack);
|
|
3189
|
+
}
|
|
3190
|
+
|
|
3191
|
+
/**
|
|
3192
|
+
* @param {Element} node Node.
|
|
3193
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3194
|
+
* @return {Object|undefined} Constraint object.
|
|
3195
|
+
*/
|
|
3196
|
+
function readConstraint(node, objectStack) {
|
|
3197
|
+
return xml_js.pushParseAndPop({}, CONSTRAINT_PARSERS, node, objectStack);
|
|
3198
|
+
}
|
|
3199
|
+
|
|
3200
|
+
/**
|
|
3201
|
+
* @param {Element} node Node.
|
|
3202
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3203
|
+
* @return {Object|undefined} HTTP object.
|
|
3204
|
+
*/
|
|
3205
|
+
function readHTTP(node, objectStack) {
|
|
3206
|
+
return xml_js.pushParseAndPop({}, HTTP_PARSERS, node, objectStack);
|
|
3207
|
+
}
|
|
3208
|
+
|
|
3209
|
+
/**
|
|
3210
|
+
* @param {Element} node Node.
|
|
3211
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3212
|
+
* @return {Object|undefined} Named operation object.
|
|
3213
|
+
*/
|
|
3214
|
+
function readNamedOperation(node, objectStack) {
|
|
3215
|
+
const operation = readOperation(node, objectStack);
|
|
3216
|
+
if (operation) {
|
|
3217
|
+
operation['name'] = node.getAttribute('name');
|
|
3218
|
+
return operation;
|
|
3219
|
+
}
|
|
3220
|
+
return undefined;
|
|
3221
|
+
}
|
|
3222
|
+
|
|
3223
|
+
/**
|
|
3224
|
+
* @param {Element} node Node.
|
|
3225
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3226
|
+
* @return {Object|undefined} Named Function object.
|
|
3227
|
+
*/
|
|
3228
|
+
function readNamedFunction(node, objectStack) {
|
|
3229
|
+
const func = readFunction(node, objectStack);
|
|
3230
|
+
if (func) {
|
|
3231
|
+
func['name'] = node.getAttribute('name');
|
|
3232
|
+
return func;
|
|
3233
|
+
}
|
|
3234
|
+
return undefined;
|
|
3235
|
+
}
|
|
3236
|
+
|
|
3237
|
+
/**
|
|
3238
|
+
* @param {Element} node Node.
|
|
3239
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3240
|
+
* @return {Object|undefined} Named argument object.
|
|
3241
|
+
*/
|
|
3242
|
+
function readNamedArgument(node, objectStack) {
|
|
3243
|
+
const argument = readArgument(node, objectStack);
|
|
3244
|
+
if (argument) {
|
|
3245
|
+
argument['name'] = node.getAttribute('name');
|
|
3246
|
+
return argument;
|
|
3247
|
+
}
|
|
3248
|
+
return undefined;
|
|
3249
|
+
}
|
|
3250
|
+
|
|
3251
|
+
/**
|
|
3252
|
+
* @param {Element} node Node.
|
|
3253
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3254
|
+
* @return {Object|undefined} Named Parameter object.
|
|
3255
|
+
*/
|
|
3256
|
+
function readNamedParameter(node, objectStack) {
|
|
3257
|
+
const parameter = readParameter(node, objectStack);
|
|
3258
|
+
if (parameter) {
|
|
3259
|
+
parameter['name'] = node.getAttribute('name');
|
|
3260
|
+
return parameter;
|
|
3261
|
+
}
|
|
3262
|
+
return undefined;
|
|
3263
|
+
}
|
|
3264
|
+
|
|
3265
|
+
/**
|
|
3266
|
+
* @param {Element} node Node.
|
|
3267
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3268
|
+
* @return {Object|undefined} Named Constraint object.
|
|
3269
|
+
*/
|
|
3270
|
+
function readNamedConstraint(node, objectStack) {
|
|
3271
|
+
const constraint = readConstraint(node, objectStack);
|
|
3272
|
+
if (constraint) {
|
|
3273
|
+
constraint['name'] = node.getAttribute('name');
|
|
3274
|
+
return constraint;
|
|
3275
|
+
}
|
|
3276
|
+
return undefined;
|
|
3277
|
+
}
|
|
3278
|
+
|
|
3279
|
+
/**
|
|
3280
|
+
* @param {Element} node Node.
|
|
3281
|
+
* @return {string|undefined} Node name attribute string.
|
|
3282
|
+
*/
|
|
3283
|
+
function readNamedOnly(node) {
|
|
3284
|
+
return node.getAttribute('name') || undefined;
|
|
3285
|
+
}
|
|
3286
|
+
|
|
3287
|
+
/**
|
|
3288
|
+
* @param {Element} node Node.
|
|
3289
|
+
* @return {Object|undefined} Named Resource Identifier object.
|
|
3290
|
+
*/
|
|
3291
|
+
function readNamedResourceIdentifier(node) {
|
|
3292
|
+
return {
|
|
3293
|
+
name: node.getAttribute('name'),
|
|
3294
|
+
};
|
|
3295
|
+
}
|
|
3296
|
+
|
|
3297
|
+
/**
|
|
3298
|
+
* @param {Element} node Node.
|
|
3299
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3300
|
+
* @return {Object|undefined} WGS84 BoundingBox resource object.
|
|
3301
|
+
*/
|
|
3302
|
+
function readWGS84BoundingBox(node, objectStack) {
|
|
3303
|
+
return xml_js.pushParseAndPop({}, WGS84_BOUNDINGBOX_PARSERS, node, objectStack);
|
|
3304
|
+
}
|
|
3305
|
+
|
|
3306
|
+
/**
|
|
3307
|
+
* @param {Element} node Node.
|
|
3308
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3309
|
+
* @return {Array<string>|undefined} Keyword list.
|
|
3310
|
+
*/
|
|
3311
|
+
function readKeywordList(node, objectStack) {
|
|
3312
|
+
return xml_js.pushParseAndPop([], KEYWORDLIST_PARSERS, node, objectStack);
|
|
3313
|
+
}
|
|
3314
|
+
|
|
3315
|
+
/**
|
|
3316
|
+
* @param {Element} node Node.
|
|
3317
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3318
|
+
* @return {Array<string>|undefined} Value list.
|
|
3319
|
+
*/
|
|
3320
|
+
function readValueList(node, objectStack) {
|
|
3321
|
+
return xml_js.pushParseAndPop([], VALUELIST_PARSERS, node, objectStack);
|
|
3322
|
+
}
|
|
3323
|
+
|
|
3324
|
+
/**
|
|
3325
|
+
* @param {Element} node Node.
|
|
3326
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3327
|
+
* @return {Object|undefined} FeatureTyoe object.
|
|
3328
|
+
*/
|
|
3329
|
+
function readFeatureType(node, objectStack) {
|
|
3330
|
+
return xml_js.pushParseAndPop({}, FEATURE_TYPE_PARSERS, node, objectStack);
|
|
3331
|
+
}
|
|
3332
|
+
|
|
3333
|
+
/**
|
|
3334
|
+
* @param {Element} node Node.
|
|
3335
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3336
|
+
* @return {Object|undefined} FilterCapabilities object.
|
|
3337
|
+
*/
|
|
3338
|
+
function readFilter_Capabilities(node, objectStack) {
|
|
3339
|
+
return xml_js.pushParseAndPop({}, FILTER_CAPABILITIES_PARSERS, node, objectStack);
|
|
3340
|
+
}
|
|
3341
|
+
|
|
3342
|
+
/**
|
|
3343
|
+
* @param {Element} node Node.
|
|
3344
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3345
|
+
* @return {Object|undefined} Conformance object.
|
|
3346
|
+
*/
|
|
3347
|
+
function readConformance(node, objectStack) {
|
|
3348
|
+
return xml_js.pushParseAndPop({}, CONFORMANCE_PARSERS, node, objectStack);
|
|
3349
|
+
}
|
|
3350
|
+
|
|
3351
|
+
/**
|
|
3352
|
+
* @param {Element} node Node.
|
|
3353
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3354
|
+
* @return {Object|undefined} Id Capabilities object.
|
|
3355
|
+
*/
|
|
3356
|
+
function readId_Capabilities(node, objectStack) {
|
|
3357
|
+
return xml_js.pushParseAndPop({}, ID_CAPABILITIES_PARSERS, node, objectStack);
|
|
3358
|
+
}
|
|
3359
|
+
|
|
3360
|
+
/**
|
|
3361
|
+
* @param {Element} node Node.
|
|
3362
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3363
|
+
* @return {Object|undefined} Scalar Capabilities object.
|
|
3364
|
+
*/
|
|
3365
|
+
function readScalarCapabilities(node, objectStack) {
|
|
3366
|
+
return xml_js.pushParseAndPop({}, SCALAR_CAPABILITIES_PARSERS, node, objectStack);
|
|
3367
|
+
}
|
|
3368
|
+
|
|
3369
|
+
/**
|
|
3370
|
+
* @param {Element} node Node.
|
|
3371
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3372
|
+
* @return {Object|undefined} Spatial Capabilities object.
|
|
3373
|
+
*/
|
|
3374
|
+
function readSpatialCapabilities(node, objectStack) {
|
|
3375
|
+
return xml_js.pushParseAndPop({}, SPATIAL_CAPABILITIES_PARSERS, node, objectStack);
|
|
3376
|
+
}
|
|
3377
|
+
|
|
3378
|
+
/**
|
|
3379
|
+
* @param {Element} node Node.
|
|
3380
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3381
|
+
* @return {Object|undefined} Temporal Capabilities object.
|
|
3382
|
+
*/
|
|
3383
|
+
function readTemporalCapabilities(node, objectStack) {
|
|
3384
|
+
return xml_js.pushParseAndPop({}, TEMPORAL_CAPABILITIES_PARSERS, node, objectStack);
|
|
3385
|
+
}
|
|
3386
|
+
|
|
3387
|
+
/**
|
|
3388
|
+
* @param {Element} node Node.
|
|
3389
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3390
|
+
* @return {Array<string>|undefined} Functions array.
|
|
3391
|
+
*/
|
|
3392
|
+
function readFunctions(node, objectStack) {
|
|
3393
|
+
return xml_js.pushParseAndPop([], FUNCTIONS_PARSERS, node, objectStack);
|
|
3394
|
+
}
|
|
3395
|
+
|
|
3396
|
+
/**
|
|
3397
|
+
* @param {Element} node Node.
|
|
3398
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3399
|
+
* @return {Object|undefined} Function object.
|
|
3400
|
+
*/
|
|
3401
|
+
function readFunction(node, objectStack) {
|
|
3402
|
+
return xml_js.pushParseAndPop({}, FUNCTION_PARSERS, node, objectStack);
|
|
3403
|
+
}
|
|
3404
|
+
|
|
3405
|
+
/**
|
|
3406
|
+
* @param {Element} node Node.
|
|
3407
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3408
|
+
* @return {Array<string>|undefined} Logical Operators array.
|
|
3409
|
+
*/
|
|
3410
|
+
function readLogicalOperators(node, objectStack) {
|
|
3411
|
+
return xml_js.pushParseAndPop([], LOGICAL_OPERATORS_PARSERS, node, objectStack);
|
|
3412
|
+
}
|
|
3413
|
+
|
|
3414
|
+
/**
|
|
3415
|
+
* @param {Element} node Node.
|
|
3416
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3417
|
+
* @return {Array<string>|undefined} Comparison Operators array.
|
|
3418
|
+
*/
|
|
3419
|
+
function readComparisonOperators(node, objectStack) {
|
|
3420
|
+
return xml_js.pushParseAndPop([], COMPARISON_OPERATORS_PARSERS, node, objectStack);
|
|
3421
|
+
}
|
|
3422
|
+
|
|
3423
|
+
/**
|
|
3424
|
+
* @param {Element} node Node.
|
|
3425
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3426
|
+
* @return {Array<string>|undefined} Geometry Operands array.
|
|
3427
|
+
*/
|
|
3428
|
+
function readGeometryOperands(node, objectStack) {
|
|
3429
|
+
return xml_js.pushParseAndPop([], GEOMETRY_OPERANDS_PARSERS, node, objectStack);
|
|
3430
|
+
}
|
|
3431
|
+
|
|
3432
|
+
/**
|
|
3433
|
+
* @param {Element} node Node.
|
|
3434
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3435
|
+
* @return {Array<string>|undefined} Spatials Operators array.
|
|
3436
|
+
*/
|
|
3437
|
+
function readSpatialOperators(node, objectStack) {
|
|
3438
|
+
return xml_js.pushParseAndPop([], SPATIAL_OPERATORS_PARSERS, node, objectStack);
|
|
3439
|
+
}
|
|
3440
|
+
|
|
3441
|
+
/**
|
|
3442
|
+
* @param {Element} node Node.
|
|
3443
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3444
|
+
* @return {Array<string>|undefined} Temporal Operands array.
|
|
3445
|
+
*/
|
|
3446
|
+
function readTemporalOperands(node, objectStack) {
|
|
3447
|
+
return xml_js.pushParseAndPop([], TEMPORAL_OPERANDS_PARSERS, node, objectStack);
|
|
3448
|
+
}
|
|
3449
|
+
|
|
3450
|
+
/**
|
|
3451
|
+
* @param {Element} node Node.
|
|
3452
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3453
|
+
* @return {Array<string>|undefined} Temporal Operators array.
|
|
3454
|
+
*/
|
|
3455
|
+
function readTemporalOperators(node, objectStack) {
|
|
3456
|
+
return xml_js.pushParseAndPop([], TEMPORAL_OPERATORS_PARSERS, node, objectStack);
|
|
3457
|
+
}
|
|
3458
|
+
|
|
3459
|
+
/**
|
|
3460
|
+
* @param {Element} node Node.
|
|
3461
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3462
|
+
* @return {Array<string>|undefined} Arguments array.
|
|
3463
|
+
*/
|
|
3464
|
+
function readArguments(node, objectStack) {
|
|
3465
|
+
return xml_js.pushParseAndPop([], ARGUMENTS_PARSERS, node, objectStack);
|
|
3466
|
+
}
|
|
3467
|
+
|
|
3468
|
+
/**
|
|
3469
|
+
* @param {Element} node Node.
|
|
3470
|
+
* @param {Array<*>} objectStack Object stack.
|
|
3471
|
+
* @return {Object|undefined} Argument object.
|
|
3472
|
+
*/
|
|
3473
|
+
function readArgument(node, objectStack) {
|
|
3474
|
+
return xml_js.pushParseAndPop({}, ARGUMENT_PARSERS, node, objectStack);
|
|
3475
|
+
}
|
|
3476
|
+
|
|
3477
|
+
/**
|
|
3478
|
+
* @param {Element} node Node.
|
|
3479
|
+
* @return {Array<number>|undefined} Coordinates array.
|
|
3480
|
+
*/
|
|
3481
|
+
function readStringCoords(node) {
|
|
3482
|
+
const coords = xml_js.getAllTextContent(node, false).split(' ');
|
|
3483
|
+
if (coords.length) {
|
|
3484
|
+
return coords.map((c) => Number(c));
|
|
3485
|
+
}
|
|
3486
|
+
return undefined;
|
|
3487
|
+
}
|
|
3488
|
+
|
|
2691
3489
|
// Ol
|
|
2692
3490
|
// https://docs.geoserver.org/latest/en/user/services/wfs/axis_order.html
|
|
2693
3491
|
// Axis ordering: latitude/longitude
|
|
2694
3492
|
const DEFAULT_GEOSERVER_SRS = 'EPSG:3857';
|
|
3493
|
+
const parser = new WFSCapabilities();
|
|
2695
3494
|
/**
|
|
2696
3495
|
* @fires change:capabilities
|
|
2697
3496
|
* @extends {ol/Object~BaseObject}
|
|
@@ -2703,7 +3502,7 @@
|
|
|
2703
3502
|
const defaults = {
|
|
2704
3503
|
url: null,
|
|
2705
3504
|
advanced: {
|
|
2706
|
-
getCapabilitiesVersion: '
|
|
3505
|
+
getCapabilitiesVersion: '2.0.0',
|
|
2707
3506
|
getFeatureVersion: '1.0.0',
|
|
2708
3507
|
describeFeatureTypeVersion: '1.1.0',
|
|
2709
3508
|
lockFeatureVersion: '1.1.0',
|
|
@@ -2738,7 +3537,7 @@
|
|
|
2738
3537
|
});
|
|
2739
3538
|
this._xs = new XMLSerializer();
|
|
2740
3539
|
this.getAndUpdateCapabilities();
|
|
2741
|
-
this.on('change:
|
|
3540
|
+
this.on('change:parsedCapabilities', () => {
|
|
2742
3541
|
this._checkGeoserverCapabilities();
|
|
2743
3542
|
});
|
|
2744
3543
|
}
|
|
@@ -2750,6 +3549,14 @@
|
|
|
2750
3549
|
getCapabilities() {
|
|
2751
3550
|
return this.get(GeoserverProperty.CAPABILITIES);
|
|
2752
3551
|
}
|
|
3552
|
+
/**
|
|
3553
|
+
* Only work for `2.0.0` getCapabilities version
|
|
3554
|
+
* @returns
|
|
3555
|
+
* @public
|
|
3556
|
+
*/
|
|
3557
|
+
getParsedCapabilities() {
|
|
3558
|
+
return this.get(GeoserverProperty.PARSED_CAPABILITIES);
|
|
3559
|
+
}
|
|
2753
3560
|
/**
|
|
2754
3561
|
*
|
|
2755
3562
|
* @param url
|
|
@@ -2890,6 +3697,8 @@
|
|
|
2890
3697
|
const data = await response.text();
|
|
2891
3698
|
const capabilities = new window.DOMParser().parseFromString(data, 'text/xml');
|
|
2892
3699
|
this.set(GeoserverProperty.CAPABILITIES, capabilities);
|
|
3700
|
+
const parsedCapabilities = parser.read(data);
|
|
3701
|
+
this.set(GeoserverProperty.PARSED_CAPABILITIES, parsedCapabilities);
|
|
2893
3702
|
this.state_ = capabilities ? 'ready' : 'error';
|
|
2894
3703
|
return capabilities;
|
|
2895
3704
|
}
|
|
@@ -2904,19 +3713,38 @@
|
|
|
2904
3713
|
* @private
|
|
2905
3714
|
*/
|
|
2906
3715
|
_checkGeoserverCapabilities() {
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
3716
|
+
var _a, _b;
|
|
3717
|
+
if (this.getAdvanced().getCapabilitiesVersion === '2.0.0') {
|
|
3718
|
+
// Available operations in the geoserver
|
|
3719
|
+
const operations = (_b = (_a = this.getParsedCapabilities()) === null || _a === void 0 ? void 0 : _a.OperationsMetadata) === null || _b === void 0 ? void 0 : _b.Operation;
|
|
3720
|
+
if (operations) {
|
|
3721
|
+
operations.forEach((operation) => {
|
|
3722
|
+
if (operation.name === 'Transaction') {
|
|
3723
|
+
this.set(GeoserverProperty.HASTRASNACTION, true);
|
|
3724
|
+
}
|
|
3725
|
+
else if (operation.name === 'LockFeature') {
|
|
3726
|
+
this.set(GeoserverProperty.HASLOCKFEATURE, true);
|
|
3727
|
+
}
|
|
3728
|
+
else if (operation.name === 'DescribeFeatureType') {
|
|
3729
|
+
this.set(GeoserverProperty.HASDESCRIBEFEATURETYPE, true);
|
|
3730
|
+
}
|
|
3731
|
+
});
|
|
2918
3732
|
}
|
|
2919
|
-
}
|
|
3733
|
+
}
|
|
3734
|
+
else {
|
|
3735
|
+
const operations = this.getCapabilities().getElementsByTagName('ows:Operation');
|
|
3736
|
+
Array.from(operations).forEach((operation) => {
|
|
3737
|
+
if (operation.getAttribute('name') === 'Transaction') {
|
|
3738
|
+
this.set(GeoserverProperty.HASTRASNACTION, true);
|
|
3739
|
+
}
|
|
3740
|
+
else if (operation.getAttribute('name') === 'LockFeature') {
|
|
3741
|
+
this.set(GeoserverProperty.HASLOCKFEATURE, true);
|
|
3742
|
+
}
|
|
3743
|
+
else if (operation.getAttribute('name') === 'DescribeFeatureType') {
|
|
3744
|
+
this.set(GeoserverProperty.HASDESCRIBEFEATURETYPE, true);
|
|
3745
|
+
}
|
|
3746
|
+
});
|
|
3747
|
+
}
|
|
2920
3748
|
if (!this.hasTransaction()) {
|
|
2921
3749
|
throw I18N.errors.wfst;
|
|
2922
3750
|
}
|
|
@@ -3204,6 +4032,7 @@
|
|
|
3204
4032
|
var GeoserverProperty;
|
|
3205
4033
|
(function (GeoserverProperty) {
|
|
3206
4034
|
GeoserverProperty["CAPABILITIES"] = "capabilities";
|
|
4035
|
+
GeoserverProperty["PARSED_CAPABILITIES"] = "parsedCapabilities";
|
|
3207
4036
|
GeoserverProperty["URL"] = "url";
|
|
3208
4037
|
GeoserverProperty["HEADERS"] = "headers";
|
|
3209
4038
|
GeoserverProperty["CREDENTIALS"] = "credentials";
|
|
@@ -3314,7 +4143,7 @@
|
|
|
3314
4143
|
layers.forEach((layer) => {
|
|
3315
4144
|
if (layer.getVisible())
|
|
3316
4145
|
layersNumber++;
|
|
3317
|
-
layer.
|
|
4146
|
+
layer.once('layerRendered', () => {
|
|
3318
4147
|
layerRendered++;
|
|
3319
4148
|
if (layerRendered >= layersNumber) {
|
|
3320
4149
|
// run only once
|