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

[pull] main from geonetwork:main #105

Open
wants to merge 113 commits into
base: main
Choose a base branch
from
Open

[pull] main from geonetwork:main #105

wants to merge 113 commits into from

Conversation

pull[bot]
Copy link

@pull pull bot commented Oct 8, 2024

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

josegar74 and others added 4 commits October 8, 2024 07:48
* Metadata editor / validation report improvements:
- Update buttons to display success and errors to use text instead of an icon.
- Add style to display the display buttons greyed when the related rules are not displayed.
- Show separate messages for success and errors.
- If not success or errors reported don't show the expander to show the results in the validation rules.
- Group the success and error messages.

* Metadata editor / validation report improvements:

- Fix the display of the expander.
- Improve the a bit the layout of the error / success messages.
- Improve the tooltips for the buttons to hide / show the messages.
* Fix the width of the projection switcher

The map projection switcher on the map is too small. This change fixes it.

The change can be seen by adding a second projection for the map in the admin

* Update web-ui/src/main/resources/catalog/views/default/less/gn_map_default.less

Co-authored-by: Jose García <[email protected]>

---------

Co-authored-by: Jose García <[email protected]>
…tor directive and fix its display for the field duration directive
* Fixed spurious whitespace for gn-comma-list

* fixed issue when translate occurs on label
@pull pull bot added the ⤵️ pull label Oct 8, 2024
josegar74 and others added 25 commits October 9, 2024 13:03
While harvesting, `extract-date-modified.xsl` is used to retrieve last update of the record. If empty, harvester will fail with:

```
[geonetwork.harvester] - Invalid ISO date: 
java.lang.IllegalArgumentException: Invalid ISO date: 
	at org.fao.geonet.domain.ISODate.parseDate(ISODate.java:426) ~[gn-domain-4.4.5-SNAPSHOT.jar:?]
	at org.fao.geonet.domain.ISODate.setDateAndTime(ISODate.java:239) ~[gn-domain-4.4.5-SNAPSHOT.jar:?]
	at org.fao.geonet.domain.ISODate.<init>(ISODate.java:117) ~[gn-domain-4.4.5-SNAPSHOT.jar:?]
	at org.fao.geonet.kernel.harvest.harvester.simpleurl.Aligner.addMetadata(Aligner.java:237) ~[gn-harvesters-4.4.5-SNAPSHOT.jar:?]
	at org.fao.geonet.kernel.harvest.harvester.simpleurl.Aligner.lambda$insertOrUpdate$0(Aligner.java:126) ~[gn-harvesters-4.4.5-SNAPSHOT.jar:?]
```


Fallback to now.
   Add {objectId} property in external management url (base64 unique identifier for the record)
   Change external management type url property {type} so that it is fixed values so that same value can be used in {objectId}
CMIS
   Fixed property names used for validation fields to be consistent with other names.
Jcloud
   Updgade from jcloud 2.3.0 to jcloud 2.5.0
   Add support for external management named properties similar to cmis
   Fix bug with deleting all resources as it was failing to identify folders correctly for azure blob.
Sources or feature catalogue reference may be described using description or uuidref.

Do not consider text description while searching for associated records. eg.

```xml
   <mdb:resourceLineage >
      <mrl:LI_Lineage>
         <mrl:source>
            <mrl:LI_Source>
               <mrl:description xsi:type="lan:PT_FreeText_PropertyType">
                  <gco:CharacterString>Le référentiel utilisé comme trait de côte est celui de Ifremer-Shom au 1/25 000 (date de révision 1995).</gco:CharacterString>
```

This is not really visible but avoid to do search with an empty id in `MetadataUtils#getAssociated`
GeoNetwork local thesaurus may be exposed in third party apps.
In GeoNetwork, a thesaurus file contains one `conceptScheme` with a set
of `concept`. When combining multiple files into an RDF graph the link
between concept and scheme may be required.

This changes add the `skos:inScheme` property to each concepts (https://www.w3.org/TR/skos-reference/skos.html#inScheme).

```xml
<rdf:Description rdf:about="https://vocab.ifremer.fr/scheme/SXT/type_jeux_donnee/b64f008f-5e3f-43b6-a3bd-8ae291056305">
     <rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
     <ns2:prefLabel xml:lang="en">/Administrative data</ns2:prefLabel>
     <ns2:prefLabel xml:lang="fr">/Données administratives</ns2:prefLabel>
     <ns2:inScheme rdf:resource="https://vocab.ifremer.fr/scheme/SXT/type_jeux_donnee">
</rdf:Description>
```

It does not change existing thesaurus.

Funded by Ifremer
* Editor / Table mode / Fix field using directive

eg. when using thesaurus for a field in a table, the field was not displayed.

```xml
<tableFields>
    <table fieldset="false" for="mac:MI_Instrument">
      <header>
        <col label="mac:MI_Instrument"/>
        <col label="mac:MI_Platform"/>
        <col/>
      </header>
      <row>
        <col xpath="mac:identifier/*/mcc:code"
             use="data-gn-keyword-picker">
          <directiveAttributes data-thesaurus-key="local.theme.cersat_sensor"/>
        </col>
        <col xpath="mac:mountedOn/*/mac:identifier/*/mcc:code"
             use="data-gn-keyword-picker">
          <directiveAttributes data-thesaurus-key="local.theme.cersat_platform"/>
        </col>
        <col del=".."/>
      </row>
    </table>
```

Follow up of #8016

* Editor / Table mode / Fix field using directive / Review comment.
* Map / Save your map improvements

* Save your map create ISO19115-3 records (and can create ISO19139)
* Distribution panel / Add a map section
* Fix icon for map resource type in facet and record view
* Indexing / Set only one resource type for records categorized as a map (map was also categorized as dataset).

A map is an ISO record with
* presentation form = mapDigital
* format:PDF = static map
* format:OWS-C = interactive map

Index change:
* resourceType `map/interactive` is now `map-interactive`
* resourceType `map/static` is now `map-static`

* Map / Save your map / Generate map overview by default

* Map / Save your map improvements / Translations.
* Thesaurus / OWL format / Mobility theme hierarchy

Follow up of #7674


Mobility DCAT theme vocabulary top concepts is available at
https://mobilitydcat-ap.github.io/controlled-vocabularies/mobility-theme/latest/index.html#/

The vocabulary contains 2 top concepts:

```xml
<skos:hasTopConcept rdf:resource="https://w3id.org/mobilitydcat-ap/mobility-theme/data-content-category"/>
<skos:hasTopConcept rdf:resource="https://w3id.org/mobilitydcat-ap/mobility-theme/data-content-sub-category"/>
```
which are not really needed for browsing the main categories and sub categories.

Use the narrower terms of the "content category" top concept as the top concepts of the scheme
to facilitate keyword selection in editor and generate proper facet hierarchy in search.

* Fix test

The 2 default top concepts of the vocabulary are replaced by correct one.
…tions so that "iso19115-3.2018, dublin-core" will also work. (#8408)

Also updated the admin documentation so that it is clear that it expect to get a comma separated list.
* Formatter / Datacite / Default resource type

If scope code has no mapping defined, default to Other which is XSD valid for Datacite.
Add application value mapping.

* DOI / Fix for french translation.
* fixed typo

* moved identifier as an adjective to template

* replaced correct location of identifier template
While adding a remote document URL, the app tries to extract title from the remote document (which can be XML or HTML page).

eg. https://metawal.wallonie.be/geonetwork/srv/api/records/19381245-dc52-438c-b1cd-cdf5d646b69e?language=all
or https://doi.org/10.1016/j.onehlt.2024.100873

The 2nd link has redirect and return an error if content type does not contains text/html and the link considered invalid can't be attached to the current metadata.
* WebDav harvester / Add support for XSLT filter process

* Documentation / update documentation for harvesters and add Geonetwork 2.1-3.X harvester page

* WebDav harvester / Use current date for metadata change date if can't be retrieved from the remote metadata

* Documentation / remove Z39.50 harvester documentation.

The harvester is no longer available in GeoNetwork 4.x

* Documentation / Unify harvesters configuration

* Update web-ui/src/main/resources/catalog/templates/admin/harvest/type/webdav.html

Co-authored-by: François Prunayre <[email protected]>

* Update harvesters/src/main/java/org/fao/geonet/kernel/harvest/harvester/webdav/Harvester.java

Co-authored-by: François Prunayre <[email protected]>

* HarvesterUtil / Use conversions from schema (#106)

Cf #6772

---------

Co-authored-by: François Prunayre <[email protected]>
* Editor / Geopublication / Misc fix.

* Admin configuration / Show reset password only once the mapserver is
  created. Removed unused code
* API / Fix ZIP file publication and coverage removal (probably related to GeoServer API
  changes - tested with version 2.25.1)
* Editor / Fix zoom to layer due to mapservice change, do not show
  styler if not configured

* Editor / Geopublication / Avoid NPE if style can't be created on GS side.
* Ignore "null" value
* Add support for "metas/dcat"
* Fix path for language when using v2 API
* Add spatial and temporal extent when available
* Add extra keywords based one "metas/dcat/temporal" and "metas/default/territory"
* Add resource identifier
* Add record count and geometry type
* Add lineage and credit
* Add references
* Cleanup namespaces

Follow up of #7201
Related to #8359
- Update details on how additional/custom projections are to be defined (proj4 vs. proj4js syntax)
- Improve indentation of some figures for better readability of these list items
- Generalise social media bar, not naming any explicit platforms because their names tend to change periodically ^^
- Fix minor capitalisation issues
Some libraries/apps are using `_msearch` endpoint which can allow both `application/json` or `application/x-ndjson` content type.


When ndjson is used, the API call is not forwarded to Elasticsearch
```
ERROR [geonetwork] - Content type 'application/x-ndjson' not supported
```

Cf. https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html

eg.
```
curl -L 'https://apps.titellus.net/geonetwork/mapstore/api/search/records/_msearch?' \
  -H 'accept: application/json' \
  -H 'content-type: application/x-ndjson' \
  --data-raw $'{"preference":"cardQuickFilter_2"}\n{"query":{"bool":{"must":[{"bool":{"must":[{"query_string":{"query":"+(resourceType:application) -(th_infraSIG.default:Reporting_INSPIRE) -(cl_status.key:obsolete)"}}]}}]}},"size":0,"_source":{"includes":["*"],"excludes":[]},"aggs":{"th_Themes_geoportail_wallon_hierarchy.default":{"terms":{"field":"th_Themes_geoportail_wallon_hierarchy.default","size":100,"order":{"_count":"desc"}}}}}\n'
  
```
* Elasticsearch / Update to 8.14.3.

* Update installing-index.md
Cleanup records to remove, only once all URL are processed. No need for the Element to be preserved, alignement only require the list of UUIds.
Similar records are suggested using a more like this query.
Catalogue administrator may want to customize what is proposed.
eg. exclude obsolete records.

Funded by EEA
fxprunayre and others added 30 commits December 11, 2024 12:50
…ages (#8268)

* Editor / Add keywords even if thesaurus not available in record languages

Add english as default language for thesaurus searches in order to populate metadata with english label if the thesaurus is not available in the current record language. Can happen with some DCAT-AP related vocabularies that have to be used in Member States records not often in english.

This will also avoid the message box when keywords are not found due to language mismatch. The message will still be displayed if a keyword in the metadata is not found in the thesaurus, proposing the user to only keep keywords from the thesaurus.

Funded by Service Public de Wallonie

* Update KeywordsApi.java

* Code quality improvements in KeywordsApi

---------

Co-authored-by: Jose García <[email protected]>
* Formatter / DCAT / Service

Fix service mapping for DCAT due to the change in namespace for SRV (#7806) which happened in between PRs.

* Update dcat-core-dataservice.xsl
* This commit adds a different style for the `default` address block in the metadata page:
- labels are added
- it now has a bordered address card
- the title is in a header
- an address card icon is added to the heading

Furthermore, it changes the style for the `icon` layout a bit:
- the circled letter is smaller in size
- texts are now all right of the circle
- italic is changed to bold

* Add print styles to enable the printing of the address popover

* Fix for the print styles, the popup style now not only works in the emulated styles but also in the print preview and print.

This commit also contains a fix for the SVG 'named circle' that was displayed too big

* Fix failing unit tests.

Refactor variables used in the view and global styles.

---------

Co-authored-by: Jose García <[email protected]>
* JWT Headers security module

* changes from jose's review

* make sure that token validation is being done

* allow two jwt-header auth filters at the same time + configuration

* fix config problem, remove some unnecessary code

* added support for easily turning on/off UpdateProfile and UpdateGroup + changed typo

* update jwt shared library (gn+gs) dependency to 2.27 to include GS PR#8102

---------

Co-authored-by: david.blasby <[email protected]>
Add the CLA badge to the page
Updated location of badges to be on one line at the top of the document.
* Update SEMIC conversion with the latest version
* Improve documentation (and add details about the differences between the 2 conversions)
* CatalogRecord and Resource URI improvement
  * use first resource identifier for the resource if defined
  * use DOI if declared as metadata linkage or resource identifier
  * avoid having same URI used by 2 different objects in the graph (reported by Belgium HVD portal)
* Add mapping for online resource not in distribution section (eg. portrayal)
In GeoDCAT-AP, HVD keyword must be encoded using HVD category extension.
…tegory. The vocabulary is used to create skos:Concept with proper URI in case ISO keyword is encoded using gco:CharacterString only.
…ter/dcat/dcat-variables.xsl

Co-authored-by: Jose García <[email protected]>
ISO metadata can be retrieved in DCAT and specific rules apply to High Value Dataset context.
See https://semiceu.github.io/DCAT-AP/releases/2.2.0-hvd/

This schematron test ISO19139 or ISO19115-3 records and check mandatory elements for datasets and services.

The mapping rule defined in the ISO to DCAT mapping are used (and some rules may require adaptation depending on user rules eg. no common practice to encode service documentation which is mandatory for HVD).

Relates to #8547
* support section variable in manual url

* isoLang variable, help wording

* Revert "isoLang variable, help wording"

This reverts commit 0b000ce

* ignore path "/" for default language replacement

* Update web-ui/src/main/resources/catalog/locales/en-admin.json

Co-authored-by: Jose García <[email protected]>

* remove double slash

* remove double slash in error handler

---------

Co-authored-by: Jose García <[email protected]>
Preview on intellij or github is not the same as mkdoc pages.

List requires blank line above.
* Formatters / Properly detect URL ending in 1,2,3 or 5 

Fixes #8226

* Update utility-tpl.xsl
A feature catalogue can contain one or more feature types description.
When describing a model with lots of feature types, then the editor can be quite large (and then can cause issue related to timeout or number of fields)

The problem is quite similar to #7998 (ie. timeout, number of form fields).

To better manage this case, make a list of existing feature types and user can click on it to edit only one feature type at a time.

This is enable by default for ISO19110 and ISO19115-3 feature catalogue
in all views. The first table is selected by default.

A selector can be manually configured using the following:

```xml
          <section name="gfc:featureType">
            <select name="Select a feature type"
                    xpath="/gfc:FC_FeatureCatalogue/gfc:featureType"
                    parameter="featureType"
                    value="*/gfc:typeName/gco:LocalName/text()"
                    layout="dropdown"/>
                    <!--tabs|pills|dropdown-->

            <section xpath="/gfc:FC_FeatureCatalogue/gfc:featureType[
                                    */gfc:typeName/gco:LocalName = $p2/featureType
                                    or (not($p2/featureType) and position() = 1)
                                    or ($p3 = 'md.format.html')]"
                     or="featureType"
                     in="/gfc:FC_FeatureCatalogue"/>
          </section>
```

`$p2` correspond to the variable `request` and `$p3` to the `service` in the XSL template (see `base-variables.xsl` and `evaluate.xsl`).
So if there is no `featureType` parameter, the first feature type will be displayed.
If the view mode is `md.format.html`, all feature types will be displayed.

It has only been tested for feature catalogue but can be probably reuse
in other places eg. conformity

* Dropdown (default)

* Tabs

* Pills

* Avoid JS error on large forms by using JQuery `empty()` instead of
find and remove:

```
RangeError: Maximum call stack size exceeded
    at Sizzle.select (jquery-2.2.4.js?v=dc93b22fa65aadfbbe3d7ad69b4d5d83601574de:2592:12)
    at Function.Sizzle [as find] (jquery-2.2.4.js?v=dc93b22fa65aadfbbe3d7ad69b4d5d83601574de:869:9)
    at jQuery.fn.init.find (jquery-2.2.4.js?v=dc93b22fa65aadfbbe3d7ad69b4d5d83601574de:2792:11)
    at refreshForm (EditorService.js:324:42)
```

* ISO19110 to ISO19115-3 conversion / Convert cardinality to
  CharacterString
* Editor / Add unit as main field

Couple of ISO elements have a `uom` attribute to define unit of measure,
length, distance or angle.

Attributes are usually displayed only if enabled (using the "more
details" menu).

Add a specific mechanism to be able to display an
attribute next to the main field it relates to. Also add in the field
label the type of field because resolution can be of various types
(measure, length, ...).

Funded by Ifremer

* Editor / Add unit attribute completion from thesaurus.

* Editor / Add unit attribute completion from thesaurus / ISO19139 alignement and thesaurus.

---------

Co-authored-by: Jose García <[email protected]>
When scale factor is big, image generated always follows geom
proportions. It may not be relevant as the geom is small on the image
and a square image may be preferred.
* Facet / Add meta property to customize label.

Add also documentation on how to configure labels when the key used for
the facet is not known.

* Facet / Add meta property to customize label.

* Facet / Add meta property to customize label. Apply translation key filter in getFacetLabel

---------

Co-authored-by: Jose García <[email protected]>
Security configuration for GeoNetwork 4 deployed behing GeoNetwork 5
prototype using simple mode (ie. GN4 MUST not be exposed to intranet and
internet).

Authentication is managed by version 5 which check user credentials and
create user in the database if needed. Then a JWT token is added to a
header that version 4 checks.

Related to:
* JWT headers support #7899
* GeoNetwork 5 auth geonetwork/geonetwork#77

To enable the configuration, use:

```sh
mvn jetty:run -Dgeonetwork.security.type=gn5
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⤵️ pull merge-conflict Resolve conflicts manually
Projects
None yet
Development

Successfully merging this pull request may close these issues.