diff --git a/geoportal-search/src/main/resources/gs/widget/ItemCard.js b/geoportal-search/src/main/resources/gs/widget/ItemCard.js index 6873fcc7..966c1d10 100644 --- a/geoportal-search/src/main/resources/gs/widget/ItemCard.js +++ b/geoportal-search/src/main/resources/gs/widget/ItemCard.js @@ -189,11 +189,9 @@ function(declare, array, locale, domClass, _WidgetBase, _TemplatedMixin, "mapserver": "Map Service", "map service": "Map Service", "wms": "WMS", - "kml": "KML" - /* + "kml": "KML", "vectortileserver": "Vector Tile Service", - "vector tile service": "Vector Tile Service", - */ + "vector tile service": "Vector Tile Service" }; this.referenceId = response.sourceKey+"-refid-"+item.id; diff --git a/geoportal/src/main/java/com/esri/geoportal/search/STACService.java b/geoportal/src/main/java/com/esri/geoportal/search/STACService.java index 4474042f..620aeb71 100644 --- a/geoportal/src/main/java/com/esri/geoportal/search/STACService.java +++ b/geoportal/src/main/java/com/esri/geoportal/search/STACService.java @@ -183,7 +183,7 @@ public Response getCollectionMetadata(@Context HttpServletRequest hsr, } @GET - @Produces("application/json") + @Produces("application/geo+json") @Path("/collections/{collectionId}/items") public Response getItems(@Context HttpServletRequest hsr, @PathParam("collectionId") String collectionId, @@ -230,7 +230,7 @@ public Response getItems(@Context HttpServletRequest hsr, status = Response.Status.INTERNAL_SERVER_ERROR; responseJSON = this.generateResponse("500", "STAC API collection metadata items response could not be generated."); } - return Response.status(status).header("Content-Type", "application/json").entity(responseJSON).build(); + return Response.status(status).header("Content-Type", "application/geo+json").entity(responseJSON).build(); } @GET diff --git a/geoportal/src/main/resources/metadata/js/Evaluator.js b/geoportal/src/main/resources/metadata/js/Evaluator.js index 7639c7d2..0bf423cb 100644 --- a/geoportal/src/main/resources/metadata/js/Evaluator.js +++ b/geoportal/src/main/resources/metadata/js/Evaluator.js @@ -91,7 +91,7 @@ G._metadataTypes = { evaluator: G.evaluators.arcgis, interrogationXPath: "/metadata/Esri/ArcGISFormat", identifier: "ArcGIS-Metadata", - detailsXslt: "metadata/details/arcgis-details.xslt", + detailsXslt: "metadata/details/arcgis-details.xslt" }, "oai_dc": { key: "oai_dc", diff --git a/geoportal/src/main/resources/metadata/js/EvaluatorBase.js b/geoportal/src/main/resources/metadata/js/EvaluatorBase.js index 59f570b8..757cb015 100644 --- a/geoportal/src/main/resources/metadata/js/EvaluatorBase.js +++ b/geoportal/src/main/resources/metadata/js/EvaluatorBase.js @@ -156,7 +156,7 @@ var G = { } else if (lc.indexOf("/rest/services/") > 0) { for (i=0;i 0)) { linkType = arcgisTypes[i]; linkUrl = url; break; @@ -177,6 +177,30 @@ var G = { linkUrl = url; } } + if (linkType === null) { + if (lc.indexOf("cuahsi_1_1.asmx")>= 0) { + linkType = "WaterOneFlow"; + linkUrl = url; + } + } + if (linkType === null) { + if (lc.indexOf("/wms.axd/") > 0) { + linkType = "WMS"; + linkUrl = url; + } + } + if (linkType === null) { + if (lc.indexOf("/wmts.axd/") > 0) { + linkType = "WMTS"; + linkUrl = url; + } + } + if (linkType === null) { + if (lc.indexOf("/wfs.axd/") > 0) { + linkType = "WFS"; + linkUrl = url; + } + } } if (linkType !== null && (isHttp || isFtp)) { return {linkType:linkType,linkUrl:linkUrl}; diff --git a/geoportal/src/main/resources/metadata/js/EvaluatorFor_ISO.js b/geoportal/src/main/resources/metadata/js/EvaluatorFor_ISO.js index 1c17a82a..8dd1900f 100644 --- a/geoportal/src/main/resources/metadata/js/EvaluatorFor_ISO.js +++ b/geoportal/src/main/resources/metadata/js/EvaluatorFor_ISO.js @@ -185,104 +185,8 @@ G.evaluators.iso = { G.evalProps(task,item,root,"apiso_CouplingType_s","//gmd:identificationInfo/srv:SV_ServiceIdentification/srv:couplingType/srv:SV_CouplingType/@codeListValue"); G.evalResourceLinks(task,item,root,"//gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:linkage/gmd:URL | //gmd:identificationInfo/srv:SV_ServiceIdentification/srv:containsOperations/srv:SV_OperationMetadata/srv:connectPoint/gmd:CI_OnlineResource/gmd:linkage/gmd:URL"); - this.evalResourceLinks(task, item, root, "//gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:linkage/gmd:URL | //gmd:identificationInfo/srv:SV_ServiceIdentification/srv:containsOperations/srv:SV_OperationMetadata/srv:connectPoint/gmd:CI_OnlineResource/gmd:linkage/gmd:URL"); }, - evalResourceLinks: function(task,obj,contextNode,xpathExpression) { - if (!contextNode) return; - var self = this, urls = [], name = "resources_nst"; - G.forEachNode(task,contextNode,xpathExpression,function(node){ - var url = G.getNodeText(node); - var info = self.checkResourceLink(url); - if (info && info.linkUrl && info.linkType) { - if (urls.indexOf(info.linkUrl) === -1) { - urls.push(info.linkUrl); - G.writeMultiProp(obj,name,{ - "url_s": info.linkUrl, - "url_type_s": info.linkType - }); - } - } - }); - }, - checkResourceLink: function(url) { - var endsWith = function(v,sfx) {return (v.indexOf(sfx,(v.length-sfx.length)) !== -1);}; - - var arcgisTypes = ["MapServer","ImageServer","FeatureServer","GlobeServer","GPServer","GeocodeServer", - "GeometryServer","NAServer","GeoDataServer ","MobileServer","SceneServer", - "SchematicsServer","StreamServer","VectorTileServer"]; - var ogcTypes = ["WMS","WFS","WCS","WMTS","WPS","SOS","CSW"]; - var dataTypes = ["zip","shp"]; - - var i, v, lc, linkType = null, linkUrl = null; - var isHttp = (typeof url === "string" && (url.indexOf("http://") === 0 || url.indexOf("https://") === 0)); - var isFtp = (typeof url === "string" && (url.indexOf("ftp://") === 0 || url.indexOf("ftps://") === 0)); - if (isHttp) { - lc = url.toLowerCase(); - if (lc.indexOf("service=") > 0) { - //if (lc.indexOf("request=getcapabilities") > 0) {} - for (i=0;i 0 || lc.indexOf("&"+v) > 0) { - linkType = ogcTypes[i]; - linkUrl = url; - break; - } - } - } else if (lc.indexOf("/rest/services/") > 0) { - for (i=0;i 0 || lc.indexOf("&f=kml") > 0 || - lc.indexOf("?f=kmz") > 0 || lc.indexOf("&f=kmz") > 0) { - linkType = "kml"; - linkUrl = url; - } - } - if (linkType === null) { - if (lc.indexOf("com.esri.wms.esrimap")>= 0) { - linkType = "IMS"; - linkUrl = url; - } - } - if (linkType === null) { - if (lc.indexOf("cuahsi_1_1.asmx")>= 0) { - linkType = "WaterOneFlow"; - linkUrl = url; - } - } - if (linkType === null) { - if (lc.indexOf("/wms.axd/") > 0) { - linkType = "WMS"; - linkUrl = url; - } - } - if (linkType === null) { - if (lc.indexOf("/wmts.axd/") > 0) { - linkType = "WMTS"; - linkUrl = url; - } - } - if (linkType === null) { - if (lc.indexOf("/wfs.axd/") > 0) { - linkType = "WFS"; - linkUrl = url; - } - } - } - if (linkType !== null && (isHttp || isFtp)) { - return {linkType:linkType,linkUrl:linkUrl}; - } - }, - evalSpatial: function(task) { var item = task.item, root = task.root; var hasEnvelope = false; diff --git a/geoportal/src/main/resources/metadata/xslt/identity.xslt b/geoportal/src/main/resources/metadata/xslt/identity.xslt new file mode 100644 index 00000000..14e6791e --- /dev/null +++ b/geoportal/src/main/resources/metadata/xslt/identity.xslt @@ -0,0 +1,16 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/geoportal/src/main/resources/service/config/stac-collection-metadata.json b/geoportal/src/main/resources/service/config/stac-collection-metadata.json index b56f6053..31ef2cd7 100644 --- a/geoportal/src/main/resources/service/config/stac-collection-metadata.json +++ b/geoportal/src/main/resources/service/config/stac-collection-metadata.json @@ -67,7 +67,7 @@ }, { "rel": "items", - "type": "application/json", + "type": "application/geo+json", "title": "Items in this collection", "href": "{url}/collections/{collectionId}/items", "hreflang": "en-US" diff --git a/geoportal/src/main/resources/service/config/stac-itemLinks.json b/geoportal/src/main/resources/service/config/stac-itemLinks.json index cbe9bdd0..02a40beb 100644 --- a/geoportal/src/main/resources/service/config/stac-itemLinks.json +++ b/geoportal/src/main/resources/service/config/stac-itemLinks.json @@ -1,61 +1,66 @@ { -"metadataItem": - { - "links": [ - { - "rel": "self", - "type": "application/json", - "title": "Link to all collections", - "href": "{url}/collections/metadata/items", - "hreflang": "en-US" - }, - { - "rel": "next", - "type": "application/json", - "title": "Next page of results", - "href": "{url}/collections/metadata/items?{urlparam}", - "hreflang": "en-US" - }, - { - "rel": "parent", - "type": "application/json", - "title": "Link to the Metadata collection", - "href": "{url}/collections/metadata", - "hreflang": "en-US" - }, - { - "rel": "root", - "type": "application/json", - "title": "Link to all collections", - "href": "{url}", - "hreflang": "en-US" - } - ] - }, - "searchItem": - { - "links": [ - { - "rel": "self", - "type": "application/json", - "title": "Next page of results", - "href": "{url}/search", - "hreflang": "en-US" - }, - { - "rel": "next", - "type": "application/json", - "title": "Next page of results", - "href": "{url}/search?{urlparam}", - "hreflang": "en-US" - }, - { - "rel": "root", - "type": "application/json", - "title": "Link to all collections", - "href": "{url}", - "hreflang": "en-US" - } - ] - } -} + "metadataItem": { + "links": [ + { + "rel": "self", + "type": "application/geo+json", + "title": "Link to all collections", + "href": "{url}/collections/metadata/items", + "hreflang": "en-US" + }, + { + "rel": "next", + "type": "application/geo+json", + "title": "Next page of results", + "href": "{url}/collections/metadata/items?{urlparam}", + "hreflang": "en-US" + }, + { + "rel": "previous", + "type": "application/geo+json", + "title": "Next page of results", + "href": "{url}/collections/metadata/items?{urlparam}", + "hreflang": "en-US" + }, + { + "rel": "parent", + "type": "application/json", + "title": "Link to the Metadata collection", + "href": "{url}/collections/metadata", + "hreflang": "en-US" + }, + { + "rel": "root", + "type": "application/json", + "title": "Link to all collections", + "href": "{url}", + "hreflang": "en-US" + } + ] + }, + "searchItem": { + "links": [ + { + "rel": "self", + "type": "application/geo+json", + "title": "Next page of results", + "href": "{url}/search", + "hreflang": "en-US" + }, + { + "rel": "next", + "type": "application/geo+json", + "title": "Next page of results", + "href": "{url}/search?{urlparam}", + "hreflang": "en-US" + }, + { + "rel": "root", + "type": "application/json", + "title": "Link to all collections", + "href": "{url}", + "hreflang": "en-US" + } + ] + } +} \ No newline at end of file