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

CSW / Configuration of the capabilities is now done using a service metadata record #4390

Merged

Conversation

fxprunayre
Copy link
Member

@fxprunayre fxprunayre commented Jan 23, 2020

Main goal here is to :

  • give possibility to user to configure in more details the GetCapabilities document.
  • make a valid INSPIRE CSW service
  • simplify the config which was dispatched in user properties, settings table, csw capabilities info + 2 templates XML files.

This will encourage users to make a service metadata record describing the CSW endpoint (which is a good practice and is mandatory from an INSPIRE point of view).

Documentation: https://github.com/geonetwork/doc/blob/5b3743117d74856f4a8f7ab2b4f39048603b4a13/source/administrator-guide/configuring-the-catalog/csw-configuration.rst

  • If CSW is disabled, hide related options

image

  • If a custom capabilities has to be created, point to a service metadata record

image

  • If the config use a private record or there is an error while building the capabilities document, a WARNING is reported using a comment and the default capabilities is used

image

  • Add the possibility to customize a portal CSW

image

…etadata record / Add warning in case of error. Language config is made in the record, not from the db.
…etadata record / Add warning in case of error. Multilingual support.
…etadata record / Add warning in case of error. ISO19139 support and language.
…etadata record / Add warning in case of error. Displaye service title.
@fxprunayre fxprunayre marked this pull request as ready for review January 27, 2020 15:52
@fxprunayre
Copy link
Member Author

@jahow we discussed (not sure when & where but not so long ago) the need to display a description of the catalogue in the home page and I think one of the option was to use the cswservercapabilitiesinfo that I'm about to drop in that PR. If we don't use (or plan to use it), I'll remove it. Any objection ?

web/src/main/webapp/xml/csw/capabilities.xml Show resolved Hide resolved
@@ -1,2 +1,6 @@
DELETE FROM cswservercapabilitiesinfo;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be dropped the table and removed the related domain/persistence objects?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for @jahow to see if that table is used somewhere or not.

Copy link
Member

@josegar74 josegar74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works fine.

Let's wait 1-2 days for @jahow feedback about the CswCapabilitiesInfo, otherwise can be merged and manage the removal of CswCapabilitiesInfo in another PR:

@fxprunayre fxprunayre merged commit 62590c3 into geonetwork:master Jan 28, 2020
@jahow
Copy link
Contributor

jahow commented Jan 30, 2020

Sorry for not giving feedback sooner, you were right to get rid of this! we ended up not using it. Thanks

fxprunayre added a commit that referenced this pull request Feb 7, 2020
…etadata record (#4390)

* CSW / Configuration of the capabilities is now done using a service metadata record.

* CSW / Configuration of the capabilities is now done using a service metadata record.

* CSW / Configuration of the capabilities is now done using a service metadata record / Add warning in case of error. Language config is made in the record, not from the db.

* CSW / Configuration of the capabilities is now done using a service metadata record / Add warning in case of error. Multilingual support.

* CSW / Configuration of the capabilities is now done using a service metadata record / Add warning in case of error. ISO19139 support and language.

* CSW / Configuration of the capabilities is now done using a service metadata record / Add warning in case of error. Displaye service title.

* Cleaning.

* CSW / Configuration of the capabilities is now done using a service metadata record / Add warning in case of error. Portal CSW.

* Replace id by uuid.
fxprunayre added a commit to fxprunayre/core-geonetwork that referenced this pull request Jun 12, 2020
Relates to geonetwork#4390 which
makes the CSW GetCapabilities configuration now done in a service
metadata record. The CswCapabilitiesInfo was unused. So removing it.

Replace that table by a translations table which can contains a list of
translations that can be manage through the API. In a number of
situation, catalogue administrator wants to update client application
translation. This will be even more true in version 4 where you can for
example configure facet from the admin. When adding a facet,
corresponding labels will have to be added for the client side to render
properly labels. Those translations can be stored in this table and the
client side will load them. It could also be used to overrides some
default translation if this is something to support.
fxprunayre added a commit to fxprunayre/core-geonetwork that referenced this pull request Jul 3, 2020
Relates to geonetwork#4390 which
makes the CSW GetCapabilities configuration now done in a service
metadata record. The CswCapabilitiesInfo was unused. So removing it.

Replace that table by a translations table which can contains a list of
translations that can be manage through the API. In a number of
situation, catalogue administrator wants to update client application
translation. This will be even more true in version 4 where you can for
example configure facet from the admin. When adding a facet,
corresponding labels will have to be added for the client side to render
properly labels. Those translations can be stored in this table and the
client side will load them. It could also be used to overrides some
default translation if this is something to support.
fxprunayre added a commit that referenced this pull request Jul 3, 2020
* DB / Replacing unused CswCapabilitiesInfo by Translations

Relates to #4390 which
makes the CSW GetCapabilities configuration now done in a service
metadata record. The CswCapabilitiesInfo was unused. So removing it.

Replace that table by a translations table which can contains a list of
translations that can be manage through the API. In a number of
situation, catalogue administrator wants to update client application
translation. This will be even more true in version 4 where you can for
example configure facet from the admin. When adding a facet,
corresponding labels will have to be added for the client side to render
properly labels. Those translations can be stored in this table and the
client side will load them. It could also be used to overrides some
default translation if this is something to support.

* DB / Replacing unused CswCapabilitiesInfo by Translations. Update cleanup script for test.

* DB / Replacing unused CswCapabilitiesInfo by Translations. Test.

* DB / Replacing unused CswCapabilitiesInfo by Translations. OpenApi.
pmauduit pushed a commit to pmauduit/core-geonetwork that referenced this pull request Sep 29, 2020
…etadata record (geonetwork#4390)

* CSW / Configuration of the capabilities is now done using a service metadata record.

* CSW / Configuration of the capabilities is now done using a service metadata record.

* CSW / Configuration of the capabilities is now done using a service metadata record / Add warning in case of error. Language config is made in the record, not from the db.

* CSW / Configuration of the capabilities is now done using a service metadata record / Add warning in case of error. Multilingual support.

* CSW / Configuration of the capabilities is now done using a service metadata record / Add warning in case of error. ISO19139 support and language.

* CSW / Configuration of the capabilities is now done using a service metadata record / Add warning in case of error. Displaye service title.

* Cleaning.

* CSW / Configuration of the capabilities is now done using a service metadata record / Add warning in case of error. Portal CSW.

* Replace id by uuid.
@RobertGlowacki
Copy link

I've created such a file I attached below.
geonetwrok
When I'm in Contribute -> Manage directory -> Entry types I see Organization and Contacts I see this template with data I typed in.
Then I move to Admin console -> CSW -> Record to use for getCapabilities. However I
don't know any UUID number to type here, when I type name of this nothing changes in my request:
http://localhost:8080/geonetwork/srv/eng/csw?request=GetCapabilities&service=CSW&acceptVersions=2.0.2&acceptFormats=application%2Fxml

@fxprunayre
Copy link
Member Author

When I'm in Contribute -> Manage directory -> Entry types I see Organization and Contacts I see this template with data I typed in.

You've to create a service metadata record (https://geonetwork-opensource.org/manuals/trunk/en/administrator-guide/configuring-the-catalog/csw-configuration.html?#service-metadata-record) not a contact.

@RobertGlowacki
Copy link

RobertGlowacki commented Jan 22, 2021

Now I'm able to create metadata standard from Admin console -> Metadata and templates and fill some of fileds of point of contact and get proper response from this request http://localhost:8080/geonetwork/srv/eng/csw?request=GetCapabilities&service=CSW&acceptVersions=2.0.2&acceptFormats=application%2Fxml
Some fields including phone number and address are still empty
Hoverwer I still don't know where I have to put this xml -> https://github.com/geonetwork/core-geonetwork/blob/master/web/src/main/webapp/xml/csw/capabilities.xml

@RobertGlowacki
Copy link

RobertGlowacki commented Jan 25, 2021

Is it possible to make a request from http://localhost:8080/geonetwork/doc/api/index.html and fullfill point of contact fields via cURL?

@fxprunayre
Copy link
Member Author

image

"Choose the record to be used to build custom GetCapabilities document. If none exist, create a service metadata record (using ISO19139 or 19115-3 standards). To have a capabilities document with the main information required, set title, abstract, point of contact, keywords, constraints. If you need INSPIRE support also set properly the record main language and additional languages, INSPIRE themes and INSPIRE conformity."

eg.
https://apps.titellus.net/geonetwork/srv/eng/catalog.search#/metadata/2218e8cf-3203-46a5-8df7-e9effe610f1a
produce
https://apps.titellus.net/geonetwork/srv/eng/csw?SERVICE=CSW&REQUEST=GetCapabilities

You don't have to change anything in the source code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants