Problem Adding Custom Links to Search Result

1681
1
03-20-2013 04:34 PM
JacobCoble
New Contributor
I have followed the instructions in:
http://sourceforge.net/apps/mediawiki/geoportal/index.php?title=Add_Custom_Link_to_a_Search_Result
but I cannot get it to work. I want to use the networkr tag to allow the user to download a shapefile (zipped) and another link to download an lpk file.

In gpt.properties I have added the lines
catalog.property.customLink.label.esri   = LPK File
catalog.property.customLink.label.esri   = Shapefile
and I have modified the other files exactly as shown in the sourceforge document referred to above. What happens is there is a link called "Open" that will open the LPK file. What I want to happen is that the "Open" link should work with the Onlink tag (if it has a URL) and there should be a link called "LPK File" that works with the appropriate networkr line in the metadata and there should be a link called "Shapefile" that works with the networkr line in the metadata that links to a zipped shapefile. But there is no "LPK File" or "Shapefile" link.

I even used the sample metadata as one of the tests and I also completely deleted the Lucene index and rebuilt it, and stopped and re-started Tomcat. What could I be missing or doing wrong?
0 Kudos
1 Reply
LaurelKish
New Contributor III
Did you update the CSW Response xslt as noted in the sourceforge wiki?
http://sourceforge.net/apps/mediawiki/geoportal/index.php?title=Add_Custom_Link_to_a_Search_Result#U...

Did you check to see if the element in your xml that contains the path to the zipfile is indexing in Lucene and getting the field results you need?
http://<your server address here>/geoportal/rest/index/stats/fields

I had a lot of trouble making all this work until I went back and discovered one unedited value in my property-meanings.xml file related to the <dc /> element.  The xml element from my metatdata file is this:
<linkage>http://www.mymanatee.org/gisapps/data/shape/Flood_100yr.zip</linkage>

So my property-meanings element had to look like this:
<property-meaning name="linkage" valueType="String" comparisonType="value">
  <dc name="dct:linkage" scheme="urn:x-esri:specification:ServiceType:linkage" />

This was after I added two possible XPath's for the linkage element to my indexables file:
<property meaning="linkage" xpath="/metadata/distInfo/distTranOps/onLineSrc/linkage | /metadata/distInfo/distributor/distorTranonLinSrc/linkage"/>

And don't forget to clear your browser cache and restart Tomcat when you make changes. You probably already do that , but they are easy to forget sometimes.
Hope this helps. This geoportal thing has been very challenging for me and I am still wrestling with it on a daily basis. Very obtuse app for a non-programmer like me.
0 Kudos