Changes between Initial Version and Version 1 of Ticket #2833


Ignore:
Timestamp:
Oct 29, 2024, 11:42:45 AM (3 days ago)
Author:
Bang Pham Huu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2833

    • Property Cc Dimitar Misev added
    • Property Summary FIX - WCS DescribeCoverage cannot return result when metadata has json in local metadata fileFIX - throw exception when < is unescaped in XML and wcst_import should not escape coverage's metadata when importing
  • Ticket #2833 – Description

    initial v1  
    1 for example:
     1- For example a coverage's metadadata has:
    22
    33{{{
    4  ERROR [2024-10-25 15:06:57] AbstractController@1041: Failed processing request: req-56 with user rasadmin, evaluation time 4 ms. Reason: Cannot serialize coverage's metadata to XML element. Reason: Cannot parse XML fragment '<?xml version="1.0" encoding="UTF-8"?><rootDummy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:swe="http://www.opengis.net/swe/2.0" xmlns:ows="http://www.opengis.net/ows/2.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ras="http://www.rasdaman.org"><ras:covMetadata xmlns:ras="http://www.rasdaman.org"><slices><slice><boundedBy><Envelope><axisLabels>GBIF_taxon_key E N</axisLabels><srsDimension>3</srsDimension><lowerCorner>11418114 260085.0 4488705.0</lowerCorner><upperCorner>11418114 527625.0 4748055.0</upperCorner></Envelope></boundedBy><AD4GD>
    5 {"key":"0022919-240906103802322","doi":"10.15468/dl.p7wtpv","license":"http://creativecommons.org/publicdomain/zero/1.0/legalcode","request":{"sql":"SELECT PRINTF('%04d-%02d', \"year\", \"month\") AS yearMonth, decimalLatitude AS lat, decimalLongitude AS lon, family, familyKey, genus, genusKey, species, speciesKey, iucnRedListCategory, basisOfRecord FROM occurrence WHERE iucnRedListCategory IN ('NT','VU','EN','CR','EW','EX','LC') AND occurrenceStatus = 'PRESENT' AND countryCode = 'ES' AND \"year\" >= 1980 AND classKey = 11418114 AND hasCoordinate = TRUE AND (coordinateUncertaintyInMeters <= 1000 OR coordinateUncertaintyInMeters IS NULL) AND speciesKey IS NOT NULL AND NOT ARRAY_CONTAINS(issue, 'ZERO_COORDINATE') AND NOT ARRAY_CONTAINS(issue, 'COORDINATE_OUT_OF_RANGE') AND NOT ARRAY_CONTAINS(issue, 'COORDINATE_INVALID') AND NOT ARRAY_CONTAINS(issue, 'COUNTRY_COORDINATE_MISMATCH') AND \"month\" IS NOT NULL AND basisOfRecord IN ('HUMAN_OBSERVATION','MACHINE_OBSERVATION','MATERIAL_CITATION','OBSERVATION','OCCURRENCE') GROUP BY yearMonth, lat, lon, familyKey, family, genusKey, genus, speciesKey, species, iucnRedListCategory, basisOfRecord","sendNotification":true,"type":"OCCURRENCE","format":"SQL_TSV_ZIP"},"created":"2024-09-19T11:40:31.609+00:00","modified":"2024-09-19T12:08:05.179+00:00","eraseAfter":"2025-03-19T11:40:31.547+00:00","status":"SUCCEEDED","downloadLink":"https://api.gbif.org/v1/occurrence/download/request/0022919-240906103802322.zip","size":423789,"totalRecords":10728,"numberDatasets":30}
    6 </AD4GD><fileReferenceHistory>/tmp/key_11418114_0022919-240906103802322.tif</fileReferenceHistory></slice></slices></ras:covMetadata></rootDummy>'. Reason: The content of elements must consist of well-formed character data or markup.
     4<a>
     5  5 > 6
     6</a>
     7}}}
    78
     9is valid XML and `>` can be escaped to `&lt;`
    810
     11but
     12
     13{{{
     14<a>
     15  5 < 6
     16</a>
    917}}}
     18
     19`<` is not valid and petascope must throw exception for that
     20
     21- wcst_import also should not escape `<,>` characters when importing, e.g.
     22
     23{{{
     24&lt;oi-cov:OrthoimageCoverageMetadata xmlns:oi-cov="http://inspire.ec.europa.eu/schemas/oi/4.0" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://inspire.ec.europa.eu/schemas/oi/4.0 https://schema.datacove.eu/OrthoimageryMetadata.xsd"&gt;
     25    &lt;oi-cov:inspireId&gt;
     26        &lt;base:Identifier&gt;
     27            &lt;base:localId&gt;FILE 1&lt;/base:localId&gt;
     28            &lt;base:namespace&gt;catalunya&lt;/base:namespace&gt;
     29        &lt;/base:Identifier&gt;
     30    &lt;/oi-cov:inspireId&gt;
     31    &lt;oi-cov:domainExtent&gt;
     32        &lt;gmd:EX_Extent&gt;
     33}}}