Done by Ji Hye Jung, Aug 2003
To check out the new project, you should set the $CVSROOT to "home/webvibe/cvsroot"
$ export CVSROOT=/home/webvibe/cvsroot
Create a directory to store the code
$ mkdir cvs
Then, check out the code with the below command in any of the ISRL machines.
$ cd cvs $ cvs checkout webvibe_v2
Before you run the server, you should set up the database and index some collections. See Database setup and How to add a collection.
To run the server or client, you should have java version 1.4.0 or above.
To use database for each of the following, you should have a database property file for each database type in your running directory. Please see following files in webvibe_v2/run/server/ directory and change the user name, password, or dburl if it is different.
You should create the collectiondata table before you start to index a collection. This table contains the three table names for each collection.
| Field | Type | Null | Key | Default |
| collection | varchar(100) | PRI | ||
| indextable | varchar(100) | YES | NULL | |
| xmlpathtable | varchar(100) | YES | NULL | |
| docpathtable | varchar(100) | YES | NULL |
sql> create table collectiondata
(collection varchar(100) not null,
indextable varchar(100),
xmlpathtable varchar(100),
docpathtable varchar(100),
primary key (collection));
Each collection has separate tables for its numeric range records. Thus, when you index a collection, three tables are created and the table names are inserted to collectiondata table automatically. For example, if you indexed a collection named "fna," the "fnaIndex" table, the "fnaXML" table, and the "fnaDoc" table will be created by the program and the schema of each table is like below.
| Field | Type | Null | Key | Default |
| pathid | int(11) | PRI | 0 | |
| minvalue | float | YES | NULL | |
| maxvalue | float | YES | NULL | |
| abminvalue | float | YES | NULL | |
| abmaxvalue | float | YES | NULL | |
| unit | varchar(20) | YES | NULL | |
| docid | int(11) | PRI | 0 |
| Field | Type | Null | Key | Default |
| pathid | int(11) | PRI | 0 | |
| xmlpath | varchar(255) | YES | MUL | NULL |
| Field | Type | Null | Key | Default |
| docid | int(11) | PRI | 0 | |
| docpath | varchar(255) | YES | MUL | NULL |
To manually drop a collection: If the collection name is "fna",
sql> drop table fnaIndex;
sql> drop table fnaXML;
sql> drop table fnaDoc;
sql> delete from collectiondata where collection='fna';
The tables for selection list is shared by all collection. There are three tables for the selection list. One is for simple selection list (a list of possible values for the given XML leaf node), one for image selection list (a list of possible values with urls for images), and the other for storing xml path for the node. We can store the path information in the each table for the selection lists, but, to reduce the redundancy, the separate table for xml path is made and it is connected with pathid.
| Field | Type | Null | Key | Default |
| path | int(11) | PRI | 0 | |
| value | varchar(255) | PRI |
| Field | Type | Null | Key | Default |
| path | int(11) | PRI | 0 | |
| value | varchar(255) | PRI | ||
| url | varchar(255) |
| Field | Type | Null | Key | Default |
| collection | varchar(255) | PRI | ||
| xpath | varchar(255) | PRI | ||
| pathid | int(11) | UNI | 0 |
There are three tables for each thesaurus. One is for synonyms, another for broader terms, and the other for narrower terms. The schema for each table is very simple. If the thesaurus name is "fna," you should have "fna_syn" for synonyms, "fna_bt" for broader terms, and "fna_nt" for narrower terms.
| Field | Type | Null | Key | Default |
| term | varchar(50) | YES | NULL | |
| synonyms | varchar(50) | YES | NULL |
| Field | Type | Null | Key | Default |
| term | varchar(50) | YES | NULL | |
| broad_term | varchar(50) | YES | NULL |
| Field | Type | Null | Key | Default |
| term | varchar(50) | YES | NULL | |
| narrow_term | varchar(50) | YES | NULL |
Index the collection with swish-e : see swish-e manual
Add a new DataSet element to the server configuration file, config.xml.
For example, if the collection name and locations are as following:
<DataSet name="fna" poolingLimit="100">
<Searcher name="Swishe Searcher" className="webvibe.server.search.IndexSearcher">
<parameters>
<param>
<name>indexLocation</name>
<value>/home/webvibe/index/fna.index</value>
</param>
<param>
<name>maxResults</name>
<value>200</value>
</param>
<param>
<name>swisheLocation</name>
<value>/home/webvibe/bin/swish-e</value>
</param>
</parameters>
</Searcher>
<!-- Query Parser is not needed. -->
<RequestFlow>
<!-- No request handler -->
</RequestFlow>
<ResponseFlow>
<!-- No response handler -->
</ResponseFlow>
</DataSet>
You also need to add the below parameters to client configuration file (clientconfiguration.xml).
For the collection "fna":
<!-- BIBE server -->
<parameter name="database2:Server" value="www3.isrl.uiuc.edu"/>
<!-- BIBE server port-->
<parameter name="database2:Port" value="8018"/>
<!-- The URL that the images directory exists -->
<parameter name="database2:URL" value="http://www3.isrl.uiuc.edu/~webvibe/"/>
<!-- Icon name that will represent each POI -->
<!-- The actual URL for Icon is formed by combining URL (above) + POIIcon -->
<!-- In this case, "http://www3.isrl.uiuc.edu/~webvibe/images/tree.gif" -->
<parameter name="database2:POIIcon" value="images/tree.gif"/>
<!-- Simple description for the collection. This will be shown in the left pane of database selection tab -->
<parameter name="database2:Description" value=" |, FNA|, Flora of North America."/>
<!-- URL for the detailed description for the given collection.
This will be shown in the right pane of database selection tab -->
<parameter name="database2:CollectionInfoURL" value="http://www.isrl.uiuc.edu/~webvibe/webvibe/fnahelp.html"/>
<!-- Collection Name. It should be the same with the DataSet name in server side. -->
<parameter name="database2:Dataset" value="fna"/>
<!-- Thesaurus name if applicable. If there is no thesaurus for this collection, remove this element. -->
<parameter name="database2:Thesaurus" value="fnaT"/>
Index the collection with eXist : see eXist manual
For example, if the collection name and locations are as following:
in command line client for eXist:
- Collection name : north
- The directory of xml files : /home/webvibe/FNC/xml/
- exist:db> mkcol north
- exist:db> cd north
- exist:db> put /home/webvibe/FNC/xml/
If there is no parameter for EXIST_CONFIG in the server configuration file, add the below parameter to the Parameters element of BibeServer element.
<param>
<!-- The file path to the configuration file for eXist Database -->
<name>EXIST_CONFIG</name>
<value>/home/jung/exist/eXist-0.9.1/conf.xml</value>
</param>
Add a new DataSet to the server configuration file.
<!-- DataSet name should be the same with the collectionName -->
<DataSet name="north" poolingLimit="100">
<Searcher name="Mixed Exist Searcher" className="webvibe.server.search.MixedEXISTSearcher">
<parameters>
<param>
<!-- The collection name in eXist database -->
<name>collectionName</name>
<value>north</value>
</param>
<param>
<!-- This is not implemented yet in MixedEXISTSearcher. -->
<name>maxResults</name>
<value>200</value>
</param>
</parameters>
</Searcher>
<QueryParser name="eXist XML Query Parser" className="webvibe.server.parsers.EXISTQueryParser">
<parameters>
<param>
<name>collectionName</name>
<value>north</value>
</param>
</parameters>
</QueryParser>
<RequestFlow>
<!-- No Request handler-->
</RequestFlow>
<ResponseFlow>
<!-- To send the html url to client instead of the location of xml file, use URLHandler -->
<!-- If the xml file name is "text.xml" and the parameters are as below,
the url sent to client will be "http://www3.isrl.uiuc.edu/~webvibe/FNC/text.html" -->
<handler name="URL Handler" className="webvibe.server.handlers.URLHandler">
<parameters>
<param>
<name>prefix</name>
<value>http://www3.isrl.uiuc.edu/~webvibe/FNC/</value>
</param>
<param>
<name>fileSuffix</name>
<value>.html</value>
</param>
</parameters>
</handler>
</ResponseFlow>
</DataSet>
Make a structure file for client.
Modify the structure file if there are selection list for some leaf nodes.
<leaf name="habitat" tag="habitat" inputType="list"></leaf>
<leaf name="life_span_type" tag="life_span_type" inputType="list">
<value>annual</value>
<value>biennial</value>
<value>perennial</value>
</leaf>
<leaf name="gender" tag="gender" inputType="imagelist"></leaf>
<leaf name="gender" tag="gender" inputType="imagelist">
<value url="http://www3.isrl.uiuc.edu/images/Boloria_M.jpg">Male</value>
<value url="http://www3.isrl.uiuc.edu/images/Boloria_F.jpg">Female</value>
</leaf>
Add the below parameters to client configuration file (clientconfiguration.xml). You need to add two more parameters, Tree and Select, in addition to the parameters for the html or simple text collection.
<!-- Configuration for Flora of North Carolina -->
<!-- BIBE server -->
<parameter name="database0:Server" value="www3.isrl.uiuc.edu"/>
<!-- BIBE server port-->
<parameter name="database0:Port" value="8018"/>
<!-- The URL that the images directory exists -->
<parameter name="database0:URL" value="http://www3.isrl.uiuc.edu/~webvibe/"/>
<!-- Icon name that will represent each POI -->
<!-- The actual URL for Icon is formed by combining URL (above) + POIIcon -->
<!-- In this case, "http://www3.isrl.uiuc.edu/~webvibe/images/tree.gif" -->
<parameter name="database0:POIIcon" value="images/tree.gif"/>
<!-- Simple description for the collection.
This will be shown in the left pane of database selection tab -->
<parameter name="database0:Description" value=" |, FNC|, Flora of North Carolina| Test with eXist."/>
<!-- URL for the detailed description for the given collection.
This will be shown in the right pane of database selection tab -->
<parameter name="database0:CollectionInfoURL" value="http://www3.isrl.uiuc.edu/~webvibe/help/fnchelp.html"/>
<!-- Collection Name. It should be the same with the DataSet name in server side. -->
<parameter name="database0:Dataset" value="north"/>
<!-- Thesaurus name if applicable. If there is no thesaurus for this collection, remove this element. -->
<parameter name="database0:Thesaurus" value="fna"/>
<!-- Structure file URL for the tree view of document structure. Left pane of Query Panel -->
<parameter name="database0:Tree" value="http://www3.isrl.uiuc.edu/~webvibe/structure/Plant.xml"/>
<!-- The root element name -->
<parameter name="database0:Select" value="Plant_Description"/>
Index numeric range data with webvibe.services.numeric.NumericDataIndexer class.
If the collection name is north and the directory of xml files is "/home/webvibe/FNC/xml/":
To execute above command, you should have NumericDBConn.properties file in your running directory.
Do all the steps for the XML files without numeric range data.
The only thing you should be careful is Query Parser. The parser class for this type of collection is MixedEXISTQueryParser.
<QueryParser name="Mixed eXist XML Query Parser" className="webvibe.server.parsers.MixedEXISTQueryParser">
<parameters>
<param>
<name>collectionName</name>
<value>north</value>
</param>
</parameters>
</QueryParser>