Users Guide
Requirements
CATE is a Java web application. It requires:
- A Java environment that implements Java 2 Standard Edition 5.0 (such as Sun jdk version 1.5.0 or higher)
- A servlet container that implements the Java Servlet and JavaServer Pages technologies versions 2.4 and 2.0 (such as Apache Tomcat 5.0)
- An SQL database for which a Java Database Connectivity (jdbc) driver exists (such as MySQL 4.1, other suitable databases are listed here).
Setting up the database
The easiest way to set up the database for a CATE instance is to use the cate-tools package (which is available from the nescforge site, and also from this website in the maven repository). If you can create an xml document which validates against the cate schema (found here), then you can use this tool to enter that data into a database.
Note that this too will erase all other data in the database in question, so be careful! The tool can be called from the command line like so
java -jar cate-tools.jar file:inputfile.xml
Where file:inputfile.xml is the uri of the document you wish to import. This utility expects a hibernate.properties file to be present in the directory from which the utility is executed. hibernate.properties is a standard hibernate properties file which is described here. Note that cate has only been tested with mySQL and a mySQL driver is included in the cate-tools.jar file. If you need a different driver, you will need to ensure that the driver is in the classpath. The hibernate.properties file looks like this
- hibernate.connection.driver_class=com.mysql.jdbc.Driver
- hibernate.connection.url=jdbc:mysql://localhost/cate?useUnicode=true&characterEncoding=UTF-8
- hibernate.connection.username=cate
- hibernate.connection.password=cat3.databa53
- hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
- hibernate.hbm2ddl.auto=create
- hibernate.cache.provider_class=net.sf.ehcache.hibernate.SingletonEhCacheProvider
- hibernate.search.default.directory_provider=org.hibernate.search.store.FSDirectoryProvider
- hibernate.search.default.indexBase=.
This tool takes the document specified, marshalls it into entities which are specified in cate-model, and persists them into the database. It also indexes the entities (stored in hibernate.search.default.indexBase). These indexes need to be copied to $cate.webAppRoot/WEB-INF/ to be used by the web application.
The web-application uses the same properties as cate-tools.jar (shown above) - it expects a database called cate to be held in a mySQL database running at the default port on localhost. It will attempt to connect to the database using the username cate, and the password cat3.databa53. To change these settings, open the properties file $cate.webAppRoot/WEB-INF/classes/datasource.properties and change the settings there (then restart tomcat).
Downloading and installing CATE
CATE is software under development. It is released at regular (three monthly) intervals and is available from the National e-Science Centre's gForge Site, here.
This software is packaged according to the Java Servlet Specification (version 2.4) as a web archive (*.war file), and can be deployed in a suitable container as-is.
For example, in Apache Tomcat, the CATE web-application can be deployed by copying the archive into $TOMCAT_HOME/webapps . If you need more information about configuring tomcat, please see the Tomcat Website.


