Skip to content

Commit

Permalink
Merge branch '3.4.x' of github.com:geonetwork/core-geonetwork into de…
Browse files Browse the repository at this point in the history
…velop
  • Loading branch information
Delawen committed Sep 15, 2017
2 parents 48a8114 + 22ba19e commit ee495d6
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 76 deletions.
Expand Up @@ -217,7 +217,7 @@ public void index(Path schemaDir, Element metadata, String id, List<Element> mor
String catalog = doc.get("source").asText();
doc.remove("source");
doc.put("sourceCatalogue", catalog);
doc.put("territory", settingManager.getSiteName());
doc.put("scope", settingManager.getSiteName());
doc.put("harvesterUuid", settingManager.getSiteId());
doc.put("harvesterId", settingManager.getNodeURL());
Map<String, String> docListToIndex = new HashMap<>();
Expand Down
36 changes: 27 additions & 9 deletions es/config/records.json
Expand Up @@ -502,18 +502,18 @@
"Območja upravljanja/zaprta območja/regulirana območja in poročevalske enote => Area management/restriction/regulation zones and reporting units",
"Zone de administrare/restricţie/reglementare şi unităţi de raportare => Area management/restriction/regulation zones and reporting units",
"Zone de administrare/restricție/reglementare și unități de raportare => Area management/restriction/regulation zones and reporting units",
"Gebiedsbeheer, gebieden waar beperkingen gelden, gereguleerde gebieden en rapportage-eenheden => Area management/restriction/regulation zones and reporting units",
"Gebiedsbeheer gebieden waar beperkingen gelden gereguleerde gebieden en rapportage-eenheden => Area management/restriction/regulation zones and reporting units",
"Zonas de gestão/restrição/regulamentação e unidades de referência => Area management/restriction/regulation zones and reporting units",
"Gospodarowanie obszarem/strefy ograniczone/regulacyjne oraz jednostki sprawozdawcze => Area management/restriction/regulation zones and reporting units",
"Apgabala pārvaldības/ierobežojumu/reglamentētas zonas un ziņošanas vienības => Area management/restriction/regulation zones and reporting units",
"Zone sottoposte a gestione/limitazioni/regolamentazione e unità con obbligo di comunicare dati => Area management/restriction/regulation zones and reporting units",
"Amministrazzjoni ta' żoni/restrizzjoni/żoni regolati u unitajiet ta' rapportar => Area management/restriction/regulation zones and reporting units",
"Tvarkomos teritorijos, ribojamos ir reglamentuojamos zonos bei vienetai, už kuriuos atsiskaitoma => Area management/restriction/regulation zones and reporting units",
"Tvarkomos teritorijos ribojamos ir reglamentuojamos zonos bei vienetai už kuriuos atsiskaitoma => Area management/restriction/regulation zones and reporting units",
"Területgazdálkodási/-korlátozási/-szabályozási övezetek és adatszolgáltató egységek => Area management/restriction/regulation zones and reporting units",
"Zones de gestion, de restriction ou de réglementation et unités de déclaration => Area management/restriction/regulation zones and reporting units",
"Aluesuunnittelun, rajoitusten ja sääntelyn piiriin kuuluvat alueet ja raportointiyksiköt => Area management/restriction/regulation zones and reporting units",
"Zones de gestion de restriction ou de réglementation et unités de déclaration => Area management/restriction/regulation zones and reporting units",
"Aluesuunnittelun rajoitusten ja sääntelyn piiriin kuuluvat alueet ja raportointiyksiköt => Area management/restriction/regulation zones and reporting units",
"Üldplaneering/piirangu-/reguleeritud tsoonid ja aruandlusüksused => Area management/restriction/regulation zones and reporting units",
"Zonas sujetas a ordenación, a restricciones o reglamentaciones y unidades de notificación => Area management/restriction/regulation zones and reporting units",
"Zonas sujetas a ordenación a restricciones o reglamentaciones y unidades de notificación => Area management/restriction/regulation zones and reporting units",
"Bewirtschaftungsgebiete/Schutzgebiete/geregelte Gebiete und Berichterstattungseinheiten => Area management/restriction/regulation zones and reporting units",
"Ζώνες διαχείρισης/περιορισμού/ρύθμισης εκτάσεων και μονάδες αναφοράς => Area management/restriction/regulation zones and reporting units",
"Forvaltede og regulerede områder samt områder med brugsbegrænsning og indberetningsenheder => Area management/restriction/regulation zones and reporting units",
Expand Down Expand Up @@ -1056,7 +1056,9 @@
"type": "date"
},
"document": {
"type": "text"
"type" : "string",
"index" : "no",
"doc_values": false
},
"documentStandard": {
"type": "keyword"
Expand All @@ -1065,7 +1067,12 @@
"type": "keyword"
},
"geom": {
"type": "text"
"type": "geo_shape",
"tree": "quadtree",
"precision": "10km"
},
"location": {
"type": "geo_point"
},
"harvesterId": {
"type": "keyword"
Expand Down Expand Up @@ -1103,6 +1110,9 @@
"lineage": {
"type": "text"
},
"resolutionScaleDenominator": {
"type": "integer"
},
"link": {
"type": "text"
},
Expand All @@ -1118,7 +1128,7 @@
"metadataIdentifier": {
"type": "keyword"
},
"numberOfInspireTheme": {
"inspireThemeNumber": {
"type": "short"
},
"otherConstraints": {
Expand Down Expand Up @@ -1196,10 +1206,13 @@
"standardName": {
"type": "keyword"
},
"tagNumber": {
"type": "short"
},
"tag": {
"type": "keyword"
},
"territory": {
"scope": {
"type": "keyword"
},
"topic": {
Expand All @@ -1209,6 +1222,11 @@
"type": "date",
"format": "date_hour_minute_second"
},
"validReport": {
"type" : "string",
"index" : "no",
"doc_values": false
},
"schemaValidDate": {
"type": "date",
"format": "date_hour_minute_second"
Expand Down
86 changes: 24 additions & 62 deletions schemas/iso19139/src/main/plugin/iso19139/index-fields/index.xsl
Expand Up @@ -139,17 +139,6 @@
</standardName>
</xsl:for-each>

<!-- Harvester details
<territory>GN</territory>
<territory>
<xsl:value-of select="util:getSettingValue('system/site/name')"/>
</territory>
<harvesterId>
<xsl:value-of select="util:getSettingValue('nodeUrl')"/>
</harvesterId>
<harvesterUuid>
<xsl:value-of select="util:getSettingValue('system/site/siteId')"/>
</harvesterUuid> -->
<harvestedDate>
<xsl:value-of select="format-dateTime(current-dateTime(), $dateFormat)"/>
</harvestedDate>
Expand Down Expand Up @@ -258,7 +247,8 @@
select="gmd:alternateTitle/gco:CharacterString/text()"/>
</resourceAltTitle>

<xsl:for-each select="gmd:date/gmd:CI_Date[gmd:date/*/text() != '']">
<xsl:for-each select="gmd:date/gmd:CI_Date[gmd:date/*/text() != '' and
matches(gmd:date/*/text(), '[0-9]{4}.*')]">
<xsl:variable name="dateType"
select="gmd:dateType[1]/gmd:CI_DateTypeCode/@codeListValue"
as="xs:string?"/>
Expand Down Expand Up @@ -356,7 +346,6 @@
gmx:Anchor[. != '']">
<xsl:variable name="inspireTheme" as="xs:string"
select="text()"/>
<!--select="solr:analyzeField('synInspireThemes', text())"/>-->

<inspireTheme_syn>
<xsl:value-of select="text()"/>
Expand All @@ -378,7 +367,6 @@
</inspireThemeFirst>
<inspireAnnexForFirstTheme>
<xsl:value-of select="$inspireTheme"/>
<!--select="solr:analyzeField('synInspireAnnexes', $inspireTheme)"/>-->
</inspireAnnexForFirstTheme>
</xsl:if>
<inspireAnnex>
Expand All @@ -390,10 +378,10 @@
<!-- For services, the count does not take into account
dataset's INSPIRE themes which are transfered to the service
by service-dataset-task. -->
<numberOfInspireTheme>
<inspireThemeNumber>
<xsl:value-of
select="count($inspireKeywords)"/>
</numberOfInspireTheme>
</inspireThemeNumber>

<hasInspireTheme>
<xsl:value-of
Expand All @@ -407,6 +395,11 @@
*/gmd:MD_Keywords/
gmd:keyword/gmd:PT_FreeText/gmd:textGroup/
gmd:LocalisedCharacterString"/>

<tagNumber>
<xsl:value-of select="count($keywords)"/>
</tagNumber>

<xsl:for-each select="$keywords">
<tag>
<xsl:value-of select="text()"/>
Expand Down Expand Up @@ -602,69 +595,40 @@
-90 &lt;= number($n) and number($n) &lt;= 90">
<xsl:choose>
<xsl:when test="$e = $w and $s = $n">
<geom>
<xsl:text>POINT(</xsl:text>
<xsl:value-of select="concat($w, ' ', $s)"/>
<xsl:text>)</xsl:text>
</geom>

<geojson>
<xsl:text>{"type": "point",</xsl:text>
<xsl:text>"coordinates": "</xsl:text><xsl:value-of select="concat($w, ' ', $s)"/>"
<xsl:text>}</xsl:text>
</geojson>
<location><xsl:value-of select="concat($s, ',', $w)"/></location>
</xsl:when>
<xsl:when
test="($e = $w and $s != $n) or ($e != $w and $s = $n)">
<!-- Probably an invalid bbox indexing a point only -->
<geom>
<xsl:text>POINT(</xsl:text>
<xsl:value-of select="concat($w, ' ', $s)"/>
<xsl:text>)</xsl:text>
</geom>

<geojson>
<xsl:text>{"type": "point",</xsl:text>
<xsl:text>"coordinates": "</xsl:text><xsl:value-of select="concat($w, ' ', $s)"/>"
<xsl:text>}</xsl:text>
</geojson>
<location><xsl:value-of select="concat($s, ',', $w)"/></location>
</xsl:when>
<xsl:otherwise>
<geom>
<xsl:text>POLYGON((</xsl:text>
<xsl:value-of select="concat($w, ' ', $s)"/>
<xsl:text>,</xsl:text>
<xsl:value-of select="concat($e, ' ', $s)"/>
<xsl:text>,</xsl:text>
<xsl:value-of select="concat($e, ' ', $n)"/>
<xsl:text>,</xsl:text>
<xsl:value-of select="concat($w, ' ', $n)"/>
<xsl:text>,</xsl:text>
<xsl:value-of select="concat($w, ' ', $s)"/>
<xsl:text>))</xsl:text>
</geom>


<geojson>
<xsl:text>{"type": "polygon",</xsl:text>
<xsl:text>"coordinates": [</xsl:text>
<xsl:value-of select="concat('[', $w, ' ', $s, ']')"/>
<xsl:value-of select="concat('[', $w, ',', $s, ']')"/>
<xsl:text>,</xsl:text>
<xsl:value-of select="concat('[', $e, ' ', $s, ']')"/>
<xsl:value-of select="concat('[', $e, ',', $s, ']')"/>
<xsl:text>,</xsl:text>
<xsl:value-of select="concat('[', $e, ' ', $n, ']')"/>
<xsl:value-of select="concat('[', $e, ',', $n, ']')"/>
<xsl:text>,</xsl:text>
<xsl:value-of select="concat('[', $w, ' ', $n, ']')"/>
<xsl:value-of select="concat('[', $w, ',', $n, ']')"/>
<xsl:text>,</xsl:text>
<xsl:value-of select="concat('[', $w, ' ', $s, ']')"/>
<xsl:value-of select="concat('[', $w, ',', $s, ']')"/>
<xsl:text>]}</xsl:text>
</geojson>
</geom>

<location><xsl:value-of select="concat(
(number($s) + number($n)) div 2,
',',
(number($w) + number($e)) div 2)"/></location>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>


<!--<xsl:value-of select="($e + $w) div 2"/>,<xsl:value-of select="($n + $s) div 2"/></field>-->
</xsl:for-each>
</xsl:for-each>
Expand All @@ -677,8 +641,6 @@
</serviceType>
<xsl:variable name="inspireServiceType" as="xs:string"
select="text()"/>
<!--select="solr:analyzeField(
'keepInspireServiceTypes', text())"/>-->
<xsl:if test="$inspireServiceType != ''">
<inspireServiceType>
<xsl:value-of select="lower-case($inspireServiceType)"/>
Expand Down Expand Up @@ -899,7 +861,7 @@
as="xs:string*"/>

<xsl:variable name="role"
select="*[1]/gmd:role/*/@codeListValue"
select="replace(*[1]/gmd:role/*/@codeListValue, ' ', '')"
as="xs:string?"/>
<xsl:if test="normalize-space($organisationName) != ''">
<xsl:element name="Org{$fieldSuffix}">
Expand Down
Expand Up @@ -754,10 +754,6 @@
access="hasRole('RegisteredUser')"/>

<!-- Formatter services -->
<sec:intercept-url pattern="/[a-zA-Z0-9_\-]+/[a-z]{2,3}/xml.format.[^?]+(\?.*)?"
access="permitAll"/>
<sec:intercept-url pattern="/[a-zA-Z0-9_\-]+/[a-z]{2,3}/md.format.[^?]+(\?.*)?"
access="permitAll"/>
<sec:intercept-url pattern="/[a-zA-Z0-9_\-]+/[a-z]{2,3}/md.format.public..[^?]+(\?.*)?"
access="permitAll"/>
<sec:intercept-url pattern="/[a-zA-Z0-9_\-]+/[a-z]{2,3}/md.formatter.resource!?.*"
Expand All @@ -776,6 +772,10 @@
access="hasRole('UserAdmin')"/>
<sec:intercept-url pattern="/[a-zA-Z0-9_\-]+/[a-z]{2,3}/md.formatter.edit!?.*"
access="hasRole('UserAdmin')"/>
<sec:intercept-url pattern="/[a-zA-Z0-9_\-]+/[a-z]{2,3}/xml.format.[^?]+(\?.*)?"
access="permitAll"/>
<sec:intercept-url pattern="/[a-zA-Z0-9_\-]+/[a-z]{2,3}/md.format.[^?]+(\?.*)?"
access="permitAll"/>
<sec:intercept-url pattern="/[a-zA-Z0-9_\-]+/[a-z]{2,3}/admin.format.clear"
access="hasRole('Administrator')"/>
<sec:intercept-url pattern="/[a-zA-Z0-9_\-]+/[a-z]{2,3}/md.viewer(\?debug)?"
Expand Down

0 comments on commit ee495d6

Please sign in to comment.