diff --git a/harvesters/src/main/java/org/fao/geonet/kernel/harvest/harvester/ogcwxs/Harvester.java b/harvesters/src/main/java/org/fao/geonet/kernel/harvest/harvester/ogcwxs/Harvester.java index ec06f665972..f5a9f0281b3 100644 --- a/harvesters/src/main/java/org/fao/geonet/kernel/harvest/harvester/ogcwxs/Harvester.java +++ b/harvesters/src/main/java/org/fao/geonet/kernel/harvest/harvester/ogcwxs/Harvester.java @@ -351,6 +351,7 @@ private List addMetadata(Element capa) throws Exception { // and add the metadata XPath xp = XPath.newInstance("//Layer[count(./*[name(.)='Layer'])=0] | " + "//wms:Layer[count(./*[name(.)='Layer'])=0] | " + + "//wmts:Layer[count(./*[local-name(.)='Layer'])=0] | " + "//wfs:FeatureType | " + "//wcs:CoverageOfferingBrief | " + "//sos:ObservationOffering | " + @@ -358,6 +359,7 @@ private List addMetadata(Element capa) throws Exception { xp.addNamespace("wfs", "http://www.opengis.net/wfs"); xp.addNamespace("wcs", "http://www.opengis.net/wcs"); xp.addNamespace("wms", "http://www.opengis.net/wms"); + xp.addNamespace("wmts", "http://www.opengis.net/wmts/1.0"); xp.addNamespace("wps", "http://www.opengis.net/wps/2.0"); xp.addNamespace("sos", "http://www.opengis.net/sos/1.0"); @@ -618,6 +620,9 @@ private WxSLayerRegistry addLayerMetadata(Element layer, Element capa) throws JD } else if (params.ogctype.substring(0, 3).equals("SOS")) { Namespace gml = Namespace.getNamespace("http://www.opengis.net/gml"); reg.name = layer.getChild("name", gml).getValue(); + } else if (params.ogctype.substring(0, 4).equals("WMTS")) { + Namespace ows = Namespace.getNamespace("http://www.opengis.net/ows/1.1"); + reg.name = layer.getChild("Identifier", ows).getValue(); } //--- md5 the full capabilities URL + the layer, coverage or feature name @@ -627,9 +632,9 @@ private WxSLayerRegistry addLayerMetadata(Element layer, Element capa) throws JD if (params.useLayerMd && ( params.ogctype.substring(0, 3).equals("WMS") || - params.ogctype.substring(0, 3).equals("WFS") || - params.ogctype.substring(0, 3).equals("WPS") || - params.ogctype.substring(0, 3).equals("WCS"))) { + params.ogctype.substring(0, 3).equals("WFS") || + params.ogctype.substring(0, 3).equals("WPS") || + params.ogctype.substring(0, 3).equals("WCS"))) { log.info(" - Searching for metadataUrl for layer " + reg.name); diff --git a/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/OGCWMTGetCapabilities-to-ISO19119_ISO19139.xsl b/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/OGCWMTGetCapabilities-to-ISO19119_ISO19139.xsl new file mode 100644 index 00000000000..4710f5ae726 --- /dev/null +++ b/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/OGCWMTGetCapabilities-to-ISO19119_ISO19139.xsl @@ -0,0 +1,31 @@ + + + + + + + + + + diff --git a/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/OGCWMTGetCapabilitiesLayer-to-19139.xsl b/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/OGCWMTGetCapabilitiesLayer-to-19139.xsl new file mode 100644 index 00000000000..03bdbfe0a25 --- /dev/null +++ b/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/OGCWMTGetCapabilitiesLayer-to-19139.xsl @@ -0,0 +1,32 @@ + + + + + + + + + + diff --git a/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/OGCWxSGetCapabilities-to-19119.xsl b/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/OGCWxSGetCapabilities-to-19119.xsl index 93cf0455137..b443825ba19 100644 --- a/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/OGCWxSGetCapabilities-to-19119.xsl +++ b/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/OGCWxSGetCapabilities-to-19119.xsl @@ -27,6 +27,7 @@ Mapping between : - WMS 1.0.0 - WMS 1.1.1 - WMS 1.3.0 +- WMTS 1.0.0 - WCS 1.0.0 - WFS 1.0.0 - WFS 1.1.0 @@ -41,6 +42,7 @@ Mapping between : xmlns:wfs="http://www.opengis.net/wfs" xmlns:wcs="http://www.opengis.net/wcs" xmlns:wms="http://www.opengis.net/wms" + xmlns:wmts="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows" xmlns:owsg="http://www.opengeospatial.net/ows" xmlns:ows11="http://www.opengis.net/ows/1.1" @@ -52,59 +54,52 @@ Mapping between : xmlns:inspire_vs="http://inspire.ec.europa.eu/schemas/inspire_vs/1.0" version="2.0" xmlns="http://www.isotc211.org/2005/gmd" - extension-element-prefixes="wcs ows wfs ows11 wps wps1 wps2 owsg"> - - + exclude-result-prefixes="#all"> uuid eng - - - + - - + true + or (local-name(.)='Capabilities' and namespace-uri(.)='http://www.opengis.net/wps/2.0') + or (local-name(.)='Capabilities' and namespace-uri(.)='http://www.opengis.net/wmts/1.0')">true false - - - - + - - - - - + - - - - - - + owsg:ServiceProvider| + ows11:ServiceProvider| + ows2:ServiceProvider"/> + + + @@ -166,9 +152,8 @@ Mapping between : - - [Y0001]-[M01]-[D01]T[H01]:[m01]:[s01] + @@ -184,8 +169,6 @@ Mapping between : - - ISO 19119/2005 @@ -194,10 +177,6 @@ Mapping between : 1.0 - - - - @@ -211,8 +190,6 @@ Mapping between : - - @@ -232,6 +209,9 @@ Mapping between : + + + application/vnd.ogc.wfs_xml + OGC:WMTS WWW:LINK-1.0-http--link @@ -396,14 +377,7 @@ Mapping between : - - - - - - - diff --git a/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/OGCWxSGetCapabilitiesLayer-to-19139.xsl b/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/OGCWxSGetCapabilitiesLayer-to-19139.xsl index 36a02e0f089..e0f265e1d71 100644 --- a/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/OGCWxSGetCapabilitiesLayer-to-19139.xsl +++ b/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/OGCWxSGetCapabilitiesLayer-to-19139.xsl @@ -28,15 +28,14 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wms="http://www.opengis.net/wms" + xmlns:wmts="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows" + xmlns:ows11="http://www.opengis.net/ows/1.1" xmlns:wcs="http://www.opengis.net/wcs" - xmlns:xlink="http://www.w3.org/1999/xlink" version="2.0" + xmlns:xlink="http://www.w3.org/1999/xlink" + version="2.0" xmlns="http://www.isotc211.org/2005/gmd" - extension-element-prefixes="wcs ows wfs srv"> - - + exclude-result-prefixes="#all"> @@ -49,89 +48,59 @@ OGC server list all epsg database. --> 21 - - - - - + + - true - + test="(local-name(.)='WFS_Capabilities' and namespace-uri(.)='http://www.opengis.net/wfs' and @version='1.1.0') or + (local-name(.)='Capabilities' and namespace-uri(.)='http://www.opengis.net/wmts/1.0')">true false - - - - - - - - - - - - - @@ -139,7 +108,7 @@ - + @@ -147,10 +116,6 @@ - - [Y0001]-[M01]-[D01]T[H01]:[m01]:[s01] @@ -158,9 +123,6 @@ - ISO 19115:2003/19139 @@ -169,7 +131,6 @@ 1.0 - @@ -197,10 +158,6 @@ - - - - @@ -239,6 +194,11 @@ + + + @@ -263,28 +223,31 @@ - - - OGC:WMS-1.1.1-http-get-map - - - - OGC:WMS-1.3.0-http-get-map - - - - OGC:WFS-1.1.0-http-get-feature - - - - OGC:WFS-1.0.0-http-get-feature - - - - OGC:WCS-1.0.0-http-get-coverage - - - + + + + OGC:WMS-1.1.1-http-get-map + + + + OGC:WMS-1.3.0-http-get-map + + + OGC:WMTS + + OGC:WFS-1.1.0-http-get-feature + + + + OGC:WFS-1.0.0-http-get-feature + + + + OGC:WCS-1.0.0-http-get-coverage + + + + @@ -318,7 +281,6 @@ - @@ -338,9 +300,6 @@ - - - @@ -410,11 +369,11 @@ - - + + @@ -422,12 +381,13 @@ select="wms:OnlineResource/@xlink:href|OnlineResource/@xlink:href"/> - - + + @@ -435,13 +395,14 @@ select="wms:OnlineResource/@xlink:href|OnlineResource/@xlink:href"/> - + + @@ -473,9 +434,4 @@ - - - diff --git a/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/identification.xsl b/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/identification.xsl index 78ed5f3b5dc..d0447b58a25 100644 --- a/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/identification.xsl +++ b/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/identification.xsl @@ -33,6 +33,7 @@ xmlns:ows2="http://www.opengis.net/ows/2.0" xmlns:wcs="http://www.opengis.net/wcs" xmlns:wms="http://www.opengis.net/wms" + xmlns:wmts="http://www.opengis.net/wmts/1.0" xmlns:wps="http://www.opengeospatial.net/wps" xmlns:wps1="http://www.opengis.net/wps/1.0.0" xmlns:wps2="http://www.opengis.net/wps/2.0" @@ -42,9 +43,8 @@ xmlns:inspire_common="http://inspire.ec.europa.eu/schemas/common/1.0" version="2.0" xmlns="http://www.isotc211.org/2005/gmd" - extension-element-prefixes="math exslt wcs ows wps wps1 wps2 ows11 wfs gml"> - - + extension-element-prefixes="math exslt" + exclude-result-prefixes="#all"> @@ -107,8 +107,6 @@ - - @@ -134,15 +132,12 @@ - - - @@ -159,11 +154,9 @@ - - - + select="$s/KeywordList|$s/wfs:keywords|$s/wcs:keywords|$s/ows:Keywords| + $s/ows11:Keywords|$s/ows11:KeywordList|$s/ows2:Keywords"> @@ -336,6 +329,8 @@ OGC:WMS + OGC:WMTS + OGC:WCS OGC:WPS OGC:WFS @@ -348,8 +343,6 @@ - - @@ -403,7 +396,8 @@ - + @@ -411,7 +405,8 @@ - + @@ -678,6 +673,9 @@ <gco:CharacterString> <xsl:choose> + <xsl:when test="local-name(.)='Capabilities' and namespace-uri(.)='http://www.opengis.net/wmts/1.0'"> + <xsl:value-of select="//wmts:Layer[ows11:Identifier=$Name]/ows11:Title"/> + </xsl:when> <xsl:when test="name(.)='WFS_Capabilities' or name(.)='wfs:WFS_Capabilities' or $ows='true'"> <xsl:value-of select="//wfs:FeatureType[wfs:Name=$Name]/wfs:Title"/> @@ -711,8 +709,6 @@ </CI_Citation> </citation> - <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> - <abstract> <gco:CharacterString> <xsl:choose> @@ -725,6 +721,9 @@ <xsl:when test="name(.)='WMT_MS_Capabilities'"> <xsl:value-of select="//Layer[Name=$Name]/Abstract"/> </xsl:when> + <xsl:when test="local-name(.)='Capabilities' and namespace-uri(.)='http://www.opengis.net/wmts/1.0'"> + <xsl:value-of select="//wmts:Layer[ows11:Identifier=$Name]/ows11:Abstract"/> + </xsl:when> <xsl:otherwise> <xsl:value-of select="//wcs:CoverageOfferingBrief[wcs:name=$Name]/wcs:description"/> </xsl:otherwise> @@ -739,8 +738,6 @@ codeListValue="completed"/> </status> - <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> - <xsl:for-each select="Service/ContactInformation|wms:Service/wms:ContactInformation"> <pointOfContact> <CI_ResponsibleParty> @@ -958,7 +955,8 @@ <xsl:choose> <xsl:when test="$ows='true'"> <xsl:for-each - select="//wfs:FeatureType[wfs:Name=$Name]/ows:WGS84BoundingBox/ows:LowerCorner"> + select="//wfs:FeatureType[wfs:Name=$Name]/ows:WGS84BoundingBox/ows:LowerCorner| + //wmts:Layer[ows11:Identifier=$Name]/ows11:WGS84BoundingBox/ows11:LowerCorner"> <xmin> <xsl:value-of select="substring-before(., ' ')"/> </xmin> @@ -967,7 +965,8 @@ </ymin> </xsl:for-each> <xsl:for-each - select="//wfs:FeatureType[wfs:Name=$Name]/ows:WGS84BoundingBox/ows:UpperCorner"> + select="//wfs:FeatureType[wfs:Name=$Name]/ows:WGS84BoundingBox/ows:UpperCorner| + //wmts:Layer[ows11:Identifier=$Name]/ows11:WGS84BoundingBox/ows11:UpperCorner"> <xmax> <xsl:value-of select="substring-before(., ' ')"/> </xmax> @@ -1087,12 +1086,8 @@ </xsl:for-each> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> - </xsl:template> - <!-- ============================================================================= --> - <!-- === Keywords === --> - <!-- ============================================================================= --> <xsl:template match="*" mode="Keywords"> <!-- TODO : tokenize WFS 100 keywords list --> diff --git a/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/ref-system.xsl b/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/ref-system.xsl index 789a61229b5..4f24aa75f0d 100644 --- a/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/ref-system.xsl +++ b/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/ref-system.xsl @@ -24,11 +24,9 @@ --> <xsl:stylesheet xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - version="1.0" + version="2.0" xmlns="http://www.isotc211.org/2005/gmd" -> - - <!-- ============================================================================= --> + exclude-result-prefixes="#all"> <xsl:template name="RefSystemTypes"> <xsl:param name="srs"/> @@ -43,7 +41,4 @@ </referenceSystemIdentifier> </xsl:template> - - <!-- ============================================================================= --> - </xsl:stylesheet> diff --git a/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/resp-party.xsl b/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/resp-party.xsl index 9edd4d2f91a..b2217faf3be 100644 --- a/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/resp-party.xsl +++ b/schemas/iso19139/src/main/plugin/iso19139/convert/OGCWxSGetCapabilitiesto19119/resp-party.xsl @@ -37,8 +37,6 @@ version="2.0" exclude-result-prefixes="#all"> - <!-- ============================================================================= --> - <xsl:template match="*" mode="RespParty"> <xsl:for-each diff --git a/web-ui/src/main/resources/catalog/templates/admin/harvest/type/ogcwxs.html b/web-ui/src/main/resources/catalog/templates/admin/harvest/type/ogcwxs.html index 163f643e22b..3733535937e 100644 --- a/web-ui/src/main/resources/catalog/templates/admin/harvest/type/ogcwxs.html +++ b/web-ui/src/main/resources/catalog/templates/admin/harvest/type/ogcwxs.html @@ -22,7 +22,7 @@ <label id="gn-harvest-settings-ogc-basic-type-label" class="control-label" data-translate="">serviceType</label> <select id="gn-harvest-settings-ogc-basic-type-list" class="form-control" data-ng-model="harvesterSelected.site.ogctype"> <option - data-ng-repeat="t in ['WMS1.0.0', 'WMS1.1.1', 'WMS1.3.0', '-', 'WFS1.0.0', 'WFS1.1.0', '-', 'WCS1.0.0', '-', 'CSW2.0.2', '-', 'WPS0.4.0', 'WPS1.0.0', 'WPS2.0.0','-', 'SOS1.0.0'] track by $index" + data-ng-repeat="t in ['WMS1.0.0', 'WMS1.1.1', 'WMS1.3.0', '-', 'WMTS1.1.0', '-', 'WFS1.0.0', 'WFS1.1.0', '-', 'WCS1.0.0', '-', 'CSW2.0.2', '-', 'WPS0.4.0', 'WPS1.0.0', 'WPS2.0.0','-', 'SOS1.0.0'] track by $index" value="{{t}}" data-ng-selected="t == harvesterSelected.site.ogctype"> {{t | translate}} @@ -40,7 +40,8 @@ <div id="gn-harvest-settings-ogc-advanced-remote-row" data-gn-harvester-account="harvesterSelected"/> <!-- Service metadata record --> - <div id="gn-harvest-settings-ogc-advanced-template-row"> + <div id="gn-harvest-settings-ogc-advanced-template-row" + data-ng-show="harvesterSelected.site.ogctype.match('^(WMS|WFS|WCS|CSW|SOS|WPS)') != null"> <label id="gn-harvest-settings-ogc-advanced-template-label" class="control-label"> <span data-translate="">ogcwxs-serviceTemplateUuid</span> </label> @@ -61,7 +62,7 @@ <label class="control-label"> <input id="gn-harvest-settings-ogc-advanced-record-checkbox" type="checkbox" - data-ng-disabled="harvesterSelected.site.ogctype.match('^(WMS|WFS|WCS|SOS|WPS2)') == null" + data-ng-disabled="harvesterSelected.site.ogctype.match('^(WMS|WMTS|WFS|WCS|SOS|WPS2)') == null" data-ng-model="harvesterSelected.options.useLayer"/> <span id="gn-harvest-settings-ogc-advanced-record-label" data-translate="" translate-values="{metadataTemplateType: metadataTemplateType}">ogcwxs-createMetadataForEachLayer</span> </label> @@ -72,7 +73,8 @@ <div id="gn-harvest-settings-ogc-advanced-records-row" class="well" data-ng-show="harvesterSelected.options.useLayer"> - <div id="gn-harvest-settings-ogc-advanced-records-imports-row"> + <div id="gn-harvest-settings-ogc-advanced-records-imports-row" + data-ng-hide="harvesterSelected.site.ogctype.indexOf('WMTS') === 0"> <label class="control-label"> <input id="gn-harvest-settings-ogc-advanced-records-imports-checkbox" type="checkbox" data-ng-model="harvesterSelected.options.useLayerMd"/> <span id="gn-harvest-settings-ogc-advanced-records-imports-label" data-translate="" translate-values="{metadataTemplateType: metadataTemplateType}">ogcwxs-createMetadataForEachLayerUsingMetadataURL</span> @@ -81,12 +83,12 @@ >ogcwxs-createMetadataForEachLayerUsingMetadataURLHelp</p> </div> - <div id="gn-harvest-settings-ogc-advanced-records-template-row"> + <div id="gn-harvest-settings-ogc-advanced-records-template-row" + data-ng-show="harvesterSelected.site.ogctype.match('^(WMS|WFS|WCS|SOS|WPS)') != null"> <label id="gn-harvest-settings-ogc-advanced-records-template-label" class="control-label"> <span data-translate="">ogcwxs-datasetTemplateUuid</span> </label> <select id="gn-harvest-settings-ogc-advanced-records-template-list" - data-ng-show="harvesterSelected.site.ogctype.match('^(WMS|WFS|WCS|SOS|WPS)') != null" class="form-control" data-ng-model="harvesterSelected.options.datasetTemplateUuid" data-ng-options="t['geonet:info'].uuid as t.getTitle() for t in ogcwxsDatasetTemplates"> @@ -103,7 +105,8 @@ <p class="help-block" data-translate="">ogcwxs-datasetTemplateUuidHelp</p> </div> - <div id="gn-harvest-settings-ogc-advanced-records-thumbnail-row"> + <div id="gn-harvest-settings-ogc-advanced-records-thumbnail-row" + data-ng-hide="harvesterSelected.site.ogctype.indexOf('WMS') !== 0"> <label class="control-label"> <input id="gn-harvest-settings-ogc-advanced-records-thumbnail-checkbox" type="checkbox"