Contact
If you are interested or have any kind of questions, please feel free to send us an email at
mailto:danielgerber@me.com or
mailto:marvin.frommhold@gmail.com.
Requirements
- Apache Ant >1.7.x
- Apache Tomcat 6.x (may also work with previous versions)
- Subversion
Obtaining
You need to checkout the jawa and the kwieri project from googlecode:
If you do want to use Sparql Trainer in production use you should follow the instructions below. If you just want to use Sparql Trainer in a development environment you should not replace the ROOT context of tomcat and configure the context manually in the config.xml file located in $TOMCAT_HOME/config.
Download the jawa framework
- Make a backup of the tomcat ROOT folder in $TOMCAT_HOME/webapps ($ mv ROOT BACKUP_ROOT, $mkdir ROOT)
- Go to $TOMCAT_HOME/webapps/ROOT folder
- svn checkout
http://fleischsalat.googlecode.com/svn/jawa .
Download the kwieri extension for the jawa framework
- Go to $TOMCAT_HOME/webapps/ROOT
- Create a directory called kwieri (you could create the kwieri folder wherever you want, this is not really a webapplication)
- Go to $TOMCAT_HOME/webapps/ROOT/kwieri
- svn checkout
http://fleischsalat.googlecode.com/svn/kwieri .
Configuration
Jawa and its Sparql Trainer extension get both configured and installed through Apache Ant. So you need to specify the project's settings in the build.properties files in order to generate the corresponding XML-configuration files. For every config file example.xml, there is a template version called example.xml.in located in $TOMCAT_HOME/webapps/ROOT/WEB-INF/config. Ant then takes the filled in project settings from the build.properties and replaces the placeholders in the *.in files to generate the actual config file.
Jawa
- Go to $TOMCAT_HOME/webapps/ROOT
- Copy build.properties.default to build.properties
- Edit the build.properties according to your needs
Kwieri
- Go to $TOMCAT_HOME/webapps/ROOT/kwieri
- Copy the build.properties.default to build.properties
- Edit the build.properties according to your needs
Installation
If you have finished configuring both projects you can then use ant to install these projects. Due to Sparql Trainer depends in the Jawa Framework it's neccessary that you install/compile Jawa first. Afterwards you can install/compile the Sparql Trainer which consists of the two parts, core and view. Both parts get independently packed together to two *.jar files which are then copied to the lib directory of the Jawa Framework.
- Go to $TOMCAT_HOME/webapps/ROOT
- $ ant install
- Go to $TOMCAT_HOME/webapps/ROOT/kwieri
- $ ant install.kwieriTrainer
- $ ant install.resources
- Go to $TOMCAT_HOME/webapps/ROOT/WEB-INF/config/jawa
- $ cp jawa_extensions.xml.in jawa_extensions.xml
- edit the property testDir according to where you want to store your test files
- If you have installed jawa no in the ROOT directory of tomcat you need to specify the context path in $TOMCAT_HOME/conf/context.xml
Advice
Due to the project configuration it might be inconvenient to know all neccessary folders. So for example you want change translations you need to rebuild the Sparql Trainer, because these files are located in the generated jar files. It also would be nice to have instant access to the test and the models itself. Also the user management is file based (it's not possible to register new users trough the web interface), so a link to the user database should be helpful. For automation purposes you can use the two scripts at the end of this page (you probably need to adept them).
- you should create a new user called sparqltrainer
- and install the tomcat into the sparqltrainer's home directory
- and create the following symlinks after you installed Sparql Trainer:
- $ cd /home/sparqltrainer
- to change the language files, you need to run $ ant install.kwieriTrainer (in the kwieri direcotory)
- $ ln -s /home/sparqltrainer/$TOMCAT_HOME/webapps/kwieri/src/de/unileipzig/kwieri/jawaView/_i18n .
- to be able to change the test easily
- $ ln -s /home/sparqltrainer/$TOMCAT_HOME/webapps/kwieri/resources/kwieriTests/ .
- to be able to change the models easily
- $ ln -s /home/sparqltrainer/$TOMCAT_HOME/webapps/ROOT/public/kwieriTrainer/models/ .
- to add new users, or if you don't want to do $ ant config (in the jawa directory) again
than link the users.xml instead- $ ln -s /home/sparqltrainer/$TOMCAT_HOME/webapps/ROOT/WEB-INF/config/modules/in/users.xml.in .
UpdateLocaleFiles.sh
UpdateUsersFile.sh
Usermanagement
If you want to add a new system user you need to edit this file: $TOMCAT_HOME/webapps/ROOT/WEB-INF/config/modules/users.xml.
Please consider that if you do run $ ant configure again, the users.xml file gets recreated, so it might be better to edit the $TOMCAT_HOME/webapps/ROOT/WEB-INF/config/modules/in/users.xml.in file instead. You need to restart tomcat after you change the users file, or you simple you the script provided here.
Example user file
Testmanagement
Your test files are located under $TOMCAT_HOME/webapps/kwieri/resources/kwieriTests/. A sample test file, with a short description of the elements could look like this:
The according XSD schema can be found here.
TODO's
- provide feedback a lá number of lines is x, number of triple patterns is y, number of columns is z
- create a proper test, extend the planets example in the Semantic Web Grundlagen book
- make it possible to view the model in differnt serializations
- support for test definition in rdf/xml (maybe a ontowiki component for easy creation)
Information
Last Modification:
2010-03-29 16:25:30 by Daniel Gerber