Skip to content

Commit

Permalink
Merge pull request #228 from Esri/f/2.7.2
Browse files Browse the repository at this point in the history
Updated H2 DB and Spring version
  • Loading branch information
mhogeweg authored Aug 2, 2024
2 parents 88bf178 + 1bb4fb3 commit 219f065
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 9 deletions.
6 changes: 3 additions & 3 deletions geoportal-application/geoportal-harvester-war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

<properties>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
<spring.version>5.3.27</spring.version>
<springsecurity.version>5.3.10.RELEASE</springsecurity.version>
<spring.version>5.3.37</spring.version>
<springsecurity.version>5.6.9</springsecurity.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -67,7 +67,7 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.2.220</version>
<version>2.3.230</version>
</dependency>

<!-- Spring Security -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<bean class="com.esri.geoportal.commons.meta.xml.SimpleFgdcMetaAnalyzer"/>
<bean class="com.esri.geoportal.commons.meta.xml.SimpleIso19115MetaAnalyzer"/>
<bean class="com.esri.geoportal.commons.meta.xml.SimpleIso19115_2MetaAnalyzer"/>
<bean class="com.esri.geoportal.commons.meta.xml.SimpleIso19119MetaAnalyzer"/>
<bean class="com.esri.geoportal.commons.meta.xml.SimpleIso19119MetaAnalyzer"/>

<!-- Metadata Builders -->
<bean class="com.esri.geoportal.commons.meta.js.SimpleDcMetaBuilder" id="metaBuilder"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,30 +74,31 @@
<xsl:value-of select="/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gmd:PT_FreeText/gmd:textGroup/gmd:LocalisedCharacterString[@locale='ENG']"/>
</resTitle>
<idAbs>
<xsl:value-of select="/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gmd:PT_FreeText/gmd:textGroup/gmd:LocalisedCharacterString[@locale='CAT']"/>
<xsl:value-of select="/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gmd:PT_FreeText/gmd:textGroup/gmd:LocalisedCharacterString[@locale='ENG']"/>
</idAbs>
</xsl:when>
<xsl:when test="@id='ESP'">
<resTitle>
<xsl:value-of select="/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gmd:PT_FreeText/gmd:textGroup/gmd:LocalisedCharacterString[@locale='ESP']"/>
</resTitle>
<idAbs>
<xsl:value-of select="/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gmd:PT_FreeText/gmd:textGroup/gmd:LocalisedCharacterString[@locale='CAT']"/>
<xsl:value-of select="/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gmd:PT_FreeText/gmd:textGroup/gmd:LocalisedCharacterString[@locale='ESP']"/>
</idAbs>
</xsl:when>
<xsl:otherwise>
<resTitle>
<xsl:value-of select="/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString"/>
</resTitle>
<idAbs>
<xsl:value-of select="/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gmd:PT_FreeText/gmd:textGroup/gmd:LocalisedCharacterString[@locale='CAT']"/>
<xsl:value-of select="/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gmd:PT_FreeText/gmd:textGroup/gmd:LocalisedCharacterString[@locale='ENG']"/>
</idAbs>
</xsl:otherwise>
</xsl:choose>
<!--
<idAbs>
<xsl:value-of select="/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gmd:PT_FreeText/gmd:textGroup/gmd:LocalisedCharacterString[@locale=@id]"/>
</idAbs>
-->
</locale>
</xsl:for-each>
</locales>
Expand Down Expand Up @@ -358,7 +359,7 @@
</resConst>
</xsl:for-each>

<!-- constraints -->
<!-- resource constraints -->
<xsl:for-each select="gmd:resourceConstraints/gmd:MD_LegalConstraints">
<mdConst>
<LegConsts>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ description=<xsl:call-template name="replace-string">
xdescription=<xsl:value-of select="translate(/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gco:CharacterString, '&#xA;', '\')" />
<!--xsl:value-of select="/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gco:CharacterString"/ -->
modified=<xsl:value-of select="/gmi:MI_Metadata/gmd:dateStamp/gco:Date | /gmi:MI_Metadata/gmd:dateStamp/gco:DateTime"/>
<xsl:choose>
<xsl:when test="count(/gmi:MI_Metadata/gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:linkage/gmd:URL)>0">
resource.url=<xsl:value-of select="/gmi:MI_Metadata/gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:linkage/gmd:URL"/>
</xsl:when>
<xsl:otherwise>
resource.url=<xsl:value-of select="/gmi:MI_Metadata/gmd:distributionInfo/gmd:MD_Distribution/gmd:distributor/gmd:MD_Distributor/gmd:distributorTransferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:linkage/gmd:URL"/>
</xsl:otherwise>
</xsl:choose>
<!--
resource.url=<xsl:for-each select="/gmi:MI_Metadata/gmd:distributionInfo/gmd:MD_Distribution/gmd:distributor/gmd:MD_Distributor/gmd:distributorTransferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:linkage/gmd:URL">
<xsl:variable name="link" select="translate(., $uppercase, $lowercase)" />
<xsl:choose>
Expand All @@ -30,6 +39,8 @@ resource.url=<xsl:for-each select="/gmi:MI_Metadata/gmd:distributionInfo/gmd:MD_
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
-->

<!-- <xsl:value-of select="/gmi:MI_Metadata/gmd:distributionInfo/gmd:MD_Distribution/gmd:distributor/gmd:MD_Distributor/gmd:distributorTransferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:linkage/gmd:URL"/> -->
thumbnail.url=<xsl:value-of select="/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:graphicOverview/gmd:MD_BrowseGraphic/gmd:fileName/gco:CharacterString"/>
bbox=<xsl:value-of select="/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:westBoundLongitude/gco:Decimal"/><xsl:text> </xsl:text><xsl:value-of select="/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:southBoundLatitude/gco:Decimal"/>,<xsl:value-of select="/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:eastBoundLongitude/gco:Decimal"/><xsl:text> </xsl:text><xsl:value-of select="/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:northBoundLatitude/gco:Decimal"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ public PublishingStatus publish(DataReference ref) throws DataOutputException {

// if the item url is the same as the resourceUrl, proceed.
// otherwise the metadata is for a sublayer, but the item is the parent
if (resourceUrl.equals(itemEntry.url)) {
if (resourceUrl.toLowerCase().equals(itemEntry.url.toLowerCase())) {
ItemResponse response = updateItem(
itemEntry.id,
itemEntry.owner,
Expand Down Expand Up @@ -467,6 +467,20 @@ private ItemEntry searchForItem(String src_uri_s) throws URISyntaxException, IOE
QueryResponse search = client.search(String.format("url:%s", String.format("%s", src_uri_s)), 0, 0, token);
ItemEntry itemEntry = search != null && search.results != null && search.results.length > 0 ? search.results[0] : null;

// if no results found see if changing the case of /arcgis/ to /ArcGIS/ or vice versa in the src_uri_s does find it
if (itemEntry == null) {
String src_uri_s_alternative = "";
if (src_uri_s.contains("/arcgis/rest/services")) {
src_uri_s_alternative = src_uri_s.replace("/arcgis/rest/services", "/ArcGIS/rest/services");
} else if (src_uri_s.contains("/ArcGIS/rest/services")) {
src_uri_s_alternative = src_uri_s.replace("/ArcGIS/rest/services", "/arcgis/rest/services");
}
if (!src_uri_s_alternative.isBlank()) {
search = client.search(String.format("url:%s", String.format("%s", src_uri_s_alternative)), 0, 0, token);
itemEntry = search != null && search.results != null && search.results.length > 0 ? search.results[0] : null;
}
}

// if no results found and the source uri (src_uri_s) ends in /0, /1, ... this may be a sublayer
// look for the parent service
if (itemEntry == null) {
Expand Down

0 comments on commit 219f065

Please sign in to comment.