Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1622,7 +1622,7 @@
<es.index.max_result_window.limit>15000</es.index.max_result_window.limit>
<es.index.max_inner_result_window.limit>200</es.index.max_inner_result_window.limit>

<es.index.mapping.total_fields.limit>4000</es.index.mapping.total_fields.limit>
<es.index.mapping.total_fields.limit>5000</es.index.mapping.total_fields.limit>
<es.index.ignore_above>2000</es.index.ignore_above>

<!-- If elasticsearch security is on,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1421,13 +1421,165 @@
<xsl:element name="{concat('agg_associated_', $associationType)}"><xsl:value-of select="$code"/></xsl:element>
</xsl:if>
</xsl:for-each>


<xsl:call-template name="index-imagery">
<xsl:with-param name="allLanguages" select="$allLanguages"/>
</xsl:call-template>
</doc>

<!-- Index more documents for this element -->
<xsl:apply-templates mode="index-extra-documents" select="."/>
</xsl:template>


<xsl:template name="index-imagery">
<xsl:param name="allLanguages"/>
<xsl:for-each select="mdb:contentInfo/*/mrc:processingLevelCode/*/mcc:code/*/text()">
<processingLevelCode><xsl:value-of select="util:escapeForJson(.)"/></processingLevelCode>
</xsl:for-each>


<xsl:variable name="imageDescription"
select="*:contentInfo/*:MD_ImageDescription"/>
<xsl:if test="$imageDescription">
<imageDescription type="object">[
<xsl:for-each select="$imageDescription">
{
<xsl:for-each select="*:processingLevelCode|*:imageQualityCode|*[gco:Real castable as xs:double]|*[gco:Boolean != '']|*[*/@codeListValue != '']">
"<xsl:value-of select="local-name()"/>":
<xsl:choose>
<xsl:when test="gco:Real">
<xsl:value-of select="gco:Real"/>
</xsl:when>
<xsl:when test="gco:Boolean">
<xsl:value-of select="if (gco:Boolean = 'true') then 'true' else 'false'"/>
</xsl:when>
<xsl:when test="*/@codeListValue">
<xsl:copy-of select="gn-fn-index:add-codelist-field(
local-name(), *, $allLanguages, true())"/>
</xsl:when>
<xsl:otherwise>
"<xsl:value-of select="*/*:code/*/text()"/>"
</xsl:otherwise>
</xsl:choose>
<xsl:if test="position() != last()">,</xsl:if>
</xsl:for-each>
}
<xsl:if test="position() != last()">,</xsl:if>
</xsl:for-each>
]
</imageDescription>
</xsl:if>


<xsl:variable name="instruments"
select="*:acquisitionInformation/*/*:instrument/*"/>
<xsl:if test="$instruments">
<mac_instrument type="object">[
<xsl:for-each select="$instruments">
{
<xsl:for-each select="*:identifier">
"code": "<xsl:value-of select="*/*:code/*/text()"/>"
</xsl:for-each>
<xsl:for-each select="*:mountedOn/*/*:identifier">
,"mountedOn": "<xsl:value-of select="*/*:code/*/text()"/>"
</xsl:for-each>
<xsl:if test="normalize-space(*:description) != ''">
,"descriptionObject": <xsl:value-of select="gn-fn-index:add-multilingual-field(
'description', *:description, $allLanguages, true())"/>
</xsl:if>
}
<xsl:if test="position() != last()">,</xsl:if>
</xsl:for-each>
]
</mac_instrument>
</xsl:if>


<xsl:variable name="operations"
select="*:acquisitionInformation/*/*:operation/*"/>
<xsl:if test="$operations">
<mac_operation type="object">[
<xsl:for-each select="$operations">
<xsl:if test="normalize-space(*:description) != ''">
{
"descriptionObject": <xsl:value-of select="gn-fn-index:add-multilingual-field(
'description', *:description, $allLanguages, true())"/>
}
</xsl:if>
<xsl:if test="position() != last()">,</xsl:if>
</xsl:for-each>
]
</mac_operation>
</xsl:if>


<xsl:variable name="platforms"
select="*:acquisitionInformation/*/*:platform/*"/>

<xsl:if test="$platforms">
<mac_platform type="object">[
<xsl:for-each select="$platforms">
{
<xsl:for-each select="*:identifier">
"code": "<xsl:value-of select="*/*:code/*/text()"/>"
</xsl:for-each>
<xsl:if test="normalize-space(*:description) != ''">
,"descriptionObject": <xsl:value-of select="gn-fn-index:add-multilingual-field(
'description', *:description, $allLanguages, true())"/>
</xsl:if>
}
<xsl:if test="position() != last()">,</xsl:if>
</xsl:for-each>
]
</mac_platform>
</xsl:if>

<xsl:variable name="acquisitionPlans"
select="*:acquisitionInformation/*/*:acquisitionPlan/*"/>
<xsl:if test="$acquisitionPlans">
<mac_acquisitionPlan type="object">[
<xsl:for-each select="$acquisitionPlans">
{
<xsl:for-each select="*/*[@codeListValue != '']">
<xsl:variable name="fieldName"
select="concat('cl_', local-name(..))"/>
"<xsl:value-of select="$fieldName"/>": <xsl:copy-of select="gn-fn-index:add-codelist-field(
$fieldName, ., $allLanguages, true())"/>
<xsl:if test="position() != last()">,</xsl:if>
</xsl:for-each>
}
<xsl:if test="position() != last()">,</xsl:if>
</xsl:for-each>
]
</mac_acquisitionPlan>
</xsl:if>


<xsl:variable name="environmentalConditions"
select="*:acquisitionInformation/*/*:environmentalConditions/*"/>

<xsl:if test="$environmentalConditions">
<mac_environmentalConditions type="object">[
<xsl:for-each select="$environmentalConditions">
{
<xsl:for-each select="*[gco:Real != '' or gco:CharacterString != '']">
"<xsl:value-of select="local-name()"/>": <xsl:value-of select="if (gco:CharacterString)
then gn-fn-index:add-multilingual-field(local-name(), ., $allLanguages, true())
else gco:Real"/>
<xsl:if test="position() != last()">,</xsl:if>
</xsl:for-each>
}
<xsl:if test="position() != last()">,</xsl:if>
</xsl:for-each>
]
</mac_environmentalConditions>
</xsl:if>
</xsl:template>



<!-- TODO: here is a limited vision of 1 org with first individual.
ISO19115-3 allows more combinations. -->
<xsl:template mode="index-contact" match="*[cit:CI_Responsibility]">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
<for name="mri:response" use="textarea"/>
<for name="mri:specificUsage" use="textarea"/>
<for name="mrd:orderOptions" use="textarea"/>
<for name="mrc:rangeElement" use="textarea"/>

<for name="gco:Distance" use="number"/>
<for name="gco:Distance/@uom" use="data-gn-keyword-picker">
Expand Down Expand Up @@ -522,8 +521,9 @@
<name>mac:averageAirTemperature</name>
<name>mac:maxAltitude</name>
<name>mac:maxRelativeHumidity</name>
<name>mac:meterologicalConditions</name>
<name>mac:type</name>
<name>mac:solarAzimuth</name>
<name>mac:solarElevation</name>
<name>mas:constraintLanguage</name>
<name>mas:schemaLanguage</name>
<name>mcc:code</name>
Expand All @@ -535,6 +535,7 @@
<name>mex:condition</name>
<name>mex:domainValue</name>
<name>mex:maximumOccurence</name>
<name>mrc:rangeElement</name>
<name>mrc:bitsPerValue</name>
<name>mrc:cameraCalibrationInformationAvailability</name>
<name>mrc:cloudCoverPercentage</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2040,6 +2040,31 @@
<description>Event related to general collection</description>
</entry>
</codelist>
<codelist name="mac:MI_GeometryTypeCode">
<entry>
<code>areal</code>
<label>Areal</label>
<description>Collection of a geographic area defined by a polygon
(coverage)
</description>
</entry>
<entry>
<code>strip</code>
<label>Strip</label>
<description>Series of linear collections grouped by way points
</description>
</entry>
<entry>
<code>linear</code>
<label>Linear</label>
<description></description>
</entry>
<entry>
<code>point</code>
<label>Point</label>
<description></description>
</entry>
</codelist>
<codelist name="mac:MI_ObjectiveTypeCode">
<entry>
<code>instantaneousCollection</code>
Expand Down
76 changes: 76 additions & 0 deletions web/src/main/webResources/WEB-INF/data/config/index/records.json
Original file line number Diff line number Diff line change
Expand Up @@ -2316,6 +2316,82 @@
},
"standardVersion": {
"type": "text"
},
"mac_instrument": {
"type": "object",
"properties": {
"code": {
"type": "keyword",
"copy_to": "any.common"
},
"mountedOn": {
"type": "keyword",
"copy_to": "any.common"
},
"descriptionObject": {
"type": "object"
}
}
},
"mac_platform": {
"type": "object",
"properties": {
"code": {
"type": "keyword",
"copy_to": "any.common"
},
"descriptionObject": {
"type": "object"
}
}
},
"mac_acquisitionPlan": {
"type": "object",
"properties": {
"cl_type": {
"type": "object"
},
"cl_status": {
"type": "object"
}
}
},
"mac_environmentalConditions": {
"type": "object",
"properties": {
"cl_type": {
"type": "object"
},
"cl_status": {
"type": "object"
}
}
},
"imageDescription": {
"type": "object",
"properties": {
"processingLevelCode": {
"type": "keyword"
},
"imageQualityCode": {
"type": "keyword"
},
"illuminationElevationAngle": {
"type": "double"
},
"illuminationAzimuthAngle": {
"type": "double"
},
"cloudCoverPercentage": {
"type": "double"
},
"cl_status": {
"type": "object"
}
}
},
"processingLevelCode": {
"type": "keyword"
}
}
}
Expand Down
Loading