      +----------------------------------------------------------------+
      |                           iPad suite                           |  
      |                           ==========                           |
      |                         Cognium Systems                        |
      |                  http://www.cogniumsystems.com                 |
      +----------------------------------------------------------------+

This package contains client and server-side applications from iPad application
suite. 

Content of this document:
* Introduction
* iPad application suite: brief description
* How to launch: brief description
* How to launch: detailed description
* iPad application suite: detailed description

================================================================================
Introduction
--------------------------------------------------------------------------------

To use iPad application suite you should install MySQL (http://www.mysql.com/)
relational database (starting from the version 4.1). This is the only one
external dependence of the iPad application suite. 
You can find MySQL installer here: http://dev.mysql.com/downloads/mysql/4.1.html

================================================================================
iPad application suite: brief description
--------------------------------------------------------------------------------

This distributive has the following structure:
- /ant: crossplatform Ant scripting language
- /init: initialization scripts for all ipad.XX applications
- /init.db: database initialization scripts
- /ipad.client: iPad client application
- /ipad.server: iPad server
- /ipad.web: iPad portal

For more information about the content of each folder in this distribution see
"iPad application suite: detailed description".

================================================================================
How to launch: brief description
--------------------------------------------------------------------------------

1. configure your system ("./init")
2. create/initialize your database ("./init.db")
3. launch the server ("./ipad.server")
4. launch the portal ("./ipad.web")
5. launch the editor ("./ipad.client")

================================================================================
How to launch: detailed description
--------------------------------------------------------------------------------

Note: In all steps below "run" means "run.bat" command for Win32 system and
      "./run.sh" command for Unix/Linux.

0. Install MySQL database (see http://www.mysql.com for more information)

1. Configuration
  Note: This distribution is preconfigured to launch the system in the local
        machine, so if you use it for tests or locally for personal purposes
        you can skip this step.
  This folder contains the full configure information for the system. So usage 
  of scripts in this folder it is "the right way" to configure server, web
  portal and client as well as to keep these configurations up to date.
    a) Go to the "./init" directory in this distribution:
       > cd init
    b) Change the configuration in "./init/build.properties" file
      (such as server name, ip addresses, web portal port and so on)
    b) Synchronize all configuration files for iPad editor, iPad server and for
       iPad portal:
       > run

2. Database initialization
  Note: If you have already a database with your data then you should skip this
        step.
  Database creation, table creations and bootstrap initialization:
    a) Go to the "./init.db" directory:
      > cd init.db
    b) Create the database:
      > run db.create
    c) Create tables in this database
      > run tables.create 
    d) Initialize the database with bootstrap information:
      > run tables.init
  All these operations can be launched using only one command:
      > run all
  If you want to remove the existing database and rebuild it from scratch then
  you should use the following command before the step 2.a:
      > run db.drop
      Note: Beware that this command will destroy all your existing data!
 
3. Launching/stopping the server
  Launching the server:
    a) Go to the "./ipad.server" directory:
       > cd ipad.server
    b) Launch the server:
       > run start
  To stop the server you should use the following command:
       > run stop

4. Launching/stopping the portal
  Launching the portal:
    a) Go to the "./ipad.web" directory:
       > cd ipad.web
    b) Launch the portal:
       > run start
       Note: This operation generates the WebStart distribution of the iPad
             editor (client application).
  To stop the portal you should use the following command:
       > run stop

5. iPad editor launching
  There are two possibilities: to launch the client from the same machine as 
  the server and web portal or using WebStart application (to work with distant
  server).
  Local usage of iPad editor:
    a) Go to the "./ipad.client" directory:
       > cd ipad.client
    b) Launch the client:
       > run
  Usage of distant server:
    a) Open your web browser (Internet Explorer, Netscape, Fireforx, Opera...)
    b) Type the address of the iPad portal with the local path to WebStart
       distribution (usually "/jws/app" path).
       Example: http://foo.bar.com:8080/jws/app
    c) Chose "ipad.jnlp" link from the list. WebStart should be started.
    d) Respond "Ok/Yes" to all questions

================================================================================
iPad application suite: detailed description
--------------------------------------------------------------------------------

All folders (except "ant") contains the following scripts: "run.bat",
"run.sh" and "build.xml". The first two ones ("run.bat" - for Win32 and "run.sh"
 - for Unix/Linux) are used to launch the main functionality from the
corresponding folder (server, client or web application). Under the hood these
scripts simply call "build.xml" ant script which performs real operations.
If there are different options (for example to start/stop server...), then a
help will be shown.

More detailed description of each folder:
* /ant
  Ant is an open-source building system; it is used as a crossplatform language
  to build configuration and launch scripts for all iPad applications.
* /init
  This folder contains scripts used to automatically configure all ipad
  applications (database connection, server's host and ports, web portal
  configurations...). Usage of this script garanties coherance of configurations
  in all applications (iPad client, iPad server, web portal).
  "init/build.properties" file contains all common parameters. By default this 
  file contains values parameters to launch the applications on the local
  machine. To change configurations you should modify values in this file and
  launch "run.bat" (Win32) or "run.sh" (Unix/Linux) script.
* /init.db
  Database initialization scripts. When the script is launched ("run.bat" for
  Win32 or "run.sh" for Unix/Linux) then different options will be shown:
  - db.drop:        Drops the existing database (if any). Note that this task 
                    will destroyes all existing data.
  - db.create:      Creates a new database used by iPad.
  - tables.create:  Creates table structure in the iPad database.
  - tables.init:    Initializes tables. (Fills database tables with  bootstrap
                    infromation.)
  - all:            Create a new database, creates tables and initializes them.
                    The same as "db.create tables.create tables.init".
* /ipad.client
  This folder contains iPad client application (iPad editor). To launch it you 
  should execute "run.bat" (Win32) or "run.sh" (Unix/Linux) script.
  If you want to benfit of all functionalities of the system you should launch
  the server and the web portal before the editor ("/ipad.server" and 
  "/ipad.web" folders respectivly).
  The content of this folder is used also to automatically generate WebStart
  distribution of iPad editor. (For more information about WebStart technology
  see http://java.sun.com/products/javawebstart/). WebStart package of iPad
  editor is generated automatically while web portal launching (see "/ipad.web"
  folder).
* /ipad.server
  This folder contains iPad server providing access to database and serving all
  requests from iPad editors as well as from the Web portal. This server
  performs all hidden work: data modifications in the underlying database, user
  management, access rights checking, search queries and so on.
  This server should be launched before iPad web portal and iPad editors.
* /ipad.web
  This directory contains the following subfolders:
    - /ipad.web/jetty - Jetty J2EE web server used to launch the portal
      (see http://jetty.mortbay.org/jetty/)
    - /ipad.web/jws - WebStart package of iPad Editor. This distribution is 
      generated automatically while Jetty web server launching. This approach 
      allows keep up to date the configuration of the iPad client even if some 
      parameters of the server was changed.
    - /ipad.web/web - the iPad portal
    
================================================================================
    