– or –
Please login or register to participate.
rcooper Sep 07, 2011 12:30 PM
Hi there,
I noticed that the GEMET client (listed at bottom of http://svn.eionet.europa.eu/[…]/GEMETWebServiceAPI) is no longer functioning. It appears that eionet content has moved and the links in GemetClient.js therefore need updating. I'd be grateful for any suggestions on how to resolve. Thanks, Richard.

Start of GemetClient.js file:
var ThesaurusReader=function(config){this.INSPIRE="http://inspire.jrc.it/[…]/";this.appPath="";if(config.appPath){this.appPath=config.appPath;}
Replies (10)
demarinis Sep 12, 2011 10:04 AM
Hi rcooper,
the developers responsible for GEMET have been informed and i am waiting for their reply.
kind regards
moregale Sep 30, 2011 01:04 PM
The GEMET API used to have a bug in its JSON output. The bug was fixed, but the PHP script in the example is failing for some reason. You could try to contact the maintainers of that client.
rpieciorak Nov 18, 2011 11:20 AM
Nope, the bug is still there but it is limited to method getRelatedConcepts
After trying this call:
you will get following results:
["{\"preferredLabel\": {\"string\": \"model\", \"language\": \"pl\"}, \"definition\": {\"string\": \"1) przedstawienie, zwykle w mniejszej skali, okre\\u015blonego urz\\u0105dzenia, budowli itp.; 2) ilo\\u015bciowe lub matematyczne przedstawienie lub symulacja komputerowa, kt\\u00f3ra ma celu opis w\\u0142a\\u015bciwo\\u015bci lub zale\\u017cno\\u015bci pomi\\u0119dzy zdarzeniami fizycznymi\", \"language\": \"pl\"}, .....
but valid result should looks like that:
[{"preferredLabel": {"string": "model", "language": "pl"}, "definition": {"string": "1) przedstawienie, zwykle w mniejszej skali, okre\u015blonego urz\u0105dzenia, budowli itp.; 2) ilo\u015bciowe lub matematyczne przedstawienie lub symulacja komputerowa, kt\u00f3ra ma celu opis w\u0142a\\015bciwo\u015bci lub zale\u017cno\u015bci pomi\u0119dzy zdarzeniami fizycznymi", "language": "pl"}, .....

simiamih Nov 22, 2011 02:15 PM
Yes, that is correct - there was a faulty double json serialization.
getRelatedConcepts call works now as expected.
rcooper Nov 25, 2011 07:28 AM
Thanks very much for following up. I'm still keen to use the GEMET client, and would be very grateful if you could kindly share the details of the fix I need to resolve the GEMET bug - which file(s) and code would I need to amend? I did try contacting the developer but haven't received a reply as yet. Thanks again, Richard.
rpieciorak Nov 25, 2011 11:45 AM
I'm not an expert in Javascript, but according to docs at https://svn.eionet.europa.eu/[…]/GEMETWebServiceAPI there are now following thesauri uris:
1 http://www.eionet.europa.eu/gemet/concept/ Concepts
2 http://www.eionet.europa.eu/gemet/supergroup/ Super groups
3 http://www.eionet.europa.eu/gemet/group/ Groups
4 http://www.eionet.europa.eu/gemet/theme/ Themes
5 http://inspire-registry.jrc.ec.europa.eu/[…]/ Inspire themes

Looking at the code of thesaur.js of the GemetClient I've found the following line:
    /* Initial config values */
    this.INSPIRE = "http://inspire.jrc.it/theme/";
    this.CONCEPT = "http://www.eionet.europa.eu/gemet/concept/";
    this.GROUP = "http://www.eionet.europa.eu/gemet/group/";
    this.SUPERGROUP = "http://www.eionet.europa.eu/gemet/supergroup/";
    this.THEME = "http://www.eionet.europa.eu/gemet/theme/";

The only one uri that doesn't match is INSPIRE themes thesauri, so I suppose that changing:
this.INSPIRE = "http://inspire.jrc.it/theme/";
this.INSPIRE = "http://inspire-registry.jrc.ec.europa.eu/[…]/";
will be enough to fix your problems.

This is a bug at GemetClient and you should consider sending ticket to GemetClient developers.

You may also try my own implementation in metadata editor Medard at http://http://medard-opensource.eu/en.
rcooper May 16, 2012 02:27 PM
Hi, I was trying out the modified GEMET client, and was getting a "Data error" response on clicking the green arrow icon.

I checked out GEMET client from as
svn co https://svn.eionet.europa.eu/[…]/
It is revision 27940.

I tested using the index.html page in the /src directory. Are there any additional configuration issues I may need to consider?

simiamih May 16, 2012 03:14 PM
Hi Richard,

Yes, I thought I documented this in the Readme last time we refactored the client, but it seems I missed it - there is a php script used for the Ajax calls - because you can not make cross-domain requests from client side; you need to have it configured and set the working path to it in the index.html from /src, line 48.

Anyway, we just implemented some months ago the Jsonp support in the Gemet Web Service, so there is no need for this serverside script. We shall update the GemetClient to use json with padding requests (ext-js provides Ext.data.ScriptTagProxy for this purpose) and get rid of the PHP requirement.
simiamih Jul 12, 2012 10:24 AM
Sorry for the big delay. You can now checkout the latest version which works out of the box, without server side requirements - please let me know how it goes.
PS: It might not work if it isn't used on a domain, it makes HTTP requests which need to be signed with an originating domain.
rcooper Dec 15, 2012 09:36 AM

Thanks for your help.

To confirm, I now have the GEMET application working online.

I've now integrated into the EPDI main website (enviroprojects.org) and EPDI Website Template (enviroprojects.org/epditemplate). Also posted as a blog entry at http://enviroprojects.org/b[…]supported-by-epdi-websites.