Add Custom Link to a Search Result
Pages 202
- Home
- 2009 Esri Federal UC
- 2009 Esri International UC
- 2010 Esri Federal UC
- 2010 Esri International UC
- 2011 Esri Federal UC
- 2012 Esri Federal UC
- 2013 Esri Federal GIS Conference
- 2013 Esri International User Conference
- 2015 SDI Special Interest Group
- Add a Custom Profile
- Add an OpenSearch endpoint for Federated Search
- Add Another Tab to the Geoportal Interface
- Add Custom Link to a Search Result
- Add Custom Search Criteria
- Add the Geoportal Search to a List of Search Providers
- Add v1.1.1 FGDC editor to a previous Geoportal release
- AGP TO AGP Harvesting with the Geoportal
- AGS TO AGP Harvesting with the Geoportal
- All gpt.xml file settings
- An Introduction to vi
- Apache Tomcat geoportal logging
- Being a Good Robot
- Best Practice for Edits to JSP files
- Biological or Remote Sensing FGDC xsds
- Browse Tree
- Cart Processor
- Catalog Service
- Clear the Tomcat Work Folder
- Collections
- Common problems and solutions
- Communities and live examples
- Components
- Configure a Directory Server for the Geoportal
- Configure geoportal User and Schema in the PostgreSQL Database
- Configure Previewable Filetypes
- Configure Searching of YouTube
- Configure the gpt.xml File
- Configure Widgets
- Connecting to a User Directory
- Create a user account
- Create Relationships between Resources
- Customizations
- Customize DCAT output
- Customize Metadata Validation
- Database problems
- Database Tables
- DataDownload Tab
- Deploy and Configure the Geoportal Web Application in Tomcat
- Deploy and Configure the Servlet Web Application
- Deploy the Geoportal Web Application
- Details of Lucene Indexing in the Geoportal
- Development topics
- Discovering Resources
- Eclipse Project from Compiled WAR
- Eclipse Project from Source Code
- Enable Search Using an Ontology Service
- Error Messages in the Geoportal Web Application
- Esri Geoportal Server LiveDVD
- Extending the Web Harvester
- Federated Search in Portal for ArcGIS
- Feedback
- FGDC Biological Profile and Remote Sensing Extension
- FGDC Service Checker Integration
- Geoportal Clients for ArcGIS
- Geoportal CSW Clients
- Geoportal Facets using Apache Solr
- Geoportal genie
- Geoportal Project from Compiled WAR
- Geoportal Publish Client
- Geoportal Server 1.2.5 What's New
- Geoportal Server 1.2.6 What's New
- Geoportal Server 1.2.7 What's New
- Geoportal server as a broker
- Geoportal Server Downloads
- Geoportal Server v 1.0 What's New
- Geoportal Server v 1.1 What's New
- Geoportal Server v 1.1.1 What's New
- Geoportal Server v 1.2 What's New
- Geoportal Server v 1.2.2 What's New
- Geoportal Server v 1.2.4 What's New
- Geoportal SPARQL Sample
- Geoportal User Interface Components
- Geoportal Web Application File Organization
- Geoportal XML Editor
- Get Assistance with an Implementation
- GXE Concepts
- GXE Crash Course
- GXE Structure
- GXE Workflow
- High Availability and Large Number of Records
- How to Browse for Resources
- How to Create and Manage My Profile
- How to find all documents of a particular metadata standard
- How to Leave a Resource Review
- How to Login and Manage my Password
- How to Manage and Edit Resources
- How to Publish Resources
- How to Restrict Access to Resources
- How to Search for Resources
- How to Search with an Ontology Service
- How to Set Up an Esri Geoportal Server on Linux
- How to Use Search Page Results
- How to Use the Data Download Feature
- How to View Resource Relationships
- IDE Topics
- Identity Components LDAP and Single Sign On
- Index All Metadata Content
- Indexing and Searching the Time Period of the Content
- Install Apache Tomcat 6
- Install Desktop Tools
- Install Esri Geoportal Server
- Install PostgreSQL 9.1.2
- Install the JDBC .jar Files
- Installation
- Installation Version 1.0
- Installation Version 1.1
- Installation Version 1.2
- Installation Version 1.2.2
- Installation Version 1.2.4
- Installation Version 1.2.5
- Installation Version 1.2.6
- Installation Version 1.2.7
- Installation Version 1.2.8
- Integrate with a Content Management System
- Integrate with the con terra Security Solution
- Localization
- Log In to the Geoportal
- Logging
- Look and Feel of the User Interface
- Main Page
- Map LDAP Attributes on the Registration Page
- Map Viewer
- Online form editing for all publication methods
- Open source acknowledgements
- Oracle WebLogic geoportal logging
- Orientation to the Create Metadata Page
- Perform Preinstallation Computer Setup
- Portal for ArcGIS Integration
- Post Deployment Actions
- Preinstallation
- Preinstallation 0.9
- Preinstallation 1.0 and 1.1.x
- Preinstallation 1.2
- Preinstallation 1.2.2
- Preinstallation 1.2.4
- Preinstallation 1.2.5
- Preinstallation 1.2.6
- Preinstallation 1.2.7
- Preinstallation 1.2.8
- Preview Function
- Publication Components
- Ratings and Comments for Search Results
- Register ArcGIS for Server with the Geoportal
- Release notes
- REST API Syntax
- Sample FGDC metadata.xml
- Scheduled tasks
- Search Components
- Search Map
- Search Widget for Flex
- Search Widget for HTML
- Search Widget for Silverlight
- Security Concepts
- Set Up Systemwide Environment Variables
- Set up the Geoportal Database
- Share Link
- Single Sign On
- Smoketest the Geoportal
- Standards Support
- Supported CSW Profiles for Synchronization
- Theme Library
- Troubleshooting
- Troubleshooting Tips
- Two geoportals on the same server
- Upgrade 1.x to 1.2 database
- Upgrading file system approach
- Upgrading Read This Overview
- Upgrading SVN approach
- Url filter customization
- Use an XSLT to Render the Details Page
- Use Ant to build Geoportal
- User Functions and Roles
- User Management Interface
- Using a geoportal
- Using Lucene Search Text Queries
- Version 0.9
- Version 1.0
- Version 1.1
- Version 1.1.1
- Version 1.2
- Version 1.2.2
- Version 1.2.4
- Version 1.2.5
- Version 1.2.6
- Version 1.2.7
- Version 1.2.8
- What is a geoportal and the geoportal server
- What is the esri geoportal server
- What's New
- wiki template
- WMC Client
- Show 187 more pages…
Clone this wiki locally
When search results are returned on a Geoportal Search page, there are links associated with the result by default. These links typically Details, Metadata, Zoom To, Preview, and others (see topic on How to Use Search Page Results).
This topic describes how to add a new custom link to the search results. This is useful for integrating additional functionality triggered by clicking the link on the search result. For example, perhaps you want to display a link for 'FTP download' that opens an FTP link described in metadata documents in your geoportal. You could customize the geoportal such that it displays this FTP download link with the search result, and when clicked, calls the FTP URL described in the metadata document.
This topic provides instructions, using the FTP download as an example. Steps are described below.
Decide what information should be retrieved
The first step is to decide what information from your metadata document should be retrieved when the custom link is clicked. In our example, we want to retrieve FTP URLs for our registered resources. The sample FGDC metadata.xml we will use has the ftp URL located at the Network Resource Name metadata element, which is called <networkr></networkr>. It is found at the following xpath:
/metadata/distinfo/stdorder/digform/digtopt/onlinopt/computer/networka/networkr
Identify the metadata element you would like to access with your new link, and write down its xpath from the metadata.
Verify the xpath's index
The geoportal is going to use CSW protocol to retrieve information when the custom link is clicked. You must verify that the information you want to access is already indexed; if not, you will need to create an index for it and map it to the xpath you wrote down in the step above. For instructions how to verify your xpath is already indexed or to set the indexing for that xpath, read and follow guidance from Details of Lucene Indexing in the Geoportal. In our example, the <networkr></networkr> element will be indexed as a new property-meaning, and afterwards must be referenced in the fgdc-indexables.xml file. Tip: If you are adding a property-meaning for your index, it is recommended to model the new property-meaning after a similar property meaning in the property-meanings.xml file. Because our example is for an FTP site, we model it after the property-meaning for resource.url. We copy the property-meaning element for the resource.url, and paste it above in the property-meanings.xml file. Then we update the property-meaning name to a new value, e.g., networkr, and the scheme to a unique value, e.g., 'urn:x-esri:specification:ServiceType:Networkr', such that our new property meaning looks like the following:
<property-meaning name="networkr" valueType="String" comparisonType="value">
<dc name="dct:references" scheme="urn:x-esri:specification:ServiceType:Networkr"/>
</property-meaning>
Save the file, but do not close it.
Verify the full CSW access
After you have verified that the xpath is indexed, you should be familiar with the property-meanings.xml file. Open this file again, and scroll to the where the 'Dublin Core response property sets' are defined. Find the full element, and then the dc element within it. Is the property-meaning that is mapped to your index in the list of meaning-names information? If not, you need to add it to one of the meaning-names elements. Enter the same name you used for the 'name' attribute of the property-meaning, and put it in the meaning-names element where it makes most sense. For example, because in our example we are adding a link for an FTP site, it makes sense that we would include our new property meaning in the <meaning-names></meaning-names> element that has other URL references. Therefore, our example looks like this:
<full>
<dc>
<meaning-names>fileIdentifier,uuid,title</meaning-names>
<meaning-names>contentType,dataTheme</meaning-names>
<meaning-names>dateModified,abstract</meaning-names>
<meaning-names>resource.url,website.url,thumbnail.url,xml.url,networkr</meaning-names>
<meaning-names>geometry,date,relation</meaning-names>
</dc>
</full>
Save the file.
Update the Geoportal's CSW Response xslt
Now that you have added a new index and/or verified that it referenced in the property-meanings.xml and indexables.xml file, you will add code to the Geoportal's CSW response xslt such that a link is rendered from the CSW response from your index.
Open \\geoportal\WEB-INF\classes\gpt\search\profiles\CSW_2.0.2_OGCCORE_ESRI_GPT_GetRecords_Response.xslt. Add the following in between the closing Types and the closing Record elements:
<Links>
<Link label="catalog.property.customLink.label.esri">
<xsl:value-of select="./dct:references[@scheme='urn:x-esri:specification:ServiceType:Networkr']"/>
</Link>
</Links>
Update the value in the @scheme value to be the same as the 'scheme' value from the property-meaning you defined in the property-meanings.xml file earlier. Note that in our example, we've used the scheme value urn:x-esri:specification:ServiceType:Networkr.
This code will add a new link to the search result that calls through CSW the information indexed at that scheme.
Save the file.
Update gpt.properties with the link's label
As a final step, open \\geoportal\WEB-INF\classes\gpt\resources\gpt.properties, and add a value that will represent the name of the new link to appear on the search result:
catalog.property.customLink.label.esri = CustomLink
Note: It doesn't matter where in the gpt.properties file you add this value. However, the value should begin with the term 'catalog'.
Test
Upload a sample metadata document that contains information at the xpath that you used in this customization. Approve the document. Now do a search from the geoportal search page. When you see your record in the results, expand it to verify that your custom link appears.