Hyrax - Customizing Hyrax: Difference between revisions

From OPeNDAP Documentation
⧼opendap2-jumptonavigation⧽
Line 85: Line 85:
<br/>
<br/>


=== XSL Transform Files ===


{|
|<u>File</u>
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|<u>Location</u>
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|<u>Description</u>
|-
| '''catalog.xsl'''
|
| ''$CATALINA_HOME/content/docs/xsl''
|
| The contents.xsl file contains the XSLT transformation that is used to build the [http://docs.opendap.org/index.php/ServerDispatchOperations#OPeNDAP_Directory_Response OPeNDAP Directory Response] (''see [http://docs.opendap.org/images/6/6e/DirectoryView.png img]'') <br/><br/>
|-
| '''contents.xsl'''
|
| ''$CATALINA_HOME/content/docs/xsl''
|
| The contents.xsl file contains the XSLT transformation that is used to build the [http://docs.opendap.org/index.php/ServerDispatchOperations#OPeNDAP_Directory_Response OPeNDAP Directory Response] (''see [http://docs.opendap.org/images/6/6e/DirectoryView.png img]'') <br/><br/>
|-
| '''dapAttributePromoter.xsl'''
|
| ''$CATALINA_HOME/content/docs/xsl''
|
| The contents.xsl file contains the XSLT transformation that is used to build the [http://docs.opendap.org/index.php/ServerDispatchOperations#OPeNDAP_Directory_Response OPeNDAP Directory Response] (''see [http://docs.opendap.org/images/6/6e/DirectoryView.png img]'') <br/><br/>
|-
| '''dapAttributesToXml.xsl'''
|
| ''$CATALINA_HOME/content/docs/xsl''
|
| The contents.xsl file contains the XSLT transformation that is used to build the [http://docs.opendap.org/index.php/ServerDispatchOperations#OPeNDAP_Directory_Response OPeNDAP Directory Response] (''see [http://docs.opendap.org/images/6/6e/DirectoryView.png img]'') <br/><br/>
|-
| '''dap_2.0_ddxToRdfTriples.xsl'''
|
| ''$CATALINA_HOME/content/docs/xsl''
|
| The contents.xsl file contains the XSLT transformation that is used to build the [http://docs.opendap.org/index.php/ServerDispatchOperations#OPeNDAP_Directory_Response OPeNDAP Directory Response] (''see [http://docs.opendap.org/images/6/6e/DirectoryView.png img]'') <br/><br/>
|-
| '''dap_3.2_ddxToRdfTriples.xsl'''
|
| ''$CATALINA_HOME/content/docs/xsl''
|
| The contents.xsl file contains the XSLT transformation that is used to build the [http://docs.opendap.org/index.php/ServerDispatchOperations#OPeNDAP_Directory_Response OPeNDAP Directory Response] (''see [http://docs.opendap.org/images/6/6e/DirectoryView.png img]'') <br/><br/>
|-
| '''dap_3.3_ddxToRdfTriples.xsl'''
|
| ''$CATALINA_HOME/content/docs/xsl''
|
| The contents.xsl file contains the XSLT transformation that is used to build the [http://docs.opendap.org/index.php/ServerDispatchOperations#OPeNDAP_Directory_Response OPeNDAP Directory Response] (''see [http://docs.opendap.org/images/6/6e/DirectoryView.png img]'') <br/><br/>
|-
| '''dataset.xsl'''
|
| ''$CATALINA_HOME/content/docs/xsl''
|
| The contents.xsl file contains the XSLT transformation that is used to build the [http://docs.opendap.org/index.php/ServerDispatchOperations#OPeNDAP_Directory_Response OPeNDAP Directory Response] (''see [http://docs.opendap.org/images/6/6e/DirectoryView.png img]'') <br/><br/>
|-
| '''error400.xsl'''
|
| ''$CATALINA_HOME/content/docs/xsl''
|
| The error400.xsl contains the XSLT transformation that is used to build the web page that is returned when the server generates a Bad Request (400) HTTP status code.  If for some reason this page cannot be generated then the HTML version (''$CATALINA_HOME/content/docs/error400.html'') will be sent.<br/><br/>
|-
|-
| '''error500.xsl'''
|
| ''$CATALINA_HOME/content/docs/xsl''
|
| The error400.xsl contains the XSLT transformation that is used to build the web page that is returned when the server generates a Internal Server Error (500) HTTP status code.  If for some reason this page cannot be generated then the HTML version (''$CATALINA_HOME/content/docs/error500.html'') will be sent.<br/><br/>
|-
| '''namespaceFilter.xsl'''
|
| ''$CATALINA_HOME/content/docs/xsl''
|
| The contents.xsl file contains the XSLT transformation that is used to build the [http://docs.opendap.org/index.php/ServerDispatchOperations#OPeNDAP_Directory_Response OPeNDAP Directory Response] (''see [http://docs.opendap.org/images/6/6e/DirectoryView.png img]'') <br/><br/>
|-
| '''thredds.xsl'''
|
| ''$CATALINA_HOME/content/docs/xsl''
|
| The contents.xsl file contains the XSLT transformation that is used to build the [http://docs.opendap.org/index.php/ServerDispatchOperations#OPeNDAP_Directory_Response OPeNDAP Directory Response] (''see [http://docs.opendap.org/images/6/6e/DirectoryView.png img]'') <br/><br/>
|-
| '''version.xsl'''
|
| ''$CATALINA_HOME/content/docs/xsl''
|
| The contents.xsl file contains the XSLT transformation that is used to build the [http://docs.opendap.org/index.php/ServerDispatchOperations#OPeNDAP_Directory_Response OPeNDAP Directory Response] (''see [http://docs.opendap.org/images/6/6e/DirectoryView.png img]'') <br/><br/>
|-
| '''wcs_coveragePage.xsl'''
|
| ''$CATALINA_HOME/content/docs/xsl''
|
| The contents.xsl file contains the XSLT transformation that is used to build the [http://docs.opendap.org/index.php/ServerDispatchOperations#OPeNDAP_Directory_Response OPeNDAP Directory Response] (''see [http://docs.opendap.org/images/6/6e/DirectoryView.png img]'') <br/><br/>
|-
| '''wcs_coveragesList.xsl'''
|
| ''$CATALINA_HOME/content/docs/xsl''
|
| The contents.xsl file contains the XSLT transformation that is used to build the [http://docs.opendap.org/index.php/ServerDispatchOperations#OPeNDAP_Directory_Response OPeNDAP Directory Response] (''see [http://docs.opendap.org/images/6/6e/DirectoryView.png img]'') <br/><br/>
|-
| '''xmlToDapAttributes.xsl'''
|
| ''$CATALINA_HOME/content/docs/xsl''
|
| The contents.xsl file contains the XSLT transformation that is used to build the [http://docs.opendap.org/index.php/ServerDispatchOperations#OPeNDAP_Directory_Response OPeNDAP Directory Response] (''see [http://docs.opendap.org/images/6/6e/DirectoryView.png img]'') <br/><br/>
|-
|}
<br/>
<br/>


=== CSS Files ===
=== CSS Files ===

Revision as of 21:38, 25 February 2009

There are several ways in which Hyrax can be customized:

  • Web interface look and feel can be changed, as can the pages served.
  • Custom DispatchHandlers for the OLFS
  • Custom RequestHandlers for the BES.



Web page customization

Hyrax's public "face" is the web pages that are produced by servlets running in the Tomcat servlet engine. Almost all of these pages can be completely customized by the site administrator by editing a combination HTML, XSLT, and CSS files.

Where to make the changes

All of the default versions of the HTML, XSLT, and CSS files come bundled with hyrax in the $CATALINA_HOME/webapps/opendap/docs directory. You can make changes there, but installing new versions of the OLFS software will overwrite your modifications.

However, if the docs directory is copied (preserving it's structure) to $CATALINA_HOME/content/opendap/ (creating the directory $CATALINA_HOME/content/opendap/docs), then Hyrax will serve the files from the new location.

Warning
Do NOT remove files from this new directory (Or the old one for that matter). Each file, in it's location, are required by Hyrax. You can make changes to the files but you should not rename or remove them.



Nothing inside the $CATALINA_HOME/content directory is (automatically) changed when installing new versions of Hyrax.

The rest of these instruction are written with the assumption that a copy of the docs directory has been made as described above.

What to change

HTML Files

The HTML files provide the static content of a Hyrax server.

File        Location        Description
index.html $CATALINA_HOME/content/docs The documentation web page for the top level of Hyrax. As shipped it contains a description of Hyrax and links to documentation and funders. The contents.html pages (aka the OPeNDAP directories) links to this document.

error400.html $CATALINA_HOME/content/docs Contains the default error page that Hyrax will return when the clients request generates a Bad Request error (Associated with an HTML status of 400)

error403.html $CATALINA_HOME/content/docs Contains the default error page that Hyrax will return for when the clients request generates a Forbidden error. (Associated with an HTML status of 403)

error404.html $CATALINA_HOME/content/docs Contains the default error page that Hyrax will return for when the clients request generates a Not Found error. (Associated with an HTML status of 404)

error500.html $CATALINA_HOME/content/docs Contains the default error page that Hyrax will return for when the clients request generates an Internal Server Error. (Associated with an HTML status of 500)

error501.html $CATALINA_HOME/content/docs Contains the default error page that Hyrax will return for when the clients request generates an Not Implemented. (Associated with an HTML status of 501)

error502.html $CATALINA_HOME/content/docs Contains the default error page that Hyrax will return for when the clients request generates an Bad Gateway. (Associated with an HTML status of 502)




CSS Files

File        Location        Description
contents.css $CATALINA_HOME/content/docs/css The contents.css style sheet provides the default colors and fonts used in the Hyrax site. It used referenced all of the HTML and XSL files to coordinate the visual aspects of the site.

thredds.css $CATALINA_HOME/content/docs/css The thredds.css style sheeet provides the default colors and fonts used by the THREDDS component of Hyrax.



Image Files

There are a number of image files shipped with Hyrax. Simply replacing key image files will allow you to customize the icons and logo's associated with the Hyrax server.

File        Location        Description
logo.gif $CATALINA_HOME/content/docs/images Main Logo for the directory view (produced by contents.css and contents.xsl)

favicon.ico $CATALINA_HOME/content/docs/images The cute little icon by preceding the URL in the address bar of your browser. To be used this file needs to be installed into Tomcat as described here

BadDapRequest.gif, folder.png,
forbidden.png, largeEarth.jpg,
nasa-logo.jpg, noaa-logo.jpg,
nsf-logo.png, smallEarth.jpg,
sml-folder.png, superman.jpg
$CATALINA_HOME/content/docs/images These files are referenced by the default collection of web content files (described above) that ship with Hyrax.



Software Customization

OLFS Customization

Power Point Presentation From the 2007 Software Development Workshop hosted by the Australian Bureau of Meteorology.

BES Customization

Power Point Presentation From the 2007 Software Development Workshop hosted by the Australian Bureau of Meteorology.