Skip to content

Commit

Permalink
Merge pull request #310 from georchestra/fix-csw-server
Browse files Browse the repository at this point in the history
fix : csw server not ignoring failures
  • Loading branch information
f-necas committed Dec 18, 2024
1 parent e639928 commit 0ab4d6c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,9 @@
import org.fao.geonet.utils.Xml;
import org.geotools.xsd.Configuration;
import org.geotools.xsd.Parser;
import org.jdom.Attribute;
import org.jdom.Content;
import org.jdom.Element;
import org.jdom.Namespace;
import org.opengis.filter.Filter;
import org.opengis.filter.capability.FilterCapabilities;
import org.jdom.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.xml.sax.SAXException;

Expand Down Expand Up @@ -483,17 +480,20 @@ public Element search(ServiceContext context, int startPos, int maxRecords,
AbstractMetadata metadata = metadataUtils.findOne(mdId);

String displayLanguage = context.getLanguage();
Element resultMD = retrieveMetadata(context, metadata.getId() + "",
setName, outSchema, elemNames, typeName, resultType, strategy, displayLanguage);
try {// The query to retrieve GetRecords, filters by portal. No need to re-check again when retrieving each metadata.
Element resultMD = retrieveMetadata(context, metadata.getId() + "",
setName, outSchema, elemNames, typeName, resultType, strategy, displayLanguage, false);

if (resultMD != null) {
if (resultType == ResultType.RESULTS) {
results.addContent(resultMD);
}
if (resultMD != null) {
if (resultType == ResultType.RESULTS) {
results.addContent(resultMD);
}

counter++;
counter++;
}
} catch (InvalidParameterValueEx e) {
results.addContent(new Comment(e.getMessage()));
}

}

results.setAttribute("numberOfRecordsMatched", Long.toString(numMatches));
Expand Down
26 changes: 5 additions & 21 deletions georchestra-migration/migration-dev-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@ All italic folder just have the `pom.xml` change.
- common
- `ZipUtilTest.java` : In `assertExampleZip` method, assertions which are supposed check folders must check with trailing slash too.
- core
- `JeevesContextLoaderListener.java` : remove java 8 runtime exception as we use java 11.
- `XslUtil.java`: Implement georchestra header specific code
- `config-spring-geonetwork.xml` : Implement `context:property-placeholder` for georchestra's datadir
- `src/test/resources/config-spring-geonetwork.xml`: Add GeonetworkDataDirectory bean
- `cleanoutdatabase.sql`: Delete from settings-ui at the end of the file
- csw-server
- `CswFilter2Es.java` : Keep `{@}` instead of `%s` until it is fixed upstream (not supporting some CSW request)
- `CswFilter2EsTest.java` : Keep `{@}` instead of `%s`
- `SearchController.java` : Keep `{@}` instead of `%s` with StringUtils.replace
- `SearchController.java` : Keep `{@}` instead of `%s` with StringUtils.replace, try/catch around Element resultMD, to avoid csw server to crash [issue core-gn 6940](https://github.com/geonetwork/core-geonetwork/issues/6940)
- **docker**
- Mandatory, get everything from geOrchestra
- *docs*
Expand All @@ -48,9 +47,7 @@ All italic folder just have the `pom.xml` change.
- *events*
- **georchestra-integration**
- Mandatory, get everything from geOrchestra
- harvesters
- `Harvester.java`: Use parseJDK11 method
- `HarvesterTest.java` : Ignore and assume true Java 8
- *harvesters*
- *healthmonitor*
- *index*
- *inspire-atom*
Expand All @@ -60,16 +57,6 @@ All italic folder just have the `pom.xml` change.
- *oaipmh*
- *release*
- schemas
- `src/main/plugin/iso19115-3.2018`
- OGC API features, COG and 3Dtiles added. Differences in files:
- `config/associated-panel/default.json`
- `loc/eng/labels.xml`
- `loc/fre/labels.xml`
- `test/resources/metadata-for-editing.xml`
- `test/resources/metadata-for-editing-light.xml`
- `test/resources/metadata-iso19139-for-editing.xml`
- `src/main/plugin/iso19115-3.2018/config/associated-panel/default.json` : Keep OGC API - Features placeholder
- `src/main/plugin/iso19139/loc` : COG and 3Dtiles added in labels.xml files.
- `iso19139/layout/config-editor.xml`: xlinks for contacts reenabled
- *schemas-test*
- *sde*
Expand Down Expand Up @@ -101,23 +88,20 @@ All italic folder just have the `pom.xml` change.
- `pom.xml`: Keep exclusion of groovy package to avoid two versions of it.
- web-ui
- `pom.xml`: version to update **and to add to gn-web-ui**
- `RelatedResourcesService.js`: Add 3DTiles
- `CatController.js`: Menu bar accessible and 3DTiles
- `menu-signin.html`: remove the `authenticated` from the `ng-if` in firstul tag.
- `CatController.js`: Menu bar accessible
- `menu-signin.html`: remove the `authenticated` from the `ng-if` in first ul tag.
- `src/main/resources/catalog/locales/`
- Add OGC API - Features to i18n files
- Get `en-georchestra.json` and `fr-georchestra.json` from georchestra
- `src/main/resources/catalog/style/gn-less`: remove position fixed from `.gn-top-bar` to get gn header after georchestra's header.
- `gn_admin_default.less`: Same (header position)
- `gn_navbar_default.less`: Same (header position)
- `src/main/resources/catalog/views/module.js`: Add 3DTiles
- `src/main/resources/catalog/views/georchestra/`: Get files from georchestra
- *workers*
- *wro4j*
- .gitignore
- add idea and settings to it
- pom.xml
- Implement JDK 11 specific things, add georchestra-integration module, set db-type
- Add georchestra-integration module, set db-type

## Process used

Expand Down

0 comments on commit 0ab4d6c

Please sign in to comment.