Integrate the Geoportal Extension with a Content Management System

Release 9.3.1 E-mail This Topic Printable Version Give Us Feedback

Integrate the Geoportal Extension with a Content Management System

A Content Management System (CMS) is software that allows users to enter and change content on a website. There are a number of CMS available, and the Geoportal can be integrated within a CMS, or a CMS can be integrated within the Geoportal extension as a new tab. A CMS is not a requirement of the Geoportal extension, but integrating one can give a more directed view of the content of the geographic metadata catalog. CMS pages can highlight sets of geographic data and services that are applicable to certain user groups or topics. Several options are available for CMS integration, as illustrated in the figure below:









The methodology for rendering the response within a CMS page can vary. Some systems have inherent capability to render one or more of the response formats provided by the Geoportal extension. Another approach involves transforming a response using XSL technology; this gives full control over the look and feel of the rendered response content. Implementing this approach will depend upon the capabilities of the CMS. Many content management systems also provide the ability to plug-in customized rendering adapters. This approach would involve the development of the custom component.



This section provides an example for integrating the Geoportal extension with a freely available CMS called JSP Wiki. There are two parts to this section:
  1. Using JSPWiki with Geoportal extension GeoRSS feeds
  2. Using JSPWiki with the Geoportal extension REST API
After you have configured your JSPWiki page, integrate it into a new tab in your Geoportal by following instructions at Adding Another Tab to the geoportal Interface.



  1. Using JSPWiki with Geoportal GeoRSS feeds

    In this example, you will install JSP Wiki from the JSP Wiki site. . After installing JSP Wiki, you will need to install an RSS plugin, located at http://www.jspwiki.org/wiki/RssViewerPlugin. Remember to restart Tomcat after installing the plugin jar files.



    Steps to create JSP Wiki page to fetch Geoportal RSS feeds:

    • Install JSP Wiki
    • Create a new page in JSP Wiki into which you will insert GeoRSS feeds.
    • Go to the edit mode of the page, and paste the string below into it. This change will insert GeoRSS feeds from your Geoportal. In the string, the url attribute should reference the REST result string for the search you want to display on the wiki page. For example, if you want the wiki page to display the wildfire records, the url parameter would look like the one in the example below. The parameters such as "detail", "ttl", "date", and "maxitems" are parameters defined by the plugin, and can be adjusted according to the syntax documentation on the RssViewerPlugin page:

      [{fr.univ.reunion.iremia.rss.RssViewer url='http://yourGeoportalserver/geoportal/rest/find/document?searchText=wildfire' detail='1' ttl='120' date='1' maxitems='20'}]
    • You can define more complex search results by using the REST syntax to specify extent, topic categories, dates, and more.
    • Save the wiki page, exit the edit mode, and you will see the page like below:







  2. Using JSPWiki with Geoportal REST API

    It is also possible to display your REST results using the Geoportal REST API. In this example, you will need to install the 'xslt-plugin.jar', and publish an xsl called "IdentityTransform.xsl" so that JSP Wiki may have access to the xsl file. Instructions for how to do so are included in the steps below.

    • Install JSP Wiki.
    • Install the xslt_plugin.jar, available at http://www.jspwiki.org/wiki/XSLTPlugin:
      • Go to the "Attach" tab on the website, and copy the xslt_plugin.jar file into your JSPwiki\WEB-INF\lib folder).
      • Add the following entry to your jspwiki.properties file in the "Plugin search paths" section:

        #############################################################################

        #

        # Plugin search paths.

        #

        # Define here the packages you want to use for searching plugins,

        # separated with commas.

        # For example, use the following command to add "org.myorganisation.jspwiki.myplugins"

        # and "com.foobar.myplugins" to the search path.

        #

        # The default path is "com.ecyrd.jspwiki.plugins", and it will be always

        # the last item on the path. This allows you to override JSPWiki default

        # plugins. Note that you are only adding to the path, not replacing it (ie.

        # the default path is never removed.)

        #

        # jspwiki.plugin.searchPath = org.myorganisation.jspwiki.myplugins,com.foobar.myplugins

        #

        jspwiki.plugin.searchPath =net.panonet.XSLTPlugin


      • Create the IdentityTransform.xsl file, and save it to your JSPWiki folder. You can name the file whatever you want, as long as you reference it in your JSPWiki. The text for the file is:



        <?xml version="1.0" encoding="UTF-8"?>

        <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">

        <xsl:output method="text"/>

        <xsl:template match="/">

        <xsl:for-each select="//item">

        <div>

        <xsl:text>&lt;a </xsl:text> href="<xsl:value-of select="link/@href"/>" target="_blank"<xsl:text> &gt;</xsl:text>

        <xsl:text>&lt;h4&gt;</xsl:text>

        <xsl:value-of select="title"/>

        <xsl:text>&lt;/h4&gt;</xsl:text>

        <xsl:text>&lt;/a&gt;</xsl:text>

        <p>

        <xsl:value-of select="description"/>

        </p>

        <xsl:text>&lt;br&gt;</xsl:text>

        </div>

        </xsl:for-each>

        </xsl:template>

        </xsl:stylesheet>
    • Now you will create a new JSP wiki page, and integrate the Geoportal REST API results within it.
      • Create the JSP wiki page.
      • Go to the edit mode of the page.
      • Paste the string below into it. Note, the parameter called "xml=" will need to have the URL of your search result page for the Geoportal REST API results, and the "xsl=" parameter will need to reference the URL to your published IdentityTransform.xsl.



        [{INSERT net.panonet.XSLTPlugin WHERE xml='{url to document (or search result page) of Geoportal REST API}', xsl='{url to IdentityTransform.xsl}'}]



        For example:Wildfire Metadata

        [{INSERT net.panonet.XSLTPlugin WHERE xml='http:// yourGeoportalserver /geoportal/rest/find/document?searchText=wildfire*', xsl='C:/Tomcat5526/webapps/JSPWiki/channelPage.xsl'}]
    • Save the page, exit the edit mode, and you will see the page like the following below: