Skip to topic | Skip to bottom
Grimoires
Grimoires.BrowserClientAdministratorGuide

Start of topic | Skip to actions

Administrator guide for the registry browser

Source code layout

You do not need to know the contents of this section if you are simply trying to deploy the registry browser.

The source code for the browser client can be found at Grimoires/web-browser-client in the CVS repository. It has the following directories:

  • config - configuration files for "browse by metadata types"
  • docs
  • ext - external libraries dependency. A copy of grimoires-server.jar is included.
  • src - java files (servlets) for the client browser
    • src/org/grimoires/browser/model - model in MVC
    • src/org/grimoires/browser/web - controller in MVC
  • web - a collection of html, css and jsp files. view in MVC
and these files:
  • build.properties - configure your build properties here
  • build.xml - you shouldn't need to modify this

Configuring "browse by" metadata types

The registry browser allows you to configure any number of default browse by types. This list is load at web app initialisation time, and is configured at the deployment description file (at web/WEB-INF/web.xml). In the following example, the servlet will load two browse type configuration files - task.xml and resource.xml. The list is comma seperated. The servlet looks for these files in the config directory.

<servlet>
  <servlet-name>MenuClickServlet</servlet-name>
  <servlet-class>org.grimoires.browser.web.MenuClickServlet</servlet-class>
  <init-param>
    <param-name>hierarchy-config</param-name>
    <param-value>task.xml,resource.xml</param-value>
  </init-param>
</servlet>

Each XML configuration file defines a browse by metadata type hierarchy. For example, we wish to browse by metadata type http://www.grimoires.org/feta/operationResource :

<?xml version="1.0"?>
<bigtree type="http://www.grimoires.org/feta/operationResource">
<branch>
  <node>
    <name>Operation Resource</name>
    <branch>
      <node>
        <name>http://www.mygrid.org.uk/ontology#bioinformatics_database</name>
        <branch>
          <node>
            <name>http://www.mygrid.org.uk/ontology#PDB</name>
          </node>
          <node>
            <name>http://www.mygrid.org.uk/ontology#ProDom</name>
          </node>
          <node>
            <name>http://www.mygrid.org.uk/ontology#sequence_database</name>
            <branch>
              <node>
                <name>http://www.mygrid.org.uk/ontology#nucleotide_sequence_database</name>
                <branch>
                  <node>
                    <name>http://www.mygrid.org.uk/ontology#Genbank_nucleotide_sequence_database</name>
                  </node>
                </branch>
              </node>
            </branch>
          </node>
        </branch>
      </node>
    </branch>
  </node>
</branch>
</bigtree>

This XML document defines the following hierarchy

These URIs are used as the metadata value for queries in the registry browser.

Changing deployed application context

The context is hard coded at one place in the source code. This is used inside the links in the dhtml tree menu. The file is web/template.jsp. Look for this line:
    d += "m.add(" + numNodes + "," + parent + ",'" + t.getName() + "','/grimoires-browser/treeview.do" + link + "');";
Change the default /grimoires-browser to whatever you want. Then you can deploy the web app in your desired context using your favourite method (eg via tomcat manager).

-- SylviaWong - 25 Aug 2005
to top


You are here: Grimoires > UserGuide > BrowserClientAdministratorGuide

to top

Copyright 2004 by the University of Southampton