Attempto Java Packages
======================

Copyright 2008, Attempto Group, University of Zurich (see http://attempto.ifi.uzh.ch).

The Attempto Java Packages can be downloaded from http://attempto.ifi.uzh.ch/site/downloads/.

The Attempto Java Packages are a collection of Java packages that are related to the Attempto
project. The Attempto Java Packages are free software licensed under the GNU Lesser General Public
Licence (see LICENSE.txt and http://www.gnu.org/licenses/lgpl.html).

See lib/README.txt for information about the used third-party libraries.


1. Content
----------

The Attempto Java Packages are divided into five jar-files:

- attempto-ape.jar contains interfaces to the Attempto Parsing Engine (APE).
- attempto-owl.jar contains interfaces to the OWL verbalizer.
- attempto-echo.jar contains basic GUI components and a predictive editor (that is used by AceWiki)
  using the Echo Web Framework.
- attempto-chartparser contains a chart parser (concretely an Earley parser) that is fully
  implemented in Java.
- attempto-acewiki-0.2.xx.jar contains AceWiki (a semantic wiki engine).

See docs/index.html for the detailed documentation of the packages and classes.


2. Compilation
--------------

This package is pre-compiled. Thus, compilation is needed only if the source code is changed. Only
the AceWiki web application is not pre-built (see section 4). The compilation can be run manually
by using Ant. Make sure that a recent version of Apache Ant is installed. The following commands
are available:

"ant compile" compiles the Java source code.

"ant createjars" creates the jar-files.

"ant createjavadoc" creates the Javadoc documentation pages.

"ant clean" deletes all automatically generated files like the compiled Java classes, the
jar-files, and the Javadoc files.

"ant buildeverything" builds everything from scratch.


3. APELocal
-----------

The APELocal class is an interface to the ACE parser that is written in SWI Prolog. When this class
is used directly or indirectly, you have to make sure that a recent version of SWI Prolog is
installed and that the file "ape.exe" is available. The file "ape.exe" can be complied from the APE
package that is available on the Attempto download page.

Furthermore, you have to use the following Java VM argument that points to the location where the
SWI Prolog system file libjpl.jnilib (under Mac OS X), libjpl.dll (under Windows), or libjpl.so
(under Unix) is located:

  -Djava.library.path=/opt/local/lib/swipl-5.6.45/lib/i386-darwin8.10.1

Note that the exact path is most probably different on your system.


4. AceWiki
----------

AceWiki is a semantic wiki engine that has to be run as a Java servlet. For this, a web application
archive (WAR) file has to be built. This can be done by the following Ant command:

  ant createacewikiapp

Executing this command will create the web application file "acewiki.war" and the folder
"acewikiapp" that contains the uncompressed content of the archive. Have a look at the following
two files and change them if required:

  acewikiapp/war/WEB-INF/web.xml
  acewikiapp/war/index.html

After changing the files you should again run the "createacewikiapp"-command in order to update
the war-file. The war file can then be given to a servlet container like Jetty or Apache Tomcat
that executes the servlet and makes it available through the Web.

Note that AceWiki makes use of the APELocal class and thus you have to perform (on the server) the
steps described in section 3.


5. Mailing List
---------------

If you encounter problems, you can get help from the Attempto community. Visit the Attempto Mailing
List site:

  http://attempto.ifi.uzh.ch/site/mailinglist/
