-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into eea-4.4.x
- Loading branch information
Showing
81 changed files
with
806 additions
and
770 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//============================================================================= | ||
//=== Copyright (C) 2001-2007 Food and Agriculture Organization of the | ||
//=== Copyright (C) 2001-2024 Food and Agriculture Organization of the | ||
//=== United Nations (FAO-UN), United Nations World Food Programme (WFP) | ||
//=== and United Nations Environment Programme (UNEP) | ||
//=== | ||
|
@@ -30,14 +30,9 @@ | |
|
||
import jeeves.server.context.ServiceContext; | ||
|
||
import org.apache.commons.lang.NotImplementedException; | ||
import org.fao.geonet.kernel.SchemaManager; | ||
import org.fao.geonet.kernel.setting.SettingInfo; | ||
import org.fao.geonet.utils.Log; | ||
import org.fao.geonet.Util; | ||
|
||
import org.fao.geonet.utils.Xml; | ||
import org.apache.commons.lang.StringUtils; | ||
import org.fao.geonet.GeonetContext; | ||
import org.fao.geonet.constants.Geonet; | ||
import org.fao.geonet.csw.common.Csw; | ||
|
@@ -54,7 +49,6 @@ | |
import org.fao.geonet.kernel.csw.CatalogService; | ||
import org.fao.geonet.kernel.csw.services.AbstractOperation; | ||
import org.fao.geonet.kernel.csw.services.getrecords.SearchController; | ||
import org.fao.geonet.domain.Pair; | ||
import org.fao.geonet.lib.Lib; | ||
import org.jdom.Element; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
|
@@ -76,12 +70,14 @@ public class GetRecordById extends AbstractOperation implements CatalogService { | |
//--------------------------------------------------------------------------- | ||
|
||
static final String NAME = "GetRecordById"; | ||
private SearchController _searchController; | ||
|
||
@Autowired | ||
private SearchController searchController; | ||
@Autowired | ||
private CatalogConfiguration _catalogConfig; | ||
private CatalogConfiguration catalogConfig; | ||
|
||
@Autowired | ||
private SchemaManager _schemaManager; | ||
private SchemaManager schemaManager; | ||
|
||
@Autowired | ||
public GetRecordById(ApplicationContext applicationContext) { | ||
|
@@ -106,7 +102,7 @@ public Element execute(Element request, ServiceContext context) throws CatalogEx | |
checkVersion(request); | ||
//-- Added for CSW 2.0.2 compliance by [email protected] | ||
checkOutputFormat(request); | ||
String outSchema = OutputSchema.parse(request.getAttributeValue("outputSchema"), _schemaManager); | ||
String outSchema = OutputSchema.parse(request.getAttributeValue("outputSchema"), schemaManager); | ||
//-------------------------------------------------------- | ||
|
||
ElementSetName setName = getElementSetName(request, ElementSetName.SUMMARY); | ||
|
@@ -135,8 +131,8 @@ public Element execute(Element request, ServiceContext context) throws CatalogEx | |
Lib.resource.checkPrivilege(context, id, ReservedOperation.view); | ||
|
||
final String displayLanguage = context.getLanguage(); | ||
Element md = SearchController.retrieveMetadata(context, id, setName, outSchema, null, null, ResultType.RESULTS, null, | ||
displayLanguage); | ||
Element md = searchController.retrieveMetadata(context, id, setName, outSchema, null, null, ResultType.RESULTS,null, | ||
displayLanguage, true); | ||
|
||
if (md != null) { | ||
final Map<String, GetRecordByIdMetadataTransformer> transformers = context.getApplicationContext() | ||
|
@@ -150,7 +146,7 @@ public Element execute(Element request, ServiceContext context) throws CatalogEx | |
|
||
response.addContent(md); | ||
|
||
if (_catalogConfig.isIncreasePopularity()) { | ||
if (catalogConfig.isIncreasePopularity()) { | ||
gc.getBean(DataManager.class).increasePopularity(context, id); | ||
} | ||
} | ||
|
Oops, something went wrong.