Skip to content

main#4

Open
bradbrowne wants to merge 3822 commits into
mapdojo:masterfrom
geonetwork:main
Open

main#4
bradbrowne wants to merge 3822 commits into
mapdojo:masterfrom
geonetwork:main

Conversation

@bradbrowne

Copy link
Copy Markdown

No description provided.

tylerjmchugh and others added 30 commits July 17, 2025 09:51
This PR updates the `.gn-img-modal` class in `gn.less` by replacing `width: 95vw` with `width: fit-content` and `max-width: 95vw`. This ensures the modal dynamically adjusts to the image size, addressing layout inconsistencies.
* stac init

* stac from openData

* stac works a little / Not STACAI

* license and links seems OK

* contact temporal and spacial extents

* harvest assets thumbnails but doesn't work ( cross origin problem ? )

* clean XSL - step 1

* second clean

* clean step 3

* import collections as series

* thumbnails OK

* contact done with duplication in metadata contact ( need to be reviewed)

* contact et provider feedbacks

* rework links

* Clean xsl and rename

* Clean xsl

* Clean xsl

* mutualisation contacts

* assets and simplification

* contact et provider externalised

* clean

* code review feedback

* code review feedback 2

* code review feedback end
* Add range header support for attachment downloads

Co-authored-by: Juan Luis Rodríguez Ponce <juanluisrp@gmail.com>
A harvester to retrieve metadata from a SFTP server.

Configuration is described in docs/manual/docs/user-guide/harvesting/harvesting-sftp.md


---------

Co-authored-by: Sander Schaminee <sander.schaminee@geocat.net>
Co-authored-by: Juan Luis Rodríguez Ponce <juanluisrp@gmail.com>
* Improve layout
* Better handle default value (which may be at index = 0)
* Add debounce to slider change to reduce number of requests.

Can be tested with:
https://tds0.ifremer.fr/thredds/wms/LPO_GLOBANA_ISAS13_MNTH_TIME_SERIE?service=WMS&request=GetCapabilities
https://sextant.ifremer.fr/services/wms/sismer?service=WMS&request=GetCapabilities

Funded by Ifremer
To facilitate linking to other records on large catalogue, this improve
the search and selection.

* Search / Add sort by menu
* Search / Add number of results
* Selection / Highlight record already selected
See #8699 (comment)


Task status is blocked when workflow disabled eg. when requesting creation of a DOI.

The following call:

```
curl 'http://localhost:8080/geonetwork/srv/api/records/1693/status' \
  -X 'PUT' \
  --data-raw '{"status":100,"owner":null,"dueDate":null,"changeMessage":""}'
```

is failing with 

```
{
    "message": "Le workflow de groupe 'ABC' est désactivé",
    "code": "feature_disabled",
    "description": "Impossible de définir l'état des fiches dans le groupe 'ABC'"
}

```

but a task does not require to have the workflow mode enabled.
* feat: edit sub portal documentation to add examples for filtering

* fix: take in account @josegar74 review

* fix: update with html and not markdown inside collapsible block
* Update mokito to version 4
Also removed powermock and use mokito-inline instead.

* Create new LocalInvokerMokitoMockFactory, EsSearchManagerMokitoMockFactory and PdfOrHtmlResponseWriterMokitoSpyFactory for mock beans to fix unit test issues.

* Removed double ;; and add missing headers.
* Update schematron exceptions to support internationalization
Also updated the message text to be more user friendly

* Add schematron test
* Fix attachment download for jcloud

* Change from ByteArrayResource to PathResource to reduce memory usage

* Update services/src/main/java/org/fao/geonet/api/records/attachments/AttachmentsApi.java

Co-authored-by: Ian <ianwallen@hotmail.com>

---------

Co-authored-by: Ian <ianwallen@hotmail.com>
* try fixing GNUI version  to tag directly

* Version given in datahub

* submodule

* clean work

* submodule correction

* suppression if

* correction PR

* correction PR pom.xml
* Ensure the service context is not 'corrupted', to avoid loss of ui-language while processing subtemplates

* On subtemplate's update, trigger indexation for every md referencing it

rely on metadataIndexer.batchIndexInThreadPool for async indexing
test threadPoolIndexation starts for expected md
throw exception when updating a subtemplate too resource hungry (too many md to index, i.e. more than 10000)
wait for subtemplate transaction completion before mds indexation

* Perform validation on MD with substituted subtemplates (xsd and schematron)

* Re-enable test (stop hiding failures inside try catch)
Follow up of #8118

When available, the keyword picker should use keyword ids to limit impact of a renamed concept in thesaurus.
Currently, on init, the keyword picker check if the concept label exist in the thesaurus. If not, a warning indicate that the current record reference a concept which does not exist in the target thesaurus. Usually, thesaurus do not change much, but it can happen. Using the keyword id when available make the keyword picker more robust and will update the label if changed.

Example of a renamed concept in a vocabulary
https://vocab.nerc.ac.uk/collection/P36/current/MRNLTTR/
https://vocab.nerc.ac.uk/collection/P36/current/MRNLTTR/1/

At some point, we may even support concept versioning. It does not always make sense to update the label, but rather point to the deprecated concept.

Funded by Ifremer
…on section. (#8958)

* Add service associated resource. Fix add link from service distribution section.

The online resource added to the dataset contained the text 'undefined' instead of the service online resource name

* Editor / Add service / When selecting layers, button was inactive

The link added to the dataset should contains the list of layers selected. Exception was swallowed 

```
TypeError: Cannot read properties of undefined (reading 'addLayerNamesMode')
    at setLayersParams (OnlineSrcService.js:141:35)
    at setParams (OnlineSrcService.js:112:16)
    at Object.linkToService (OnlineSrcService.js:551:25)
    at scope.linkTo (OnlineSrcDirective.js:2083:40)
    at fn (eval at compile (angular.js?v=293b1dbf3aae48af97080e26810e1eee152c7821:16548:15), <anonymous>:4:256)
    at callback (UtilityDirective.js:1831:24)
    at HTMLButtonElement.<anonymous> (UtilityDirective.js:1838:17)
    at HTMLButtonElement.dispatch (jquery-3.7.1.js?v=293b1dbf3aae48af97080e26810e1eee152c7821:5149:35)
    at elemData.handle (jquery-3.7.1.js?v=293b1dbf3aae48af97080e26810e1eee152c7821:4953:35)
```

Related to 3072280

* Update check to add service metadata layers as online resource

---------

Co-authored-by: François Prunayre <fx.prunayre@gmail.com>
* Add index status facet

* Add translations for index status facet

* Add keep_nonzero to admin availableInServices facet
Daniel-Mietchen and others added 30 commits May 27, 2026 09:09
…groups (#9297)

When harvesting a GeoNetwork 4 instance running a newer version, the
/api/sources and /api/groups responses may contain fields unknown to the
local Source/Group domain classes (e.g. datahubEnabled). Configure the
ObjectMapper with FAIL_ON_UNKNOWN_PROPERTIES=false so those fields are
silently ignored instead of aborting the harvest.

Add regression tests that stub doExecute() to return JSON with unknown
fields and verify the client deserializes successfully.
* Update EPSG database used for CRS list
* Library updates:

- Update Tika to version 3.2.2

* Library updates:

    - Update commons-fileupload to version 1.6.0

* Library updates:

        - Update fop to version 2.11

* Library updates:

            - Update log4j2 to version 2.24.3
This change includes a more robust filter processing and other code quality improvements in the Elasticseach proxy.


Co-authored-by: François Prunayre <fx.prunayre@gmail.com>
Apply duplicate process (used to remove some elements like dates, DOI from source record) first and then apply update fixed info (which takes care of settings dates from database values).

Apply the process if source record is a metadata or a template.
Co-authored-by: Juan Luis Rodríguez Ponce <juanluisrp@gmail.com>
* docs: fix grammar and markup in managing-users-and-groups docs

Fix typos, grammar issues and inconsistent admonition casing across
index.md, creating-group.md, creating-user.md, user-reset-password.md
and user-self-registration.md.

* docs: review and fix maintainer-guide documentation

* docs: review and fix contributing documentation

* docs: review and fix help documentation

* docs: review and fix devel documentation

* docs: review and fix annexes documentation

* docs: review and fix api documentation

* docs: review and fix install-guide documentation

* docs: review and fix customizing-application documentation

* docs: review and fix administrator-guide documentation

* docs: review and fix tutorials documentation

* docs: review and fix user-guide documentation

* docs: review and fix overview documentation

* docs: fix broken external links identified during link validation

* Restore escaped dot

* Fix typo
… a metadata schema. (#6941)

* CSW GetRecords fails when requesting an outputSchema not supported by a metadata schema. Fixes #6940

* Setting to configure the behaviour

* Update documentation
…response (#9320)

* GeoNetwork4 harvester / fix NPE when dateStamp is absent from search response

Some remote GeoNetwork 4 catalogs contain records whose gmd:dateStamp holds
an invalid date (e.g. "--"). The iso19139 indexer skips those values, so
dateStamp is omitted from the Elasticsearch _source. The harvester's
SearchResponseDeserializer was calling get("dateStamp").asText() which
throws NullPointerException when the field is missing.

Use Jackson's path() instead of get() for _source sub-fields so that
absent fields return a MissingNode rather than null. For dateStamp
specifically, use asText(null) so that RecordInfo receives null, triggers
its dateWasNull fallback, and always harvests the record -- the correct
behaviour when the modification date is unknown.

Adds unit tests covering the normal case, missing dateStamp, mixed records,
and empty result sets.

* GeoNetwork4 harvester / skip bad records and log the search request body

A single malformed record in a remote catalog could abort the whole
harvest. The search response deserializer parsed every hit eagerly, so
one hit missing its _id (or otherwise unparseable) threw and aborted the
entire page. That put the harvest in an error state and skipped the
alignment of every other record.

Parse each hit defensively instead: read _id with path().asText(null),
treat a blank uuid or any per-hit error as a failed hit, collect the
failed ids and continue with the remaining hits. The harvester reports
the skipped records in its log and history (as a HarvestError) and
counts them under badFormat so the result totals reconcile. The
pagination cursor still advances unconditionally so the loop always
terminates, and a skipped record no longer puts the harvest in an error
state, so alignment runs as usual.

Also log the Elasticsearch search request URL and body at DEBUG level,
mirroring the CSW harvester, to ease troubleshooting.

Add a deserializer test covering a response that mixes a valid hit with
an unparseable one.

* GeoNetwork4 harvester / skip bad records and log the search request body. Update logging to use String.format

* GeoNetwork4 harvester / use parameterized log messages

Fix empty warning(String, Object...) implementation in Log and add the
missing static overload. Update log calls in the GeoNetwork4 harvester
to use {} placeholders instead of string concatenation or String.format.

---------

Co-authored-by: josegar74 <josegar74@gmail.com>
Related to #8994

Co-authored-by: François Prunayre <fx.prunayre@gmail.com>
* Align frontend and backend publication checks

* Apply suggested change

Co-authored-by: Jose García <josegar74@gmail.com>

* Fix tests

---------

Co-authored-by: Jose García <josegar74@gmail.com>
The uiconfig request parameter and the stored UI configuration are now
parsed as JSON objects and emitted via JSON.parse(), falling back to the
default configuration when the value is not a JSON object.


---------

Co-authored-by: josegar74 <josegar74@gmail.com>
* Map viewer / WFS filter / remove unused SLD API endpoints

The SLD-based WMS filtering strategies (SLD and SLD_BODY) were never
the active path in production: the default filterStrategy was always
FILTER, the SLD/SLD_BODY options were commented out in the config, and
the SLD_BODY path is documented as returning 414 Request-URI Too Large.

Remove the dead endpoints (POST /sld, GET /sld, DELETE /sld,
GET /sld/{id}.xml, GET /sldform) from SldApi, keeping only
POST /filter which is still in use.

Remove the methods only used by the SLD endpoints from SLDUtil
(parseSLD, getGetStyleRequest, insertFilter) and their associated
imports (Apache HttpClient, IOUtils, javax.mail, JDOM Element/Content,
ServiceException, URI/URISyntaxException).

Remove the TextFile JPA entity and TextFileRepository, which existed
solely to persist generated SLD documents, and add a v4412 migration
to drop the now-unused files table and sequence.

Simplify WfsFilterService to always POST to /api/tools/ogc/filter and
apply the result as a WMS FILTER parameter. Remove the isSld/SLD_BODY
branches, both pollSldUrl copies, and the $timeout and gnWfsFilterConfig
injections that only served those paths.

Remove the filterStrategy property from the gnWfsFilterConfig constant
in WfsFilterDirective and the dead var isSld line in filterWMS.

Remove the stale generateSLD/getSLD Jeeves security mappings.

Update the user guide to reflect that filters are applied via the WMS
FILTER parameter rather than SLD.

* Map viewer / WFS filter / remove unused SLD API endpoints

- Add file headers and minor code improvements.
- Add unit tests for SLDUtil

---------

Co-authored-by: josegar74 <josegar74@gmail.com>
* Fix delete users with metadata user feedback entries associated

* Clear persistence context after nullifying user feedback references

The nullifyAuthor and nullifyApprover bulk update queries bypass the
first-level cache, so any UserFeedback already loaded in the same
persistence context kept its stale authorId/approver after the update.

Add clearAutomatically = true to both @Modifying queries, matching the
convention used by the other bulk update queries in the codebase, and
flush/clear the persistence context in the test before re-reading so the
assertions check the database state rather than cached instances.

---------

Co-authored-by: Juan Luis Rodriguez Ponce <juanluisrp@gmail.com>
…om a thesaurus (#9354)

* Metadata editor / add a configuration to define mandatory keywords from a thesaurus

* Document thesaurus configuration attributes in custom editor guide

Add a reference table for the <thesaurus> element attributes (key,
maxtags, orderById, fieldset, browsable, transformations and the new
mandatory attribute) in the custom editor documentation. Note that
mandatory is a visual required indicator only and does not enforce
keyword selection on save.

---------

Co-authored-by: Juan Luis Rodriguez Ponce <juanluisrp@gmail.com>
* Code quality fixes:

- String comparison using of == or != instead of equals().
- Number equality using == or != instead of equals().
- Expression compared to itself.
- Long literal ending with lowercase 'l'.
- Empty finally blocks.
- Logging placeholders does not match number of arguments in logging call.
- Serializable classes whose serialVersionUID field is not declared private static final long

* Code quality fixes:

- Use Objects.equals to avoid NullPointerException in comparisons of fields annotated with @nonnull and no initializer
- Update MetadataLink.hash to avoid NullPointerException
Swedish was registered as a supported UI language in CatController.js
but had no field definitions in the index mapping template
records.json, unlike all other supported languages. Switching the UI
to Swedish triggered facet aggregations on langswe fields, which
Elasticsearch had created via dynamic mapping as text fields. Text
fields are not optimised for aggregations, so the request failed with
HTTP 400 and the search page showed an error.

Add langswe to every relevant section of records.json, mirroring the
existing languages: keyword for the aggregatable fields (tag, any,
organisationName and their dynamic templates) and text with the
built-in swedish analyzer for the full-text fields.

Closes #9243
…ation when building datahub-integration plugin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.