On 9/27/18 4:05 PM, Landry Breuil wrote:
On 4/24/18 12:15 PM, Jo Cook wrote:
Hi Jose,
I'm still seeing this as a problem, in both Geonetwork 3.2 (3.2.2-67-dirty)
and 3.4 (3.4.1-177-dirty). In both cases I have the correct INSPIRE Themes
Thesaurus, the Search tab correctly shows the INSPIRE label rather than the
URL, I've reindexed the records, cleared the cache etc but the front page
still shows just the icon and not the label. It's working fine in 3.0.5
with the same thesaurus. In the log file for 3.2 I am seeing error messages
like:
2018-04-24 09:29:37,771 ERROR [geonetwork.thesaurus] - Term not found:
http://rdfdata.eionet.europa.eu/inspirethemes/themes/3
I've checked that this entry is definitely present in the thesaurus.
Fwiw, using 3.4.1 we're several in the georchestra community to experience the same issue, and digging in the code i havent been able to figure out where it was coming from.
The /q service populating search results returns json without @label attribute for the inspireThemes section, which seems to be the reason no text is displayed:
inspireThemes […]
0 {…}
@count 2
@name Administrative units
1 {…}
@count 8
@name Adresses
if you set geonetwork.thesaurus logging to DEBUG you have a single more line for earch 'Term not found' ERROR:
2018-09-27 15:46:33,070 DEBUG [geonetwork.thesaurus] - Query : SELECT DISTINCT id,uppc,lowc,eng_prefLabel,eng_note FROM {id} rdf:type {skos:Concept},[{id} gml:BoundedBy {} gml:upperCorner {uppc}],[{id} gml:BoundedBy {} gml:lowerCorner {lowc}],[{id} skos:prefLabel {eng_prefLabel} WHERE lang(eng_prefLabel) LIKE "en" IGNORE CASE],[{id} skos:scopeNote {eng_note} WHERE lang(eng_note) LIKE "en" IGNORE CASE] WHERE id LIKE "http://rdfdata.eionet.europa.eu/inspirethemes/themes/21" USING NAMESPACE skos=<http://www.w3.org/2004/02/skos/core#>,gml=<http://www.opengis.net/gml#>
2018-09-27 15:46:33,072 ERROR [geonetwork.thesaurus] - Term not found: http://rdfdata.eionet.europa.eu/inspirethemes/themes/21
That seems to be some sql/xpath-like queries (syntax coming from https://github.com/geonetwork/core-geonetwork/blob/master/core/src/main/java/org/fao/geonet/kernel/rdf/Selectors.java#L37 ?) in the thesaurus that fails to resolve the keyword id, but we're all using the same inspire-theme.rdf source it seems....
And the strange thing is, if i leave geonetwork.thesaurus on DEBUG and query the thesaurus via the API for the same keyword uri, the same request returns a keyword definition:
/srv/api/0.1/registries/vocabularies/search?lang=en&pLang=eng&thesaurus=external.theme.inspire-theme&uri=http%3A%2F%2Frdfdata.eionet.europa.eu%2Finspirethemes%2Fthemes%2F21
yields the same rdf query in the log:
2018-09-28 09:16:40,099 DEBUG [geonetwork.thesaurus] - Query : SELECT DISTINCT id,uppc,lowc,eng_prefLabel,eng_note FROM {id} rdf:type {skos:Concept},[{id} gml:BoundedBy {} gml:upperCorner {uppc}],[{id} gml:BoundedBy {} gml:lowerCorner {lowc}],[{id} skos:prefLabel {eng_prefLabel} WHERE lang(eng_prefLabel) LIKE "en" IGNORE CASE],[{id} skos:scopeNote {eng_note} WHERE lang(eng_note) LIKE "en" IGNORE CASE] WHERE id LIKE "http://rdfdata.eionet.europa.eu/inspirethemes/themes/21" LIMIT 1000 USING NAMESPACE skos=<http://www.w3.org/2004/02/skos/core#>,gml=<http://www.opengis.net/gml#>
and returns valid info:
[
{
"values": {
"eng": "Production and industrial facilities"
},
"definitions": {
"eng": "Industrial production sites, including installations covered by Council Directive 96/61/EC of 24 September 1996 concerning integrated pollution prevention and control (1) and water abstraction facilities, mining, storage sites."
},
"coordEast": "",
"coordWest": "",
"coordSouth": "",
"coordNorth": "",
"thesaurusKey": "external.theme.inspire-theme",
"uri": "http://rdfdata.eionet.europa.eu/inspirethemes/themes/21",
"definition": "Industrial production sites, including installations covered by Council Directive 96/61/EC of 24 September 1996 concerning integrated pollution prevention and control (1) and water abstraction facilities, mining, storage sites.",
"value": "Production and industrial facilities"
}
]
so maybe something in the codepaths between where the query is done and where the 'term is not found' exception bails out on this content. Mixup between iso codes with eng/en ?
--
Landry Breuil
Administrateur de données du CRAIG
----------------------------------------------------------------------------
Centre Régional Auvergne-Rhône-Alpes de l'Information Géographique
Bât. du CRRI - Campus des Cézeaux
7 avenue Blaise Pascal - CS 60026
63178 Aubière
https://www.craig.fr - @GipCraig
----------------------------------------------------------------------------
Support utilisateurs (tous les jours ouvrés de 8H30 à 12H30) : 04 73 405 405