File:  [mozdev] / biobar / www / customize.html
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Wed Mar 9 16:48:51 2005 UTC (12 years, 9 months ago) by jawahar
Branches: MAIN
CVS tags: HEAD
added customize instructions

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="content-type">
  <title>Customizing biobar search menus</title>
</head>
<body>
<div style="text-align: center;">
<h2><span style="font-weight: bold;">Customize your search menu</span></h2>
<div style="text-align: justify;"><span style="font-weight: bold;"><span
 style="font-weight: bold;"></span></span>
<p><span style="font-weight: bold;"><span style="font-weight: bold;"><span
 style="font-weight: bold;"></span></span></span>With version 1.3 of
biobar it is possible to customize the search menu of the toolbar. The
procedure involves editing an XML file and saving the file in your
profile directory.</p>
<br>
There are two files which can be edited to add additional search
terms/menu's to your searches.<br>
<br>
<ol>
  <li>BiobarSearch.xml - Provides the menu listing and URLs for
producing the standard search menu (individual databases).</li>
  <li>BiobarGroups.xml - Provides the URLs and menu for 'Searching by
Groups'&nbsp; option, which can be chosen from options.</li>
</ol>
<p>Before customizing the search menu, please copy these files to from
the following links to your profile directory. Following these links
will open up the XML file on your browser, please choose File-&gt; Save
Page As to save the files. <span style="font-style: italic;">Please do
not rename these files !!</span></p>
<ul>
  <li><a href="http://biobar.mozdev.org/BiobarSearch.xml">BiobarSearch.xml</a></li>
  <li><a href="http://biobar.mozdev.org/BiobarGroups.xml">BiobarGroups.xml</a></li>
</ul>
Copy these files over to your Profile Directory. <br>
<br>
<span style="font-weight: bold;">Locating your Profile Directory: </span>From
the main browser toolbar, choose Tools -&gt; Biobar -&gt; My Profile
Directory.<span style="font-weight: bold;"> </span>The information
will be displayed to you in an alert box.<br>
<br>
<span style="font-weight: bold;">Editing BiobarSearch.xml: </span><br>
<br>
Go to your profile directory using the paths above. Open the xml file
in yoru favorite editor. This file has the following syntax:<br>
<br>
<span style="font-weight: bold;"><span style="font-weight: bold;"><span
 style="font-weight: bold;"></span></span></span>
<pre>&lt;?xml version="1.0"?&gt;<br>&lt;biobar&gt;<br>       &lt;Databases&gt;<br>---<br>---<br>               &lt;Group type="Fungal"&gt;<br>                        &lt;Database type="SGD"&gt;<br>                                &lt;Menuitem name="QuickSearch" url="Some Search URL"/&gt;<br>				&lt;Menuitem name-"...." url="....."/&gt;<br>                        &lt;/Database&gt;<br>                &lt;/Group&gt;<br>        &lt;/Databases&gt;<br>&lt;/biobar&gt;<br><br></pre>
The Group definition indicates the main groups of search databases in
the search menu. EBI, NCBI, Plant, Animal, Structure etc. Please add a
group of your own and give it a unique name like &lt;Group type="my
menu"&gt;. Inside each group are databases each having a name. For
example, under structure, we have databases like MSD, RCSB etc. Add
your database under your group like &lt;Database type="MyDatabase"&gt;.
Under each Database are a set of searchterms you would like to search
by followed by the URL leading upto the search.<br>
<br>
For example if you want to search by Group (My Menu) having a database
(MyDatabase) which has a searchitem and url, you would edit the XML
file and add at the following:<br>
<br>
<pre>&lt;Group type="My Menu"&gt;<br>&lt;Database type="MyDatabase"&gt;<span
 style="font-family: monospace;"></span><br>&lt;Menuitem name="Keyword" url="http://mydatabase.org/something.cgi?something=something&amp;amp;keyword="/&gt;<br>&lt;/Database&gt;<br>&lt;/Group&gt;<br><br></pre>
<p>Where the the url is everything but the text you will actually
search. Please note that each menuitem is terminated with a /. Please
also note the format for ampersand. The items you add should be nested
within the overall XML tree. Ideally you would add a new &lt;Group&gt;
below a &lt;/Group&gt;.<br>
</p>
<p>Please save the XML file in your profile directory. Check to see
that the XML file is valid by opening this XML file in your browser. If
it renders properly as a tree, then you have a valid XML. Else please
correct the errors. </p>
<p>Once you have saved the XML file, restart
your browser, and
the new search menu containing the search database you added will show
up in the Search Window. You will also be able to choose the new
database/s as a default from the options window.<br>
</p>
<p><span style="font-weight: bold;">Editing BiobarGroups.xml: </span><br>
</p>
<p>Save BiobarGroups.xml in your profile directory as described above.
Open this file for editing your favorite browser. This file has a
format similar to that showb below:<br>
</p>
<pre>&lt;?xml version="1.0"?&gt;<br>&lt;biobarGroups&gt;<br>        &lt;Group name="Structures"&gt;<br>                &lt;Menuitems&gt;<br>                        &lt;Menuitem SearchTerm="PDB ID"&gt;<br>                                &lt;url&gt;http://www.ebi.ac.uk/msd-srv/atlas?toolbar=biobar&amp;amp;id=&lt;/url&gt;<br>                                &lt;url&gt;http://oca.ebi.ac.uk/oca-bin/ocaids?toolbar=biobar&amp;amp;id=&lt;/url&gt;<br>                                &lt;url&gt;http://www.rcsb.org/pdb/cgi/explore.cgi?toolbar=biobar&amp;amp;pdbId=&lt;/url&gt;<br>                                &lt;url&gt;http://www.ebi.ac.uk/thornton-srv/databases/cgi-bin/pdbsum/GetPage.pl?toolbar=biobar&amp;amp;pdbcode=&lt;/url&gt;<br>                        &lt;/Menuitem&gt;<br>		&lt;/Menuitems&gt;<br>	&lt;/Group&gt;<br>&lt;/biobarGroups&gt;<br><br></pre>
Each Group described a search Type (Structures, Function, Taxonomy
etc). Each search Type has a set of searchTerms associated with the
searchType. For example, one could search all structrual databases for
PDB code, keyword, author etc. For each searchTerm, there are a set of
URLs which describe the full command needed for searching.<br>
<br>
<p>If you wanted to add your own searchType (say Sequences) containing
searchTerms Author, Keyword etc, you would have to add a new Group with
a tree like:</p>
<br>
<br>
<pre>&lt;Group name="Sequences"&gt;<br>	&lt;Menuitems&gt;<br>		&lt;Menuitem SearchTerm="Keyword"&gt;<br>			&lt;url&gt;SomeURL containing the whole path&lt;/url&gt;<br>			&lt;url&gt;&lt;/url&gt;<br>		&lt;/Menuitem&gt;<br>		&lt;Menuitem SearchTerm+"Author"&gt;<br>			&lt;url&gt;&lt;/url&gt;<br>			&lt;url&gt;&lt;/url&gt;<br>		&lt;/Menuitem&gt;<br>	&lt;/Menuitems&gt;<br>&lt;/Group&gt;<br><br></pre>
<p>Once you have made the changes, save the file as BiobarGroups.xml in
your profile area. Check that the XML file is valid by opening the file
in your browser. Restart your browser. If you chose the 'Search Groups'
in the biobar options window, then your database will show up.</p>
<br>
</div>
</div>
</body>
</html>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>