ec-jrc / re3gistry

Re3gistry is a reusable open source solution for managing and sharing ‘reference codes’, ensuring semantic interoperability across organisations.
European Union Public License 1.2
29 stars 23 forks source link

Re3gistry with geonetwork #51

Closed geoase closed 2 years ago

geoase commented 3 years ago

Background and Motivation

With version 1.3 of the registry, it was rather easy to import registers/codelists into geoserver in order to reference them. Tested with: https://vanilla.geocat.net/geonetwork/srv/ger/admin.console#/classific The import does not work with re3gistry 2 but it works with 1.3

Proposed change

Please add geoserver support for re3gistry 2.X again.

Funding

No Funding

Additional information

I think the impact is big. We are not able to use the codelists in a pragmatic way from geonetwork instances

If you need assistance or more information I'd be glad to help you

emanuelaepure10 commented 3 years ago

Dear @geoase,

Which is the format of the items that you are trying to import? Did you get any error in the import process? Or did you already seen the difference that should be implemented?

Thank you in advanced

geoase commented 3 years ago

I am using the re3gistry thesaurus importer with the geoserver admin console: https://vanilla.geocat.net/geonetwork/srv/eng/admin.console#/classification User: admin Password: admin

As far as I can see, the thesaurus import tool uses: https://registry.inspire.gv.at/registry.en.json from registry 1.3

Screenshot from 2021-06-05 16-15-38

emanuelaepure10 commented 3 years ago

Dear @geoase

As far as I know they are using the .rdf format. Do you mind to try to import the item_name.rdf file that you have available and let us know if you still have problems.

Thank you

emanuelaepure10 commented 3 years ago

Dear @geoase ,

Any news on this issue?

Thank you Emanuela

geoase commented 3 years ago

Hi Emanuela, sorry for the inactivity. I tried to import a single item rdf from: https://inspire.geoase.eu/registry/rest?uri=https%3A%2F%2Finspire.geoase.eu%2Fdataprovider%2F0111&lang=en&format=rdf

Unfortunately it imports as its own thesaurus without records 20210728_geonetwork_doku1

It would be nice if our users could just use the inspire registry importer from geonetwork where one can choose codelists and registers from the whole registry

geoase commented 3 years ago

Is there a convenient alternative for the user in the webui to download the rdf file?

But, the special registry import method in geoserver for the inspire registry does not work.

emanuelaepure10 commented 3 years ago

Hi @geoase Please update to our latest code. You should find a line on each page with a link to all the available formats. That would be the way to get directly the .rdf.

So now for you to add a new thesaurus works adding it from local file, URL but not from registry? Please remember as well to configure the APACHE to handle the content negotiation.

Thank you

geoase commented 3 years ago

Hi, I already updated to the latest master branch, but I do not find the link to download different formats.

It works if I download the rdf file and import it from the file. It does not work directly from the URL.

It works for the codelist: https://inspire.geoase.eu/registry/rest?uri=https%3A%2F%2Finspire.geoase.eu%2Fcodelist%2FOgdCategoryAustria&lang=en&format=rdf

But not for the dataprovider register: https://inspire.geoase.eu/registry/rest?uri=https%3A%2F%2Finspire.geoase.eu%2Fdataprovider&lang=en&format=rdf

I get the following error from the re3gistry2 application ERROR ItemsServlet Unexpected exception occured java.lang.IndexOutOfBoundsException: Index: 0 at java.util.Collections$EmptyList.get(Collections.java:4454) at eu.europa.ec.re3gistry2.restapi.format.RDFFormatter.writeRoles(RDFFormatter.java:406) at eu.europa.ec.re3gistry2.restapi.format.RDFFormatter.writeRegister(RDFFormatter.java:211) at eu.europa.ec.re3gistry2.restapi.format.RDFFormatter.write(RDFFormatter.java:124) at eu.europa.ec.re3gistry2.restapi.util.ResponseUtil.ok(ResponseUtil.java:48) at eu.europa.ec.re3gistry2.restapi.ItemsServlet.doGet(ItemsServlet.java:191) at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)

emanuelaepure10 commented 3 years ago

Dear @geoase The line pointing to the formats has been commited.

I see that your register https://inspire.geoase.eu/dataprovider as well as https://inspire.geoase.eu/codelist

dont have any of this image and here is the problem that want to write the roles of these actors but they are not present in the system. But, it can be corrected.

Why you dont have any submitting organization, control body or register/registry manager associated to the 2 registers?

Thank you

geoase commented 3 years ago

Hi, thank you for the commit and your efforts. I activated the apache mod_negotiation module in order to get content negotiation working? I basically use your example configuration (https://github.com/ec-jrc/re3gistry/blob/master/dist/webapp/apache-example-configuration.conf) with some minor adaptions.

Regarding the missing Owner, Register Manager, Control Body, Submitter At the moment I do only have one user and used the pre-existing groups for Register Manager and everything else: 20210728_geonetwork_doku4

For the code list register it looks like this: 20210728_geonetwork_doku3

Thank you alread. Have a nice weekend G

emanuelaepure10 commented 2 years ago

Hi @geoase

Please use out latest commit on the JSONFormater https://github.com/ec-jrc/re3gistry/commit/35757b6d391060be3100509c45bfc99cbdf86384 to get the code which should create the thesaurus from the Registry URL without problems.

Thank you for reporting the issue

emanuelaepure10 commented 2 years ago

Dear @geoase

Please check https://github.com/ec-jrc/re3gistry/releases/tag/v2.3.0

Thank you