Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API call added to IA and AS themes #818

Merged
merged 5 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 39 additions & 11 deletions data-ac-mf/ac-mf-ia/ets-ac-mf-ia-bsxets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ Pre-requisite conformance classes:
<ul><li><a href="http://inspire.ec.europa.eu/id/ats/data/master/information-accessibility" target="_blank">Conformance Class 'Information accessibility'</a></li>
</ul>]]></description>
<reference>../../inspire-noggeo-bsxets.xq</reference>
<version>0.1.0</version>
<version>0.1.1</version>
<author>Consortium Bilbomatica, Guadaltel y Geograma</author>
<creationDate>2021-07-12T10:00:00Z</creationDate>
<lastEditor>Consortium Bilbomatica, Guadaltel y Geograma</lastEditor>
<lastUpdateDate>2021-07-12T10:00:00Z</lastUpdateDate>
<lastEditor>Consortium Bilbomatica y Guadaltel y Geograma</lastEditor>
<lastUpdateDate>2023-06-15T14:15:00Z</lastUpdateDate>
<tags>
<tag ref="EID0bff7ac8-cd7b-46dc-a2d5-7218ddcab8e1"/>
</tags>
Expand Down Expand Up @@ -82,6 +82,8 @@ let $messages_omso :=
return
if (starts-with($x, 'http://inspire.ec.europa.eu/codelist/')) then
()
else if (starts-with($x, 'https://inspire.ec.europa.eu/codelist/')) then
concat('https://inspire.ec.europa.eu/registry/rest?uri=',$x,codepoints-to-string(38),'lang=en', codepoints-to-string(38),'format=jsonc')
else
$x
let $map := local:check-resource-uris($urls, 30, true())
Expand All @@ -93,14 +95,19 @@ let $messages_omso :=
if ($validuri = 'notHTTP' or starts-with($validuri, 'EXCEPTION') or $validuri = 'idNotFound' or matches($validuri,'^\d{3}$')) then
$url
else ()
let $invalid_urls_orig := for $url in $invalid_urls
return if (starts-with($url, 'https://inspire.ec.europa.eu/registry/rest?uri=https://inspire.ec.europa.eu/codelist/')) then
tokenize(substring($url,48), codepoints-to-string(38))[1]
else
$url

return
if (not(exists($envDom))) then
local:addMessage('TR.missingElement', map {'filename': local:filename($feature), 'featureType':local-name($feature), 'gmlid': string($feature/@*:id), 'property': $property_string})
else if (count($envDom) > 1) then
local:addMessage('TR.wrongMultiplicity', map {'filename': local:filename($feature), 'featureType':local-name($feature), 'gmlid': string($feature/@*:id), 'element': $property_string, 'multiplicity': 1, 'count':count($envDom)})
else if (count($invalid_urls) > 0) then
local:addMessage('TR.brokenLink', map {'filename': local:filename($feature), 'featureType':local-name($feature), 'gmlid': string($feature/@*:id), 'property': $property_string, 'value': string-join($invalid_urls, ',')})
else if (count($invalid_urls_orig) > 0) then
local:addMessage('TR.brokenLink', map {'filename': local:filename($feature), 'featureType':local-name($feature), 'gmlid': string($feature/@*:id), 'property': $property_string, 'value': string-join($invalid_urls_orig, ',')})
else ()

let $messages_omor :=
Expand All @@ -112,6 +119,8 @@ let $messages_omor :=
return
if (starts-with($x, 'http://inspire.ec.europa.eu/codelist/')) then
()
else if (starts-with($x, 'https://inspire.ec.europa.eu/codelist/')) then
concat('https://inspire.ec.europa.eu/registry/rest?uri=',$x,codepoints-to-string(38),'lang=en', codepoints-to-string(38),'format=jsonc')
else
$x
let $map := local:check-resource-uris($urls, 30, true())
Expand All @@ -123,14 +132,19 @@ let $messages_omor :=
if ($validuri = 'notHTTP' or starts-with($validuri, 'EXCEPTION') or $validuri = 'idNotFound' or matches($validuri,'^\d{3}$')) then
$url
else ()
let $invalid_urls_orig := for $url in $invalid_urls
return if (starts-with($url, 'https://inspire.ec.europa.eu/registry/rest?uri=https://inspire.ec.europa.eu/codelist/')) then
tokenize(substring($url,48), codepoints-to-string(38))[1]
else
$url

return
if (not(exists($envDom))) then
local:addMessage('TR.missingElement', map {'filename': local:filename($feature/../..), 'featureType':local-name($feature/../..), 'gmlid': string($feature/../../@*:id), 'property': $property_string})
else if (count($envDom) > 1) then
local:addMessage('TR.wrongMultiplicity', map {'filename': local:filename($feature/../..), 'featureType':local-name($feature/../..), 'gmlid': string($feature/../../@*:id), 'element': $property_string, 'multiplicity': 1, 'count':count($envDom)})
else if (count($invalid_urls) > 0) then
local:addMessage('TR.brokenLink', map {'filename': local:filename($feature/../..), 'featureType':local-name($feature/../..), 'gmlid': string($feature/../../@*:id), 'property': $property_string, 'value': string-join($invalid_urls, ',')})
else if (count($invalid_urls_orig) > 0) then
local:addMessage('TR.brokenLink', map {'filename': local:filename($feature/../..), 'featureType':local-name($feature/../..), 'gmlid': string($feature/../../@*:id), 'property': $property_string, 'value': string-join($invalid_urls_orig, ',')})
else ()

let $messages:= ($messages_omso, $messages_omor)
Expand Down Expand Up @@ -169,6 +183,8 @@ let $messages_omso :=
return
if (starts-with($x, 'http://inspire.ec.europa.eu/codelist/')) then
()
else if (starts-with($x, 'https://inspire.ec.europa.eu/codelist/')) then
concat('https://inspire.ec.europa.eu/registry/rest?uri=',$x,codepoints-to-string(38),'lang=en', codepoints-to-string(38),'format=jsonc')
else
$x
let $map := local:check-resource-uris($urls, 30, true())
Expand All @@ -180,14 +196,19 @@ let $messages_omso :=
if ($validuri = 'notHTTP' or starts-with($validuri, 'EXCEPTION') or $validuri = 'idNotFound' or matches($validuri,'^\d{3}$')) then
$url
else ()
let $invalid_urls_orig := for $url in $invalid_urls
return if (starts-with($url, 'https://inspire.ec.europa.eu/registry/rest?uri=https://inspire.ec.europa.eu/codelist/')) then
tokenize(substring($url,48), codepoints-to-string(38))[1]
else
$url

return
if (not(exists($envDom))) then
local:addMessage('TR.missingElement', map {'filename': local:filename($feature), 'featureType':local-name($feature), 'gmlid': string($feature/@*:id), 'property': $property_string})
else if (count($envDom) > 1) then
local:addMessage('TR.wrongMultiplicity', map {'filename': local:filename($feature), 'featureType':local-name($feature), 'gmlid': string($feature/@*:id), 'element': $property_string, 'multiplicity': 1, 'count':count($envDom)})
else if (count($invalid_urls) > 0) then
local:addMessage('TR.brokenLink', map {'filename': local:filename($feature), 'featureType':local-name($feature), 'gmlid': string($feature/@*:id), 'property': $property_string, 'value': string-join($invalid_urls, ',')})
else if (count($invalid_urls_orig) > 0) then
local:addMessage('TR.brokenLink', map {'filename': local:filename($feature), 'featureType':local-name($feature), 'gmlid': string($feature/@*:id), 'property': $property_string, 'value': string-join($invalid_urls_orig, ',')})
else ()

let $messages_omor :=
Expand All @@ -199,6 +220,8 @@ let $messages_omor :=
return
if (starts-with($x, 'http://inspire.ec.europa.eu/codelist/')) then
()
else if (starts-with($x, 'https://inspire.ec.europa.eu/codelist/')) then
concat('https://inspire.ec.europa.eu/registry/rest?uri=',$x,codepoints-to-string(38),'lang=en', codepoints-to-string(38),'format=jsonc')
else
$x
let $map := local:check-resource-uris($urls, 30, true())
Expand All @@ -210,14 +233,19 @@ let $messages_omor :=
if ($validuri = 'notHTTP' or starts-with($validuri, 'EXCEPTION') or $validuri = 'idNotFound' or matches($validuri,'^\d{3}$')) then
$url
else ()
let $invalid_urls_orig := for $url in $invalid_urls
return if (starts-with($url, 'https://inspire.ec.europa.eu/registry/rest?uri=https://inspire.ec.europa.eu/codelist/')) then
tokenize(substring($url,48), codepoints-to-string(38))[1]
else
$url

return
if (not(exists($envDom))) then
local:addMessage('TR.missingElement', map {'filename': local:filename($feature/../..), 'featureType':local-name($feature/../..), 'gmlid': string($feature/../../@*:id), 'property': $property_string})
else if (count($envDom) > 1) then
local:addMessage('TR.wrongMultiplicity', map {'filename': local:filename($feature/../..), 'featureType':local-name($feature/../..), 'gmlid': string($feature/../../@*:id), 'element': $property_string, 'multiplicity': 1, 'count':count($envDom)})
else if (count($invalid_urls) > 0) then
local:addMessage('TR.brokenLink', map {'filename': local:filename($feature/../..), 'featureType':local-name($feature/../..), 'gmlid': string($feature/../../@*:id), 'property': $property_string, 'value': string-join($invalid_urls, ',')})
else if (count($invalid_urls_orig) > 0) then
local:addMessage('TR.brokenLink', map {'filename': local:filename($feature/../..), 'featureType':local-name($feature/../..), 'gmlid': string($feature/../../@*:id), 'property': $property_string, 'value': string-join($invalid_urls_orig, ',')})
else ()

let $messages:= ($messages_omso, $messages_omor)
Expand Down
26 changes: 20 additions & 6 deletions data-am/am-ia/ets-am-ia-bsxets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ Source: <a href="http://inspire.ec.europa.eu/id/ats/data-am/master/am-ia" target
Pre-requisite conformance classes:
<ul><li><a href="http://inspire.ec.europa.eu/id/ats/data/master/information-accessibility" target="_blank">Conformance Class 'Information accessibility'</a></li></ul>]]></description>
<reference>../../inspire-noggeo-bsxets.xq</reference>
<version>0.1.0</version>
<version>0.1.1</version>
<author>Consortium Bilbomatica, Guadaltel y Geograma</author>
<creationDate>2020-05-15T10:00:00Z</creationDate>
<lastEditor>Consortium Bilbomatica, Guadaltel y Geograma</lastEditor>
<lastUpdateDate>2020-05-28T13:30:00Z</lastUpdateDate>
<lastUpdateDate>2023-06-16T12:10:00Z</lastUpdateDate>
<tags>
<tag ref="EIDe4924746-84a8-11ea-bc55-0242ac130003"/>
</tags>
Expand Down Expand Up @@ -76,6 +76,8 @@ let $messages :=
return
if (starts-with($x, 'http://inspire.ec.europa.eu/codelist/')) then
()
else if (starts-with($x, 'https://inspire.ec.europa.eu/codelist/')) then
concat('https://inspire.ec.europa.eu/registry/rest?uri=',$x,codepoints-to-string(38),'lang=en', codepoints-to-string(38),'format=jsonc')
else
$x
let $map := local:check-resource-uris($urls, 30, true())
Expand All @@ -87,13 +89,18 @@ let $messages :=
if ($validuri = 'notHTTP' or starts-with($validuri, 'EXCEPTION') or $validuri = 'idNotFound' or matches($validuri,'^\d{3}$')) then
$url
else ()
let $invalid_urls_orig := for $url in $invalid_urls
return if (starts-with($url, 'https://inspire.ec.europa.eu/registry/rest?uri=https://inspire.ec.europa.eu/codelist/')) then
tokenize(substring($url,48), codepoints-to-string(38))[1]
else
$url
return
if (not($feature/am:zoneType)) then
local:addMessage('TR.missingElement', map {'filename': local:filename($feature), 'featureType':local-name($feature), 'gmlid': string($feature/@*:id), 'property': $property_string})
else if (not(count($feature/am:zoneType) = count($feature/am:zoneType/@xlink:href))) then
local:addMessage('TR.missingAttribute', map {'filename': local:filename($feature), 'featureType':local-name($feature), 'gmlid': string($feature/@*:id), 'property': $property_string, 'attribute': 'xlink:href'})
else if (count($invalid_urls) > 0) then
local:addMessage('TR.brokenLink', map {'filename': local:filename($feature), 'featureType':local-name($feature), 'gmlid': string($feature/@*:id), 'property': $property_string, 'value': string-join($invalid_urls, ',')})
else if (count($invalid_urls_orig) > 0) then
local:addMessage('TR.brokenLink', map {'filename': local:filename($feature), 'featureType':local-name($feature), 'gmlid': string($feature/@*:id), 'property': $property_string, 'value': string-join($invalid_urls_orig, ',')})
else ()
return
(if ($messages) then 'FAILED' else 'PASSED',
Expand Down Expand Up @@ -124,6 +131,8 @@ let $messages :=
return
if (starts-with($x, 'http://inspire.ec.europa.eu/codelist/')) then
()
else if (starts-with($x, 'https://inspire.ec.europa.eu/codelist/')) then
concat('https://inspire.ec.europa.eu/registry/rest?uri=',$x,codepoints-to-string(38),'lang=en', codepoints-to-string(38),'format=jsonc')
else
$x
let $map := local:check-resource-uris($urls, 30, true())
Expand All @@ -135,11 +144,16 @@ let $messages :=
if ($validuri = 'notHTTP' or starts-with($validuri, 'EXCEPTION') or $validuri = 'idNotFound' or matches($validuri,'^\d{3}$')) then
$url
else ()
let $invalid_urls_orig := for $url in $invalid_urls
return if (starts-with($url, 'https://inspire.ec.europa.eu/registry/rest?uri=https://inspire.ec.europa.eu/codelist/')) then
tokenize(substring($url,48), codepoints-to-string(38))[1]
else
$url
return
if (count($feature/am:specialisedZoneType) > 1) then
local:addMessage('TR.wrongMultiplicitySpecialisedZoneType', map {'filename': local:filename($feature), 'featureType':local-name($feature), 'gmlid': string($feature/@*:id), 'count': count($feature/am:specialisedZoneType)})
else if (count($invalid_urls) > 0) then
local:addMessage('TR.brokenLink', map {'filename': local:filename($feature), 'featureType':local-name($feature), 'gmlid': string($feature/@*:id), 'property': $property_string, 'value': string-join($invalid_urls, ',')})
else if (count($invalid_urls_orig) > 0) then
local:addMessage('TR.brokenLink', map {'filename': local:filename($feature), 'featureType':local-name($feature), 'gmlid': string($feature/@*:id), 'property': $property_string, 'value': string-join($invalid_urls_orig, ',')})
else ()
return
(if ($messages) then 'FAILED' else 'PASSED',
Expand Down
15 changes: 11 additions & 4 deletions data-br/br-ia/ets-br-ia-bsxets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ Pre-requisite conformance classes:
<ul><li><a href="http://inspire.ec.europa.eu/id/ats/data/master/information-accessibility" target="_blank">Conformance Class 'Information accessibility'</a></li>
</ul>]]></description>
<reference>../../inspire-noggeo-bsxets.xq</reference>
<version>0.1.0</version>
<version>0.1.1</version>
<author>Consortium Bilbomatica, Guadaltel y Geograma</author>
<creationDate>2021-01-27T10:00:00Z</creationDate>
<lastEditor>Consortium Bilbomatica, Guadaltel y Geograma</lastEditor>
<lastUpdateDate>2021-01-27T10:00:00Z</lastUpdateDate>
<lastUpdateDate>2023-06-16T11:00:00Z</lastUpdateDate>
<tags>
<tag ref="EIDb7bc5972-ca3a-4275-a9ba-c913d2b724a3"/>
</tags>
Expand Down Expand Up @@ -81,6 +81,8 @@ let $messages :=
return
if (starts-with($x, 'http://inspire.ec.europa.eu/codelist/')) then
()
else if (starts-with($x, 'https://inspire.ec.europa.eu/codelist/')) then
concat('https://inspire.ec.europa.eu/registry/rest?uri=',$x,codepoints-to-string(38),'lang=en', codepoints-to-string(38),'format=jsonc')
else
$x
let $map := local:check-resource-uris($urls, 30, true())
Expand All @@ -92,6 +94,11 @@ let $messages :=
if ($validuri = 'notHTTP' or starts-with($validuri, 'EXCEPTION') or $validuri = 'idNotFound' or matches($validuri,'^\d{3}$')) then
$url
else ()
let $invalid_urls_orig := for $url in $invalid_urls
return if (starts-with($url, 'https://inspire.ec.europa.eu/registry/rest?uri=https://inspire.ec.europa.eu/codelist/')) then
tokenize(substring($url,48), codepoints-to-string(38))[1]
else
$url

return
if (exists($feature) and not(exists($envDom))) then
Expand All @@ -100,8 +107,8 @@ let $messages :=
local:addMessage('TR.wrongMultiplicityBioReg', map {'filename': local:filename($feature), 'featureType':local-name($feature), 'gmlid': string($feature/@*:id), 'property': $property_string, 'multiplicity': 1, 'count': count($envDom)})
else if (exists($feature) and not(count($envDom) = count($envDom/@xlink:href))) then
local:addMessage('TR.missingAttributeBioReg', map {'filename': local:filename($feature), 'featureType':local-name($feature), 'gmlid': string($feature/@*:id), 'property': $property_string, 'attribute': 'xlink:href'})
else if(count($invalid_urls) > 0) then
local:addMessage('TR.brokenLinkBioReg', map {'filename': local:filename($feature), 'featureType':local-name($feature), 'gmlid': string($feature/@*:id), 'property': $property_string, 'value': string-join($invalid_urls, ',')})
else if(count($invalid_urls_orig) > 0) then
local:addMessage('TR.brokenLinkBioReg', map {'filename': local:filename($feature), 'featureType':local-name($feature), 'gmlid': string($feature/@*:id), 'property': $property_string, 'value': string-join($invalid_urls_orig, ',')})
else ()

return
Expand Down
Loading