[GeoNetwork-users] Extend Default Metadata View

try with this url:
http://localhost:8080/geonetwork/srv/eng/q?_content_type=json&_isTemplate=y+or+n&fast=index&uuid=metadata_uuid

and check if you have dataSetURI there. If yes, just check how other data is
done if not, then you need to set lucene index fields.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Extend-Default-Metadata-View-tp5262029p5262098.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Hi!

Thank you very much for the quick reply!
Unfortunately "dataSetURI" is not included in the attributes provided by the
link.

So I will have to set lucene index fields.
How can I do this?

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Extend-Default-Metadata-View-tp5262029p5262107.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

For example I wanted to add conformity to metadata view, so I did like this.

In file: web/src/main/webapp/WEB-INF/config-lucene.xml
I added <field name="conformity" tagName="conformity"/> in <dumpfields>

then in file:
schemas/iso19139/src/main/plugin/iso19139/index-fields/default.xsl
I added mapping for this conformity (check how other lucene fields are
mapped)
      <xsl:variable name="conformityTitle"
select="gmd:DQ_ConformanceResult/gmd:specification/gmd:CI_Citation/gmd:title/gco:CharacterString/text()"/>
      <xsl:variable name="conformityDate"
select="gmd:DQ_ConformanceResult/gmd:specification/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/gco:Date/text()"/>
      <xsl:variable name="conformityExplanation"
select="gmd:DQ_ConformanceResult/gmd:explanation/gco:CharacterString/text()"/>
      <xsl:variable name="conformityPass"
select="gmd:DQ_ConformanceResult/gmd:pass/gco:Boolean/text()"/>

      <Field name="conformity" string="{concat($conformityTitle, '|',
$conformityDate, '|', $conformityExplanation, '|', $conformityPass)}"
store="true" index="true"/>

so this will already add conformity attributes (you must run lucene
optimizers before) in:
http://localhost:8080/geonetwork/srv/eng/q?_content_type=json&_isTemplate=y+or+n&fast=index&uuid=metadata_uuid

to show them in metadata view, I changed:
web-ui/src/main/resources/catalog/views/default/templates/recordView.html
        
conformity

                  conformanceResult
                  
                  <div data-ng-if="c.title.length > 0">conformityTitle:
{{c.title}}</div>
                  <div data-ng-if="c.date.length > 0">conformityDate: </div>
                  <div data-ng-if="c.explanation.length >
0">conformityExplanation: {{c.explanation}}</div>
                  <div>conformityPass: {{c.pass | translate}}</div>
                
Of course after changing lucene index I run: rebuild index, optimize index,
reload index configuration, clear XLink cache and clear formatter cache.

After this, conformity was shown in metadata view.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Extend-Default-Metadata-View-tp5262029p5262110.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Hello amacar,

Works perfectly
Thank your very much for your help!

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Extend-Default-Metadata-View-tp5262029p5262237.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.