Mapping "Immagini Rappresentative" done
This commit is contained in:
parent
fca972e68c
commit
c0ab40afea
|
@ -151,8 +151,21 @@ Starting document mapping to Catalogue
|
|||
</#if>
|
||||
</#if>
|
||||
|
||||
<#-- Mapping first "Immagine Rappresentativa" as resource -->
|
||||
<#if theDocument.immaginiRappresentative?? && theDocument.immaginiRappresentative[0]?? && theDocument.immaginiRappresentative[0].fileset?? && theDocument.immaginiRappresentative[0].fileset._payloads??>
|
||||
<#-- Mapping "Immagine Rappresentative" as resource -->
|
||||
<#if theDocument.immaginiRappresentative??>
|
||||
<#if theDocument.immaginiRappresentative?is_sequence && theDocument.immaginiRappresentative?size gt 0>
|
||||
<#list theDocument.immaginiRappresentative as the_image>
|
||||
<#if the_image.fileset?? && the_image.fileset._payloads??>
|
||||
<#assign payloads = the_image.fileset._payloads>
|
||||
<#if payloads?size!=0>
|
||||
<#-- Getting the first payload -->
|
||||
<#assign payload = payloads[0]>
|
||||
<@assignResource name=payload._name url=payload._link description=the_image.didascalia format=payload._mimetype></@assignResource>
|
||||
</#if>
|
||||
</#if>
|
||||
</#list>
|
||||
</#if>
|
||||
|
||||
<#assign payloads = theDocument.immaginiRappresentative[0].fileset._payloads>
|
||||
<#if payloads?size!=0>
|
||||
<#-- Getting the first payload -->
|
||||
|
@ -252,12 +265,12 @@ Starting document mapping to Catalogue
|
|||
<#-- spatial field -->
|
||||
<#if jsonProj._identificationReferences?? && jsonProj._identificationReferences?size!=0 && jsonProj._identificationReferences[0].geoJSON??>
|
||||
<#assign geoJSON = jsonProj._identificationReferences[0].geoJSON>
|
||||
<#-- if coordinates exists, managing it as a Point -->
|
||||
<#if geoJSON.coordinates?? && geoJSON.coordinates?is_sequence && geoJSON.coordinates?size gt 2>
|
||||
<#assign point_Coordinates = [geoJSON.coordinates[0], geoJSON.coordinates[1]]>
|
||||
<#assign spatialField = '{\\"type\\": \\"${geoJSON.type}\\", \\"coordinates\\": [${point_Coordinates?join(", ")}]}'>
|
||||
<@assignExtraField key="spatial" value=spatialField asObject=false></@assignExtraField>
|
||||
<#assign point_Coordinates = [geoJSON.coordinates[0], geoJSON.coordinates[1]]>
|
||||
<#assign spatialField = '{\\"type\\": \\"${geoJSON.type}\\", \\"coordinates\\": [${point_Coordinates?join(", ")}]}'>
|
||||
<@assignExtraField key="spatial" value=spatialField asObject=false></@assignExtraField>
|
||||
</#if>
|
||||
|
||||
</#if>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue